Please send your Questions & Answers or Feedback to "dvmadhavreddy@javabook.org"

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Loss of System datafile

SQL> select name from v$datafile;
oracle> cd /u01/app/oracle/venu
oracle venu> rm system01.dbf
oracle venu> ls

SQL> conn scott/tiger
scott> insert into salgrade select * from salgrade;
scott> conn / as sysdba
SQL> shut immediate
Throws error.
SQL> shut abort

oracle> cd /u01/coldbkp
oracle coldbkp> ls
oracle coldbkp> cp system01.dbf /u01/app/oracle/venu

SQL> startup mount
SQL> select file#,checkpoint_change# from v$datafile;
Picks the data from the control file.
save df.sql
SQL> select file#,checkpoint_change# from v$datafile_header;
Picks the data from the datafile headers.
save dfh.sql
SQL> recover datafile 1;
Here we can specify the file number or the complete path of the datafile.
SQL> @df.sql
SQL> @dfh.sql
SQL> alter database open;

Related Posts Plugin for WordPress, Blogger...

Flag Counter