Friday, 5 December 2014

oracle system datafile restoring and recovering from backup location

SQL> select name from v$datafile;


SQL> !
[oracle@oralinux ORCL1]$ rm system01.dbf
[oracle@oralinux ORCL1]$ sqlplus "/as sysdba"

SQL*Plus: Release Production on Fri Dec 5 19:52:50 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shut abort;
ORACLE instance shut down.
SQL> !cp /u01/app/oracle/backups/system01.dbf /u01/app/oracle/oradata/ORCL1/

SQL> startup mount;
ORACLE instance started.

Total System Global Area  313860096 bytes
Fixed Size                  1336232 bytes
Variable Size             264244312 bytes
Database Buffers           41943040 bytes
Redo Buffers                6336512 bytes
Database mounted.
SQL> recover datafile '/u01/app/oracle/oradata/ORCL1/system01.dbf';
Media recovery complete.
SQL> alter database open;

Database altered.


Popular Posts