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 checkpoint;
20、alter system switch logfile;
21、alter system switch logfile;
22、alter system switch logfile;
23、shutdown immediate;
24、rm -f zxdapp1.dbf;
25、sqlplus /nolog
26、conn /as sysdba;
27、startup;
28、select * from v$recover_file;
29、alter database datafile 6 offline;
30、alter database open;
31、select * from hr.departments;
32、select * from user1.t1;
33、copy 'c:\coldbackup\zxdapp1.dbf ' 'F:\oracle\product\10.1.0\oradata\orcl4\zxdapp1.dbf';
34、select * from v$recover_file;
35、recover datafile 6;
36、select * from v$recover_file;
37、alter database datafile 6 online;
38、select * from user1.t1;
39、ok!!!!
阅读(730) | 评论(0) | 转发(0) |