ALLSTARS_ORACLE 发表于 2017-4-15 10:15:30

test 表空间文件被破坏删除,无备份,如何启动数据库

test 表空间文件被破坏删除,无备份,如何启动数据库



SQL> show user;
USER is "SYS"
SQL> alter tablespace test offline drop datafile;
alter tablespace test offline drop datafile
                              *
ERROR at line 1:
ORA-02141: invalid OFFLINE option


SQL> alter tablespace test offline;
alter tablespace test offline
*
ERROR at line 1:
ORA-01115: IO error reading block from file 6 (block # 1)
ORA-01110: data file 6: '/u01/oracle/oradata/gssd/test1.dbf'
ORA-27072: File I/O error
Additional information: 4
Additional information: 1



SQL>!echo 'asdf'>/u01/oracle/oradata/gssd/test.dbf' 执行完后 想查询这个表空间上的数据,数据库就down了,,,,接下来就恢复不了......咋整啊!



SQL> alter database datafile '/u01/oracle/oradata/gssd/test1.dbf' offline;

Database altered.

SQL> alter database create datafile '/u01/oracle/oradata/gssd/test1.dbf';

Database altered.

SQL> recover datafile '/u01/oracle/oradata/gssd/test1.dbf';
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area  422670336 bytes
Fixed Size                  1345380 bytes
Variable Size             285214876 bytes
Database Buffers          130023424 bytes
Redo Buffers                6086656 bytes
Database mounted.
SQL> recover datafile '/u01/oracle/oradata/gssd/test1.dbf'
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u01/oracle/oradata/gssd/system01.dbf'

SQL> alter database datafile '/u01/oracle/oradata/gssd/test1.dbf' offline;

Database altered.

SQL> alter database create datafile '/u01/oracle/oradata/gssd/test1.dbf';

Database altered.

SQL> recover datafile '/u01/oracle/oradata/gssd/test1.dbf';
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area  422670336 bytes
Fixed Size                  1345380 bytes
Variable Size             285214876 bytes
Database Buffers          130023424 bytes
Redo Buffers                6086656 bytes
Database mounted.
SQL> recover datafile '/u01/oracle/oradata/gssd/test1.dbf'
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u01/oracle/oradata/gssd/system01.dbf'
页: [1]
查看完整版本: test 表空间文件被破坏删除,无备份,如何启动数据库