11:27 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance. --------很显然已经连接到了空闲实例
SYS@ORCL>startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 125830736 bytes
Database Buffers 155189248 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/u01/app/oracle/oradata/ORCL/tyger01.dbf' ---------good ! 问题出现了。
解决办法:
SYS@ORCL>alter database datafile 6 offline drop;
Database altered.
SYS@ORCL>alter database open;
Database altered.
SYS@ORCL>select ts#,file#,name from v$datafile;
TS# FILE# NAME
---------- ---------- --------------------------------------------------
0 1 /u01/app/oracle/oradata/ORCL/system01.dbf
1 2 /u01/app/oracle/oradata/ORCL/undotbs01.dbf
2 3 /u01/app/oracle/oradata/ORCL/sysaux01.dbf
4 4 /u01/app/oracle/oradata/ORCL/users01.dbf
6 5 /u01/app/oracle/oradata/ORCL/example01.dbf
8 6 /u01/app/oracle/oradata/ORCL/tyger01.dbf
6 rows selected.
SYS@ORCL>select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
UNDOTBS1 ONLINE
SYSAUX ONLINE
TEMP ONLINE
USERS ONLINE
EXAMPLE ONLINE
TYGER ONLINE
7 rows selected.
SYS@ORCL>drop tablespace tyger including contents and datafiles;
Tablespace dropped.
SYS@ORCL>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@ORCL>startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 130025040 bytes
Database Buffers 150994944 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.