win下手工启停数据库
轉自:http://www.100test.com/html/142/s_142938_14.htm
?
在命令行我們可以用net命令手工啟動Oracle服務:
C:/>net start oracleserviceeygle
OracleServiceEYGLE 服務正在啟動 ..............
OracleServiceEYGLE 服務已經啟動成功。
在正常情況下,數據庫即可隨之啟動,如果數據庫不能啟動,則可以通過sysdba身份連接進入數據庫,手工mount并Open數據庫
C:/>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 8月 18 11:17:16 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> 0select instance_name from v$instance.
INSTANCE_NAME
----------------
eygle
SQL> exit
從 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 斷開
停止同樣很簡單,net命令,一行即可:
C:/>net stop oracleserviceeygle
OracleServiceEYGLE 服務正在停止......
OracleServiceEYGLE 服務已成功停止。
在Windows上,使用net命令能否啟動數據庫,還受到一個注冊表參數的影響,這個參數是:ORA__AUTOSTART
對于我的Oracle10g數據庫,這個鍵值位于HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/KEY_Ora10g,我的數據庫SID為eygle,這個參數就是:ORA_EYGLE_AUTOSTART
當這個參數設置為True時,當我們啟動服務時,Oracle數據庫就會隨之啟動;反之,數據庫就不會啟動。
測試1,ORA_EYGLE_AUTOSTART=true時:
C:/>net start oracleserviceeygle
OracleServiceEYGLE 服務正在啟動 .....................
OracleServiceEYGLE 服務已經啟動成功。
C:/>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 8月 22 09:27:35 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> 0select instance_name from v$instance.
INSTANCE_NAME
----------------
eygle
測試2,ORA_EYGLE_AUTOSTART=FALSE時:
C:/>net start oracleserviceeygle
OracleServiceEYGLE 服務正在啟動 .
OracleServiceEYGLE 服務已經啟動成功。
C:/>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 8月 22 09:30:03 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
已連接到空閑例程。
SQL>
總結
以上是生活随笔為你收集整理的win下手工启停数据库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 无法删除当前已连接的用户处理办法
- 下一篇: 这些水吸收的热量