win下手工启停数据库
轉(zhuǎn)自:http://www.100test.com/html/142/s_142938_14.htm
?
在命令行我們可以用net命令手工啟動(dòng)Oracle服務(wù):
C:/>net start oracleserviceeygle
OracleServiceEYGLE 服務(wù)正在啟動(dòng) ..............
OracleServiceEYGLE 服務(wù)已經(jīng)啟動(dòng)成功。
在正常情況下,數(shù)據(jù)庫即可隨之啟動(dòng),如果數(shù)據(jù)庫不能啟動(dòng),則可以通過sysdba身份連接進(jìn)入數(shù)據(jù)庫,手工mount并Open數(shù)據(jù)庫
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 服務(wù)正在停止......
OracleServiceEYGLE 服務(wù)已成功停止。
在Windows上,使用net命令能否啟動(dòng)數(shù)據(jù)庫,還受到一個(gè)注冊(cè)表參數(shù)的影響,這個(gè)參數(shù)是:ORA__AUTOSTART
對(duì)于我的Oracle10g數(shù)據(jù)庫,這個(gè)鍵值位于HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/KEY_Ora10g,我的數(shù)據(jù)庫SID為eygle,這個(gè)參數(shù)就是:ORA_EYGLE_AUTOSTART
當(dāng)這個(gè)參數(shù)設(shè)置為True時(shí),當(dāng)我們啟動(dòng)服務(wù)時(shí),Oracle數(shù)據(jù)庫就會(huì)隨之啟動(dòng);反之,數(shù)據(jù)庫就不會(huì)啟動(dòng)。
測(cè)試1,ORA_EYGLE_AUTOSTART=true時(shí):
C:/>net start oracleserviceeygle
OracleServiceEYGLE 服務(wù)正在啟動(dòng) .....................
OracleServiceEYGLE 服務(wù)已經(jīng)啟動(dòng)成功。
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
測(cè)試2,ORA_EYGLE_AUTOSTART=FALSE時(shí):
C:/>net start oracleserviceeygle
OracleServiceEYGLE 服務(wù)正在啟動(dòng) .
OracleServiceEYGLE 服務(wù)已經(jīng)啟動(dòng)成功。
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>
總結(jié)
以上是生活随笔為你收集整理的win下手工启停数据库的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 无法删除当前已连接的用户处理办法
- 下一篇: 这些水吸收的热量