Thursday, April 12, 2012

RMAN Validate Command

The RMAN VALIDATE and RESTORE VALIDATE commands should be part of ongoing testing of your recovery plan. VALIDATE causes RMAN to read specified backups on disk or tape and report whether they are intact and usable in a restore operation. RESTORE... VALIDATE causes RMAN to check whether the set of available backups is sufficient to restore the specified database objects. For example,RESTORE TABLESPACE TBS_1 VALIDATE selects backups sufficient to restore the named tablespace, just as RMAN does in a real restore operation, and reads the backups to ensure that they are present and not corrupted.  It does not, however, actually perform the restore.  This can be useful when you want to verify the validity of your RMAN backups without having any affect on the database itself. 

Some examples of the VALIDATE command

RMAN> restore database validate;
RMAN> restore controlfile validate;
RMAN> restore spfile validate;
RMAN> restore tablespace <tablespace name> validate;
RMAN> validate backupset <backupset #>;

Friday, November 11, 2011


Have you tried to backup your database after a recorery and ran into the following error: 

RMAN-06059: expected archived log not found

Starting backup
current log archived
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11:32:04
RMAN-06059: expected archived log not found, lost of archived log 
compromises recoverability
ORA-19625: error identifying file /oracle/oradata/orcl/archive/1_2343.arc
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory

Tuesday, September 20, 2011

Automating RMAN via .bat

If you had automated Oracle RMAN backups via Enterprise Manager Console on a Windows Server and now your console no longer starts, you can create a backup solution running RMAN commands via a .bat script.

I've found the easiest way is to create a command file (cmdfile) and a batch file that calls it. The following is an example of creating each file at the location C:\Oracle\RMAN

Friday, September 2, 2011

ORA-19566 Corruption Preventing RMAN Backup

File corruption is a regular problem DBA's come across.  It could be corruption of the redo log or controlfile that prevents the database from opening.  Or a corruption in a datafile that is affecting queries of certain data blocks or preventing RMAN from taking a backup.  These issues can easily be overcome with a good backup solution using RMAN.  If you do not have a valid backup without the offending corruption, you could have a serious problem on your hands. 

If you are just now trying to implement an RMAN backup solution and your backups are failing with

ORA-19566: exceeded limit of 0 corrupt blocks for file

... we at least have the option of skipping the corrupted blocks so the backups can complete successfully

Monday, August 15, 2011

Oracle Enterprise Manager Console Rebuild

The Oracle Enterprise Manager Console (emconsole) that came out in Oracle 10g was a great tool to use to perform DBA tasks... when it works.  Too many times I have run into problems after the system administrator applied security patches or performed hardening on the database server.  These changes would result in the emconsole service not being able to startup.  If I was lucky, rebuilding the console would get the service to startup again.  Here are the steps I performed in order to rebuild the management console:

Friday, July 29, 2011

OPatch failed with error code = 74

A frequent issue I come across when trying to apply an Oracle Critical Patch Update on a Windows Server is the error:

OPatch failed with error code = 74

Typically you will see several Oracle .dll files listed above this entry that cannot be copied.  This is because some Oracle process still has a lock on these files, despite the fact that you have shutdown all the Oracle services and Distributed Transaction Coordinator service as suggested in the patch documentation.

Sometimes rebooting the server will fix this problem, but I've found that this is not always the case.  One of the most reliable ways to fix this issue is to temporarily remove the Oracle entries from the PATH variable and then restarting.  Here are the steps that I follow to work around this problem:

Friday, July 1, 2011

Are you having Oracle database problems?  Do you need an experienced database administrator (DBA) to manage your database but cannot afford a full-time DBA’s salary? 

A remote DBA may be the cost-effective solution you are looking for.  Clients from across the United States hire me to manage their databases remotely for as little as $500 / month, saving them tens of thousands of dollars each year.