1) Á¤»ó¾÷¹« ¼öÇà
SQL> @LABS/moreemphist
2) Failure ¸¦ ¸¸µç´Ù
SQL> !rm $HOME/oradata/HUMAN/users01.dbf
3) Recovery
RMAN> run {host "cat $HOME/LABS/user_tbs_media_recovery.rmn";}
replace script user_tbs_media_recovery {
sql 'alter tablespace users offline immediate';
set newname for datafile '$HOME/oradata/HUMAN/users01.dbf'
to '$HOME/LABS/users01.dbf';
restore (tablespace users);
switch datafile all;
recover tablespace users;
sql 'alter tablespace users online';
}
RMAN> @LABS/user_tbs_media_recovery.rmn
RMAN> run { execute script user_tbs_media_recovery;}
4) Á¤»óÀΰ¡ È®ÀÎ
SQL> select count(*) from hr.emphist;
|