1、sqlplus /nolog
2、conn /as sysdba;
3、startup;
4、alter database backup controlfile to 'c:\backup1\cb.bin';
5、select ts#,name from v$tablespace;
6、create tablespace app4 datafile 'F:\oracle\product\10.1.0\oradata\orcl4\zxdapp4.dbf' size 10M;
7、conn user1/user1;
8、create table t4(id int,name char(10)) tablespace app4;
9、insert into t4 values(0,'sxx0');
10、commit;
11、select * from t4;
12、conn /as sysdba;
13、shutdown abort;
14、copy 'c:\backup1\cb.bin' 'F:\oracle\product\10.1.0\oradata\orcl4\control01.ctl'
copy 'c:\backup1\cb.bin' 'F:\oracle\product\10.1.0\oradata\orcl4\control02.ctl'
copy 'c:\backup1\cb.bin' 'F:\oracle\product\10.1.0\oradata\orcl4\control03.ctl'
15、startup mount;
16、select file#,checkpoint_change# from v$datafile;
17、select file#,checkpoint_change# from v$datafile_header;
18、alter database open;
19、recover database using backup controlfile;
20、F:\oracle\product\10.1.0\oradata\orcl4\redo01.log;
21、F:\oracle\product\10.1.0\oradata\orcl4\redo02.log;
22、F:\oracle\product\10.1.0\oradata\orcl4\redo03.log;
23、select * from v$recover_file;
24、select file#,name from v$datafile;
25、alter database rename file '..../unnamed0007' to 'F:\oracle\product\10.1.0\oradata\orcl4\zxdapp4.dbf';
26、select file#,name from v$datafile;
27、recover database using backup controlfile until cancel;
28、 F:\oracle\product\10.1.0\oradata\orcl4\redo01.log;
29、 F:\oracle\product\10.1.0\oradata\orcl4\redo02.log;
30、 F:\oracle\product\10.1.0\oradata\orcl4\redo03.log;
31、 alter database open resetlogs;
32、select * from user1.t4;
33、ok!!!!!!
阅读(657) | 评论(0) | 转发(0) |