在Windows上命令行如何手工起停Oracle
2024-08-29 13:35:21
供稿:網友
 
             
在命令行我們可以用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 2006Copyright (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 optionsSQL> select 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_<SID>_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 2006Copyright (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 optionsSQL> select 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 2006Copyright (c) 1982, 2005, Oracle.  All rights reserved.已連接到空閑例程。      SQL>