- 最后登录
- 2012-8-6
- 在线时间
- 24 小时
- 威望
- 89
- 金钱
- 734
- 注册时间
- 2012-2-29
- 阅读权限
- 50
- 帖子
- 37
- 精华
- 2
- 积分
- 89
- UID
- 267
|
1#
发表于 2012-3-15 09:15:37
|
查看: 5449 |
回复: 4
create tablespace test datafile '/oracle/app/oracle/oradata/orcl/test01.dbf' size 20M autoextend off;
alter tablespace test add datafile '/oracle/app/oracle/oradata/orcl/test02.dbf' size 20M autoextend off;
alter tablespace test add datafile '/oracle/app/oracle/oradata/orcl/test03.dbf' size 20M autoextend off;
create table tt04(id int,name varchar(50),addr char(512))tablespace test;
begin
for count in 1..1000000 loop
insert into tt04 values(count,'aaabb'||count||'cccddd','12312aa4124abb'||count||'cccd4124dd');
commit;
end loop;
end;
/
SQL> select count(1) from tt04;
COUNT(1)
----------
89986
填满表空间test
做重建控制文件的操作,并特意遗漏数据文件test03.dbf
重建控制文件的时候resetlogs才会导致该问题,所以这里特地resetlogs了。
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 2
4 MAXDATAFILES 30
5 MAXINSTANCES 1
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/oracle/app/oracle/oradata/orcl/redo01.log' SIZE 10M,
9 GROUP 2 '/oracle/app/oracle/oradata/orcl/redo02.log' SIZE 10M,
10 GROUP 3 '/oracle/app/oracle/oradata/orcl/redo03.log' SIZE 10M
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/oracle/app/oracle/oradata/orcl/system01.dbf',
14 '/oracle/app/oracle/oradata/orcl/undotbs01.dbf',
15 '/oracle/app/oracle/oradata/orcl/sysaux01.dbf',
16 '/oracle/app/oracle/oradata/orcl/test01.dbf',
17 '/oracle/app/oracle/oradata/orcl/test02.dbf'
18 CHARACTER SET US7ASCII
19 ;
Control file created.
SQL> ALTER DATABASE OPEN RESETLOGS;
Database altered.
SQL> select name,status from v$datafile;
NAME STATUS
------------------------------------------------------- -------
/oracle/app/oracle/oradata/orcl/system01.dbf SYSTEM
/oracle/app/oracle/oradata/orcl/undotbs01.dbf ONLINE
/oracle/app/oracle/oradata/orcl/sysaux01.dbf ONLINE
/oracle/app/oracle/oradata/orcl/test01.dbf ONLINE
/oracle/app/oracle/oradata/orcl/test02.dbf ONLINE
/oracle/app/oracle/product/10.2.0.1/dbs/MISSING00006 RECOVER
SQL> alter database rename file '/oracle/app/oracle/product/10.2.0.1/dbs/MISSING00006' to '/oracle/app/oracle/oradata/orcl/test03.dbf';
Database altered.
SQL> recover datafile '/oracle/app/oracle/oradata/orcl/test03.dbf';
ORA-00283: recovery session canceled due to errors
ORA-00600: internal error code, arguments: [krhpfh_03-1202], [fno =], [6],
[fhcrt =], [774152195], [cptim =], [0], []
ORA-01110: data file 6: '/oracle/app/oracle/oradata/orcl/test03.dbf'
请教在这种情况下还能有机会把数据文件重新应用起来么。 |
|