alter database close ORA-16196 ORA-01531 ORA-01093
如果沒有其它active連線,Oracle10g中可以用alter database close將DB改到mount狀態. 在mount狀態下如果再用alter database open改到open狀態,則會報錯ora-01109.
必須shutdown 之後再open.
好像是說一個週期內(instance存活期間)只能open一次
在9i中,則是報1531錯誤.
在所有版本中,如果有活動會話,在open狀態下alter database close會報
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1258291200 bytes
Fixed Size 1219184 bytes
Variable Size 503317904 bytes
Database Buffers 738197504 bytes
Redo Buffers 15556608 bytes
Database mounted.
SQL> alter database open;
Database altered.
SQL> alter database close;
Database altered.
SQL> !ps -ef |grep ora_
oracle 21473 1 0 13:47 ? 00:00:00 ora_pmon_orcl
oracle 21475 1 0 13:47 ? 00:00:00 ora_psp0_orcl
oracle 21477 1 0 13:47 ? 00:00:00 ora_mman_orcl
oracle 21479 1 0 13:47 ? 00:00:00 ora_dbw0_orcl
oracle 21481 1 0 13:47 ? 00:00:00 ora_lgwr_orcl
oracle 21483 1 0 13:47 ? 00:00:00 ora_ckpt_orcl
oracle 21485 1 0 13:47 ? 00:00:00 ora_smon_orcl
oracle 21487 1 0 13:47 ? 00:00:00 ora_reco_orcl
oracle 21489 1 0 13:47 ? 00:00:00 ora_mmon_orcl
oracle 21491 1 0 13:47 ? 00:00:00 ora_mmnl_orcl
oracle 21495 1 0 13:47 ? 00:00:00 ora_rvwr_orcl
oracle 21516 21038 0 13:48 pts/2 00:00:00 /bin/bash -c ps -ef |grep ora_
oracle 21518 21516 0 13:48 pts/2 00:00:00 grep ora_
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-16196: database has been previously opened and closed
總之, 雖然可以用alter database close將open狀態改到mount,但無法再改回來.
所以,這引命令其餘是沒有作用的. 正常的關停還是走shutdown ,startup 就可以了.
並且 <
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/94384/viewspace-600666/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Close a Database (303)Database
- alter database in OracleDatabaseOracle
- alter database datafile offline and alter database tablespace ...offlineDatabase
- alter database create datafileDatabase
- alter database create datafile '' as ''Database
- alter database和alter system和alter session的區別DatabaseSession
- alter database open resetlogs;Database
- alter database offline 與 alter database offline drop效果比對Database
- alter database disable thread 2Databasethread
- ALTER DATABASE RESETLOGS 的作用Database
- DATA GUARD 中alter database 命令Database
- ALTER DATABASE DATAFILE OFFLINEDatabase
- ALTER DATABASE 與 ALTER TABLESPACE OFFLINE的區別Database
- 忍不住問下alter system 和alter database的區別Database
- Oracle DBA命令參考——alter databaseOracleDatabase
- Close the Database by Terminating the Instance (304)Database
- ALTER DATABASE CLEAR UNARCHIVED LOGFILE的使用DatabaseHive
- alter database ... create datafile的原理及用途Database
- alter database datafile 4 offline drop;Database
- 恢復一則 alter database create datafile '' as ''Database
- alter database datafile offline drop 與 alter tablespace drop datafile 區別Database
- Alter database datafile resize ORA-03297 原因解析Database
- UNRECOVERABLE DATAFILE clause in the ALTER DATABASE CLEAR LOGFILE statementDatabase
- VMS: ALTER TABLESPACE/DATABASE TO RENAME FILES on VMS [ID 9560.1]Database
- 12C-ORA-65086: cannot open/close the pluggable databaseDatabase
- alter database datafile .... offline drop的問題Database
- alter database backup controlfile to trace的問題Database
- 在alter database mount時的一點收穫Database
- alter database backup controlfile to trace的含義Database
- can close the database Connection before the JTA transaction commit or rollDatabaseMIT
- 重建控制檔案--alter database backup controlfile to traceDatabase
- alter database drop datafile 與 drop tablespace file 的區別Database
- alter database datafile offline drop相關問題Database
- ORA-279 signalled during: alter database recover logfileDatabase
- 425alter database force logging修改那裡Database
- 部署 11G 物理DataGuard時 ALTER DATABASE OPEN 報錯Database
- Oracle11gr2新增ALTER DATABASE LINK語法OracleDatabase
- ORA-1113 signalled during: alter database open...Database