RMAN Commands

RMAN is massive and a bit scarey, I have only just started to do a little with it.  I am having to clone a databse at the moment and got to the point of retore.

 

To find out how far in the restore is :

sqlplus / as sysdba

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) “%_COMPLETE”
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE ‘RMAN%’
AND OPNAME NOT LIKE ‘%aggregate%’
AND TOTALWORK != 0
AND SOFAR <> TOTALWORK;

 

 

Advertisements

Archive Log Mode

We have several Oracle databases, some in Archivelog mode some not.  I found out that a database has to be in Archivelog mode before and RMAN backup can be preformed. Please not that out database were setup with Archivelog mode enabled, so we just have to turn it on.  If your database was not setup this way then Archiving must be setup.  I am affraid google.com is needed as this is outside my knowledge area.

 

To get a database into ARCHIVELOG mode you must restart it.

 

sqlplus / as sysdba

shutdown immediate;

startup mount exclusive;

alter database archivelog;

alter database open;

 

You can now run the RMAN commands or script.

 

To turn Archivelogging off it is the reverse.

sqlplus / as sysdba

shutdown immediate;

startup mount exclusive;

alter database noarchivelog;

alter database open;

 

After some additional reading there appears to be a way of just stopping archivelogging, I am not sure if this will work in 10gR2 as the document was reagarding 11g.  I have not tried this but just from information

Ensure that Archivelog in on.

alter system  archive log start;
alter system archive log stop;