ORA-01093錯誤解決
環境是RAC+RAC的DG的10.2.0.5環境
當時是把主備庫開啟,想啟動MRP進程(即時應用),但是執行語句時出現1093錯誤:
SQL> alter database recover managed standby database ;
alter database recover managed standby database
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected
SQL> !oerr ora 1093
01093, 00000, "ALTER DATABASE CLOSE only permitted with no sessions connected"
// *Cause: There is at least one more session other than the current one
// logged into the instance. ALTER DATABASE CLOSE is not permitted.
// *Action: Find the other sessions and log them out and resubmit the command
上面說的很清楚:原因是多於一個的會話串連當前資料庫執行個體。ALTER DATABASE CLOSE is not permitted;
解決辦法是退出該會話;
字面意思沒有很懂,當我查看主備庫狀態時發現備庫處於唯讀狀態:
SQL> select open_mode from gv$database;
OPEN_MODE
----------
READ ONLY
READ ONLY
哎,粗心誤大事啊,啟動即時應用備庫需要在mount狀態下的;
解決辦法是,把備庫啟動到mount狀態下,再執行:
SQL> shutdown immediate;
Database closed.
Database dismounted.
Oracle instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 327155712 bytes
Fixed Size 1273516 bytes
Variable Size 96469332 bytes
Database Buffers 226492416 bytes
Redo Buffers 2920448 bytes
Database mounted.
SQL> alter database recover managed standby database disconnect from session;
Database altered.
ok,問題解決,其實就是要注意啟用MRP,備庫要處於MOUNT狀態下進行
(注意:Oracle 10g,要在mount狀態下,才能開啟MRP。然而11g在open就可以)
Oracle 11g 在RedHat Linux 5.8_x64平台的安裝手冊
Linux-6-64下安裝Oracle 12C筆記
在CentOS 6.4下安裝Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虛擬機器中安裝步驟
Debian 下 安裝 Oracle 11g XE R2