User managed recovery of sysaux datafile
******************************************
1)Take bkp of database by putting db in begin backup mode
********************
SQL> alter database begin backup;
Database altered.
SQL> select FILE_NAME,TABLESPACE_NAME,BYTES/1024/1024 from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME BYTES/1024/1024
------------------------------ ---------------
/home/cybage/app/cybage/oradata/temp/users01.dbf
USERS 5
/home/cybage/app/cybage/oradata/temp/undotbs01.dbf
UNDOTBS1 40
/home/cybage/app/cybage/oradata/temp/sysaux01.dbf
SYSAUX 500
....etc
2)copy to bkp location and end backup
**************
cp * /home/cybage/bkp/
SQL> alter database end backup;
Database altered.
3)To stimulate delete datafile from OS
**************
[cybage@oracle bkp]$ rm /home/cybage/app/cybage/oradata/temp/sysaux01.dbf
4)go to mount state
*******************
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 584568832 bytes
Fixed Size 2215544 bytes
Variable Size 251658632 bytes
Database Buffers 327155712 bytes
Redo Buffers 3538944 bytes
SQL> alter database mount;
Database altered.
5)Restore database by copying file to orginal location
*************
[cybage@oracle bkp]$ cp sysaux01.dbf /home/cybage/app/cybage/oradata/temp/
SQL> recover database ;
Media recovery complete.
6)open database.
*************
SQL> alter database open;
Database altered.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
TEMP READ WRITE
******************************************
1)Take bkp of database by putting db in begin backup mode
********************
SQL> alter database begin backup;
Database altered.
SQL> select FILE_NAME,TABLESPACE_NAME,BYTES/1024/1024 from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME BYTES/1024/1024
------------------------------ ---------------
/home/cybage/app/cybage/oradata/temp/users01.dbf
USERS 5
/home/cybage/app/cybage/oradata/temp/undotbs01.dbf
UNDOTBS1 40
/home/cybage/app/cybage/oradata/temp/sysaux01.dbf
SYSAUX 500
....etc
2)copy to bkp location and end backup
**************
cp * /home/cybage/bkp/
SQL> alter database end backup;
Database altered.
3)To stimulate delete datafile from OS
**************
[cybage@oracle bkp]$ rm /home/cybage/app/cybage/oradata/temp/sysaux01.dbf
4)go to mount state
*******************
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 584568832 bytes
Fixed Size 2215544 bytes
Variable Size 251658632 bytes
Database Buffers 327155712 bytes
Redo Buffers 3538944 bytes
SQL> alter database mount;
Database altered.
5)Restore database by copying file to orginal location
*************
[cybage@oracle bkp]$ cp sysaux01.dbf /home/cybage/app/cybage/oradata/temp/
SQL> recover database ;
Media recovery complete.
6)open database.
*************
SQL> alter database open;
Database altered.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
TEMP READ WRITE
No comments:
Post a Comment