在RedHat Linux環境下設定手工啟動Oracle 10g資料庫
1、修改檔案/oracle/product/10.2.0/db_1/bin/dbstart
# vi /oracle/product/10.2.0/db_1/bin/dbstart
將以下內容修改為:
ORACLE_HOME_LISTNER=/oracle/product/10.2.0/db_1/(將oracle監聽的路徑修改正確)
2、修改檔案etc/oratab (如果沒有此檔案,請執行/oracle/product/10.2.0/db_1目錄下的root.sh檔案,完成10g安裝會提示你運行此指令碼)
# vi etc/oratab --此使用者必須是root
將以下內容修改:
SiebelDB:/oracle/product/10.2.0/db_1:Y --(將N修改成Y,注意必須大寫)
開始啟動oracle資料庫:
[oracle@crmdb ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-APR-2012 16:21:36
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=crmdb)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 17-APR-2012 16:21:37
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=crmdb)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@crmdb ~]$ dbstart
Processing Database instance "SiebelDB": log file /oracle/product/10.2.0/db_1/st artup.log
[oracle@crmdb ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://crmdb:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ............................. started.
------------------------------------------------------------------
Logs are generated in directory /oracle/product/10.2.0/db_1/crmdb_SiebelDB/sysman/log
[oracle@crmdb ~]$
關閉oracle10g服務
停止EM服務 :emctl stop dbconsole
停止oracle服務:dbshut
停止監聽服務:lsnrctl stop
[oracle@crmdb ~]$ lsnrctl stop
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-MAY-2012 22:13:18
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
The command completed successfully
[oracle@crmdb ~]$
emctl status dbconsole --查看EM狀態
安裝了2個執行個體的話,自動啟動第一執行個體的EM後,輸入如下命令啟動第二執行個體的EM
[oracle@crmdb ~]$ export ORACLE_SID=UATDB --UATDB 是第二執行個體的SID
[oracle@crmdb ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://crmdb:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control .............................. started.
------------------------------------------------------------------
Logs are generated in directory /oracle/product/10.2.0/db_1/crmdb_UATDB/sysman/log
[oracle@crmdb ~]$