Thursday, March 7, 2013

ORA-19550: cannot use backup/restore functions while using dispatcher

Your RMAN connection is going thru SHARED SERVER Mode.
Make a TNS entry with DEDICATED Mode ( (server=dedicated) ) and try again.


19550, 00000, "cannot use backup/restore functions while using dispatcher"
// *Cause:  Attempted to use backup/restore functions while connected to the
//          dispatcher in a shared server.
//          This is not allowed because the device that is
//          used for backup and restore must remain allocated to a single
//          process.
// *Action: Connect directly to the instance then re-execute the backup or
//          restore function.

Friday, February 22, 2013

RMAN TSPITR

Example on using RMAN TSPITR (Tablespace Point-in-Time Recovery):


Login into your RMAN Catalog by setting up your database environment.

rman catalog rman/password@catalogdb target /

RMAN> configure channel 1 device type sbt_tape parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=adm_p,OB2BARLIST=restore_job)';

RMAN> configure channel 2 device type sbt_tape parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=adm_p,OB2BARLIST=restore_job)';

I am configuring the above channels manually as I had issues RMAN allocating channels for AUXILIARY instance...



run {
SET NEWNAME FOR DATAFILE '/ora05/oradata/db1/abc_ts_01.dbf' TO '/ora03/oradata/db1/abc_ts_01.dbf'; --here I am changing the default location of a datafile to a new location
recover tablespace abc_ts until time "to_date('16-FEB-2013 06:41:00','DD-MON-YYYY HH24:MI:SS')" AUXILIARY DESTINATION '/ora05_1/auxdest'; --this is optional but I personally wanted to give a storage to RMAN for its dynamic Auxiliary instance.
}

The above will restore your tablespace until the time specified.

Once the above is successful, you will notice that tablespace is OFFLINE as Oracle wants you to take a backup of that tablespace and lets you bring that tablespace online.

So, take a backup:

RMAN> backup tablespace abc_ts; --or take a backup from your backup software...

and bring it online:

RMAN> sql 'alter tablespace abc_ts online';

RMAN-12012: multiple records for DISK parallelism found in catalog

While trying to restore (TSPITR) using RMAN Catalog I ran into this wired errors stating while allocating channels...


RMAN> recover tablespace abc123
until time "to_date('19-FEB-2013 00:00:00','DD-MON-YYYY HH24:MI:SS')"
AUXILIARY DESTINATION '/ora05/auxdest';

Starting recover at 20-FEB-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/20/2013 16:43:10
RMAN-12010: automatic channel allocation initialization failed
RMAN-12012: multiple records for DISK parallelism found in catalog

RMAN> exit

Doing some research, found the solution to reset config and try again.

SQL> exec dbms_backup_restore.resetconfig;

Now try again and you will have no issues allocating channels...