时间:2021-07-01 10:21:17 帮助过:37人阅读
在RedHat Linux环境下手工启动/关闭Oracle 服务
在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.
: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.
: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 ~]$
,