RMAN: restore the spfile

$sqlplus /nolog;
SQL>connect / as sysdba;
SQL>startup nomount;
SQL>exit;

$rman target / nocatalog
RMAN>set dbid=147749264
RMAN>run
{
allocate channel d1 type disk;
set CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘$ORACLE_BASE/oradata/rman_backup/control%F’;
Restore spfile from autobackup;
Release channel d1;
}

Here is the error info: RMAN-06564: rman must use the t0 clause when the instance is started with spfile

This error info implies that you were using default SPFILE ($ORACLE_HOME/dbs/spfile<SID>.ora) to startup the database. Database STARTUP NOMOUNT will use the default PFILE or SPFILE.

Problem solving:

Method 1: remove spfile, startup nomount using pfile;

Method 2: from documentation,

If restoring to a nondefault location, then you could run commands as in the following example:
RESTORE SPFILE TO ‘/tmp/spfileTEMP.ora’; # if you are using a catalog
RESTORE SPFILE TO ‘/tmp/spfileTEMP.ora’ FROM AUTOBACKUP; # if in NOCATALOG mode

References:

1. http://www.orafaq.com/forum/t/56572/0/
2. [Chinese] http://space.itpub.net/7199859/viewspace-62315
3. http://forums.oracle.com/forums/thread.jspa?threadID=661030&tstart=45

Leave a Reply