set autorecovery off
0、sqlplus /nolog
1、conn /as sysdba;
2、startup;
3、create tablespace app3
datafile 'F:\oracle\product\10.1.0\oradata\orcl4\zxdapp3.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)) tablespace app3;
10、insert into t1 values(1,'zxd1');
12、commit;
13、alter system checkpoint;
14、shutdown immediate;
15、rm -f zxdapp3.dbf;
16、startup ;
17、select * from v$recover_file;
18、select file#,name from v$datafile;
19、alter database datafile 7 offline;
20、alter database create datafile 'F:\oracle\product\10.1.0\oradata\orcl4\zxdapp3.dbf' (as '新目的);
21、select * from user1.t1;
22、recover datafile 7;
23、alter database datafile 7 online;
24、select * from user1.t1;
25、ok!!!!!
阅读(562) | 评论(0) | 转发(0) |