日期:2014-05-17  浏览次数:20676 次

这到底是为了什么???
本帖最后由 ZiSheng 于 2012-12-03 15:00:07 编辑 原帖在这里http://bbs.csdn.net/topics/390302016

C:\Users\Administrator>sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 4 14:43:36 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  574619648 bytes
Fixed Size                  2067368 bytes
Variable Size             159384664 bytes
Database Buffers          406847488 bytes
Redo Buffers                6320128 bytes
SQL> alter system set control_files='Z:\TESTORCL\HISDATABASE\ORADATA\ORCL\CONTRO
L01.CTL','Z:\TESTORCL\HISDATABASE\ORADATA\ORCL\CONTROL02.CTL','Z:\TESTORCL\HISDA
TABASE\ORADATA\ORCL\CONTROL03.CTL' scope=spfile;

System altered.

SQL> alterdatabase open;
SP2-0734: unknown command beginning "alterdatab..." - rest of line ignored.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01507: database not mounted


SQL> startup mount;
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01507: database not mounted


SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL>

我在nomount的状态下,设置了控制文件,可是在改为open状态时,告诉我说,database not mounted;这是为什么???

------最佳解决方案--------------------
顺序:
startup nomount;
alter database mount;
alter database open;

没 mount,就不许 open。呵呵。
------其他解决方案--------------------
修改ctl后要先shutdown immediate或者直接start force
------其他解决方案--------------------
引用:
顺序:
startup nomount;
alter database mount;
alter database open;

没 mount,就不许 open。呵呵。

太谢谢了,不胜感激,结贴给分。