Problem solve Get help with specific problems with your technologies, process and projects.

Using RMAN in Oracle 9.2 for recovering a tablespace

I am trying to use RMAN in Oracle 9.2 for recovering a tablespace. My understanding is I need to take the following steps:

1. Start the target database in mount mode.
2. Connect to the recovery catalog database in RMAN.
3. Connect to the target database.
4. Create and run the script.

On step two, I keep getting an error saying the database is being initialized or being shutdown. Can't connect:(RMAN-04004)

On step four, when I try to use the feature, "set until time '2005-01-09:11:01:01", RMAN tells me the format doesn't match the literal. I've checked the nls_date_format, which is set to 'YYYY-MM-DD:HH24:MI:SS' in the target database. Also nls_language is American.

My understanding is that I've to have the database in mount mode for Recovery, but I can't connect to the catalog in mount mode. I would appreciate it if you could shed some light on these two issues.

The recovery catalog contains information about what was backed up in your database, when it was backed up, and where that backup resides. For this reason, you should not be storing your recovery catalog in a database that uses that recovery catalog. If the database is down, how can you use the recovery catalog in that database to restore that database? It's not possible. The database is in MOUNT mode. That is why you cannot connect to your RMAN Recovery Catalog. Many DBAs who implement RMAN set up an Oracle database just to hold the Recovery Catalog for RMAN backups of all of their other databases. Luckily, your control file contains much of the same information (provided the record of the backup you need to restore from is less than the number of days specified by your CONTROL_FILE_RECORD_KEEP_TIME initialization parameter. Try connecting to the target database without connecting to the recovery catalog and see if you can perform your restore.

You can try to restore to a point in time by specifying the SET UNTIL TIME clause. For instance:

   SET UNTIL TIME 'Jan 19 2005 12:13:14';

The format used should be the same date format specified in your NLS_DATE_FORMAT initialization parameter. If you want to use a different format, or if you are unsure of the exact format and want to explicitly state your format, you can use the TO_DATE function, just like in SQL processing. You just need to enclose the TO_DATE function in double quotes. The example below is similar to the previous example, but with a different format:

   SET UNTIL TIME "TO_DATE('01/19/05 12:13:14','MM/DD/YY HH24:MI:SS')";

Dig Deeper on Oracle database backup and recovery

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.