在RedHat Linux環境下手工啟動/關閉Oracle 服務

來源:互聯網
上載者:User

在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 ~]$

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.