set autorecovery off
0、sqlplus /nolog
1、conn /as sysdba;
2、startup;
3、create tablespace app1
datafile 'F:\oracle\product\10.1.0\oradata\orcl4\zxdapp1.dbf' size 10M
extent management local uniform size 100k;
4、create user user1 identified by user1 account unlock;
5、grant connect,resource to user1;
6、select * from v$recover_file;
7、sqlplus /nolog
8、conn user1/user1@oracle9ivm ;
9、create table t1(id number,name varchar(20));
10、insert into t1 values(1,'zxd1');
11、shutdown immediate;
12、copy 'F:\oracle\product\10.1.0\oradata\orcl4\*.dbf' 'c:\coldbackup\';
13、sqlplus /nolog
14、conn /as sysdba;
15、startup;
16、sqlplus /nolog
17、conn user1/user1@oracle9ivm ;
18、insert into t1 values(2,'zxd2');
19、alter system switch logfile;
20、alter system switch logfile;
21、alter system switch logfile;
22、alter system switch logfile;
23、shutdown immediate;
24、rm -f *.dbf;
25、sqlplus /nolog
26、conn /as sysdba;
27、startup;
28、shutdown immediate;
29、copy 'c:\coldbackup\*.dbf ' 'F:\oracle\product\10.1.0\oradata\orcl4';
30、startup;
31、select * from v$recover_file;
32、recover datafile 1;
33、select * from v$recover_file;
34、recover database;
35、select * from v$recover_file;
36、alter database open;
37、select * from user1.t1;
38、ok!!!!
阅读(510) | 评论(0) | 转发(0) |