啟動資料庫的命令

2021-04-27 15:50:51 字數 3237 閱讀 2964

[root@localhost root]# su - oracle

[oracle@localhost oracle]$ sqlplus '/ as sysdba'

sql*plus: release 9.2.0.4.0 - production on 星期一 4月 10 10:41:53 2006

connected to an idle instance.

sql> startup

oracle instance started.

total system global area 1294539092 bytes

fixed size                   452948 bytes

variable size             553648128 bytes

database buffers          738197504 bytes

redo buffers                2240512 bytes

database mounted.

database opened.

sql> quit

disconnected from oracle9i enterprise edition release 9.2.0.4.0 - production

with the partitioning, olap and oracle data mining options

jserver release 9.2.0.4.0 - production

[oracle@localhost oracle]$ su root

password:

[root@localhost oracle]# ls

[root@localhost oracle]# pwd

/home/oracle

[root@localhost oracle]# lsnrctl start       //必須以oracle使用者執行此命令,所以需先執行su oracle

lsnrctl for linux: version 9.2.0.4.0 - production on 10-4月 -2006 10:45:02

starting /opt/ora9/product/9.2/bin/tnslsnr: please wait...

tnslsnr for linux: version 9.2.0.4.0 - production

nl-00280: error creating log stream /opt/ora9/product/9.2/network/log/listener.log

nl-00278: cannot open log file

snl-00016: snlfohd: error opening file

linux error: 13: permission denied

listener failed to start. see the error message(s) above...   //使用者為非oracle使用者而被拒絕

[root@localhost oracle]# su oracle

[oracle@localhost oracle]$ lsnrctl start

lsnrctl for linux: version 9.2.0.4.0 - production on 10-4月 -2006 10:46:16

starting /opt/ora9/product/9.2/bin/tnslsnr: please wait...

tnslsnr for linux: version 9.2.0.4.0 - production

system parameter file is /opt/ora9/product/9.2/network/admin/listener.ora

log messages written to /opt/ora9/product/9.2/network/log/listener.log

listening on: (description=(address=(protocol=ipc)(key=extproc)))

listening on: (description=(address=(protocol=tcp)(host=172.25.88.89)(port=1521)))

connecting to (description=(address=(protocol=ipc)(key=extproc)))

status of the listener

alias                     listener

version                   tnslsnr for linux: version 9.2.0.4.0 - production

start date                10-4月 -2006 10:46:16

uptime                    0 days 0 hr. 0 min. 0 sec

trace level               off

security                  off

snmp                      off

listener parameter file   /opt/ora9/product/9.2/network/admin/listener.ora

listener log file         /opt/ora9/product/9.2/network/log/listener.log

listening endpoints summary...

(description=(address=(protocol=ipc)(key=extproc)))

(description=(address=(protocol=tcp)(host=172.25.88.89)(port=1521)))

services summary...

service "pl***tproc" has 1 instance(s).

instance "pl***tproc", status unknown, has 1 handler(s) for this service...

service "test2" has 1 instance(s).

instance "test2", status unknown, has 1 handler(s) for this service...

the command completed successfully

資料庫啟動

資料庫啟動分為三個階段 1,nomount 在此階段,資料庫會首先讀取spfilesid檔案,作為啟動引數檔案 如果無此檔案,再尋找spfile檔案。最後尋找initsid.ora 檔案。如果三個檔案都無,則將不能啟動。oracle home dbs initsid.ora 2,mount 在此階段...

資料庫啟動

資料庫的啟動 startup 啟動乙個資料庫須要三個步驟 1 建立乙個oracle例項 非安裝階段 2 由例項安裝資料庫 安裝階段 3 開啟資料庫 開啟階段 在startup命令中。可以通過不同的選項來控制資料庫的不同啟動步驟。1 startup nomount nomount選項只建立乙個orac...

資料庫啟動

例項和資料庫是獨立實體,可以獨立存在。啟動過程分成多個階段 1.在記憶體中構建例項 2.通重載入控制檔案啟用到資料庫的連線 3.開啟資料庫使用它。在任意時刻,資料庫將處於以下4種狀態之一 shutdown 將關閉與資料庫相關的所有檔案,同時例項並不存在。nomount 例項已構建在記憶體中 已根據引...