有時我們資料庫需要進入限制模式,比如維護時。那麼,如何才能讓系統進入限制模式呢 ?
1.開啟資料庫直接進入限制模式
startup open restricted;
2.修改開啟的資料庫進行限制模式
alter system enable restricted session;
看監聽服務的狀態:
lsnrctl> status
connecting to (description=(address=(protocol=tcp)(host=dbserver)(port=1521)))
status of the listener
alias listener
version tnslsnr for linux: version 12.1.0.2.0 - production
start date 01-dec-2019 09:50:50
uptime 0 days 5 hr. 16 min. 35 sec
trace level off
security on: local os authentication
snmp off
listening endpoints summary...
(description=(address=(protocol=tcp)(host=dbserver.sztech.com)(port=1521)))
(description=(address=(protocol=ipc)(key=extproc1521)))
services summary...
service "cdb1" has 1 instance(s).
instance "cdb1", status restricted, has 1 handler(s) for this service...
service "cdb1xdb" has 1 instance(s).
instance "cdb1", status restricted, has 1 handler(s) for this service...
service "emrep" has 1 instance(s).
instance "emrep", status ready, has 1 handler(s) for this service...
service "emrepxdb" has 1 instance(s).
instance "emrep", status ready, has 1 handler(s) for this service...
service "orcl" has 1 instance(s).
instance "orcl", status restricted, has 1 handler(s) for this service...
service "orclxdb" has 1 instance(s).
instance "orcl", status restricted, has 1 handler(s) for this service...
service "pdb1_1" has 1 instance(s).
instance "cdb1", status restricted, has 1 handler(s) for this service...
service "pdb2" has 1 instance(s).
instance "cdb1", status restricted, has 1 handler(s) for this service...
the command completed successfully
lsnrctl>
如何進入mysql資料庫
語法如下 mysql h主機位址 u使用者名稱 p使用者密碼 1 例1 連線到本機上的mysql 首先在開啟 dos視窗,然後進入 目錄mysqlbin,再鍵入命令mysql uroot p,回車後提示你輸密碼,如果剛安裝好mysql,超級使用者root是沒有密碼的,故直接回車即可進入到mysql中...
如何進入MySQL
c users 電腦id d d cd d wamp wamp64 bin mysql mysql5.7.19 bin d wamp wamp64 bin mysql mysql5.7.19 bin mysql hlocalhost uroot p enter password welcome to...
進入mysql資料庫
mysql h 主機位址 u使用者名稱 p使用者密碼1 例 1 連線到本機上的 mysql 首先在開啟 dos視窗,然後進入 目錄 mysql bin 再鍵入命令 mysql uroot p 回車後提示你輸密碼,如果剛安裝好 mysql 超級使用者 root 是沒有密碼的,故直接回車即可進入到 my...