Tuesday, 9 December 2014

How to backup/restore oracle database


sqlplus>shutdown immediate
sqlplus>startup mount

--backup
rman target /
rman>backup database;
rman>list backup;

---restore
sqlplus>shutdown abort;
rman>startup nomount;
rman>restore controlfile from '';
rman>alter database mount;
rman>restore database;
rman>recover database;
rman>alter database open resetlogs;

--validate db is open
sqlplus> select name from v$database;
sqlplus> select open_mode from v$database;

No comments:

Post a Comment