Month: February 2022

Set the background color for midnight commander in pre 8 redhat clones

With the version 8 of redhat and clones, alike oracle or centos, you have the new layout option in the configuration to set a theme for your midnight commander appearance. In lower versions however, you need to start mc with selected options or modify ~/.config/mc/ini in that respect. If you’re just fine with the overall color usage but kind of dislike the the bright blue background color of mc on your otherwise more dark themed terminals / desktop, here is the command line or init file directive to apply for file listing (mc) and edit mode (mcedit) views.

command line

init file

And that’s how it might look like with gray3. For other colors in a short overview use mc --help-color , for a more in depth documentation man mc. https://midnight-commander.org/wiki/doc/common/skins may also be helpful.

Have fun

Oracle Database “RMAN-20216: backup piece is missing”

Got dizzy the other day when, after moving around backup files, a final “restore database preview summary;” got me a :

A web search straight away pointed me to Restore Database Preview Not Working (Doc ID 2652539.1) on metalink, proposing a solution. First off, rman needs to be started in debug/trace mode as follows (credits to https://oraclespin.com/2010/11/28/how-to-turn-on-debugtrace-when-running-rman) :

We’ll now need to identify the backup piece causing the problem by looking out for some pattern like “... getBackupPiece with error 20216“. In this case, a backup piece in backup set 6803 was incorrectly registered obviously :

ID 2652539.1 now recommends to do a crosscheck on the backup piece by tag name, followed by an uncatalog and a (re-)catalog. The tag name can be found by executing a "list backup of database;", the “select * from RC_BACKUP_PIECE where BS_KEY = 6803;” from the document didn’t work for me.

Now the crosscheck and the uncatalog :

The (re-)catalog, as given, failed due to a language error, maybe the document is already out of date in that respect :

I instead just did the well-known cataloging by file pattern and succeeded :

Yet another “crosscheck …” of the backup piece only returned one file, as compared to the output above :

And now, finally, the “restore … preview …” is working again :

Enjoy

Have the “Oracle Software Delivery Cloud” wget.sh authentication actually work

Downloading from https://edelivery.oracle.com/osdc/faces/SoftwareDelivery offers the option to catch a wget-oriented download script for server side console use.

The script manages the follow up authentication of the server session against Oracle using a re-logon and a cookie file. Nothing fancy, just the web on the console and that much efficient.

Now the funny thing: due to some output channel directives in the script, entering the re-logon credentials will get stuck after the username <enter> input.

The problem is, that the password prompt, although only stderr is redirected, will not find its way to the console but will end up in the download log file :-))

So I recommend to remove this wget call output redirection at all. On top of that, I also opt to remove any wget call output redirections in the file, so you can follow the download progress on the console and log file will stay readable.

Have fun.