Grid Control的启动及关闭步骤

实际上官方的文档上有详细的介绍,但是对于Grid Control不太熟悉人来说,不仅文档位置不好找而且总被那些通用$ORACLE_HOME变量所迷惑。还是决定在此做个备忘及分享。
一、Stopping Grid Control and All Its Components

[oracle@ocm2 ~]$ cd $ORACLE_HOME
[oracle@ocm2 db10g]$ cd ..
[oracle@ocm2 OracleHome]$ ls
agent10g db10g oms10g
进入OMS主目录:
[oracle@ocm2 OracleHome]$ cd oms10g/
[oracle@ocm2 oms10g]$ cd bin/


1、停止OMS服务
[oracle@ocm2 bin]$ ./emctl stop oms
Oracle Enterprise Manager 10g Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Oracle Management Server is Down.

2、停止Application Server Control Console
[oracle@ocm2 bin]$ ./emctl stop iasconsole
Oracle Enterprise Manager 10g Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.

Stopping Oracle 10g Application Server Control ... ... Stopped.

3、切换目录至OPMN并停止Application Server components
[oracle@ocm2 bin]$ cd ..
[oracle@ocm2 oms10g]$ cd opmn/bin/
[oracle@ocm2 bin]$ ./opmnctl stopall
opmnctl: stopping opmn and all managed processes...

4、切换目录并停止agent
[oracle@ocm2 bin]$ cd ..
[oracle@ocm2 opmn]$ cd ..
[oracle@ocm2 oms10g]$ pwd
/u01/app/oracle/OracleHome/oms10g
[oracle@ocm2 oms10g]$ cd ..
[oracle@ocm2 OracleHome]$ pwd
/u01/app/oracle/OracleHome
[oracle@ocm2 OracleHome]$ cd agent10g/bin/
[oracle@ocm2 bin]$ ./emctl stop agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0. 
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.

5、停止Repository数据库
[oracle@ocm2 bin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 12 05:17:22 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

6、停止Repository数据库监听程序
[oracle@ocm2 bin]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-DEC-2012 05:18:11

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(PORT=1521)))
The command completed successfully


二、Starting Grid Control and All Its Components

如果服务器上有两个或以上的数据库,则需要通过export ORACLE_SID=abc 等语法制定Repository数据库所对应的SID。

1、启动Repository数据库对应的监听程序和数据库
[oracle@ocm2 ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-DEC-2012 05:35:39

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /u01/app/oracle/OracleHome/db10g/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/OracleHome/db10g/network/admin/listener.ora
Log messages written to /u01/app/oracle/OracleHome/db10g/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm2)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 12-DEC-2012 05:35:39
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/OracleHome/db10g/network/admin/listener.ora
Listener Log File /u01/app/oracle/OracleHome/db10g/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm2)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@ocm2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 12 05:35:47 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 448790528 bytes
Fixed Size 1219904 bytes
Variable Size 276824768 bytes
Database Buffers 163577856 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

2、切换路径并启动OMS
[oracle@ocm2 ~]$ cd $ORACLE_HOME
[oracle@ocm2 db10g]$ cd ..
[oracle@ocm2 OracleHome]$ ls
agent10g db10g oms10g
[oracle@ocm2 OracleHome]$ cd oms10g/bin/
[oracle@ocm2 bin]$ ./emctl start oms
Oracle Enterprise Manager 10g Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
opmnctl: opmn started
Starting HTTP Server ...
Starting Oracle Management Server ...
Checking Oracle Management Server Status ...
Oracle Management Server is Up.

3、切换路径启动OracleAS Web Cache
[oracle@ocm2 bin]$ cd ..
[oracle@ocm2 oms10g]$ cd opmn/bin/
[oracle@ocm2 bin]$ ./opmnctl startproc ias-component=WebCache
opmnctl: starting opmn managed processes...

4、切换路径并启动agent
[oracle@ocm2 bin]$ cd ..
[oracle@ocm2 opmn]$ cd ..
[oracle@ocm2 oms10g]$ cd ..
[oracle@ocm2 OracleHome]$ pwd
/u01/app/oracle/OracleHome
[oracle@ocm2 OracleHome]$ ls
agent10g db10g oms10g
[oracle@ocm2 OracleHome]$ cd agent10g/
[oracle@ocm2 agent10g]$ cd bin/
[oracle@ocm2 bin]$ ./emctl start agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0. 
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Starting agent ........ started.
[oracle@ocm2 bin]$ cd ..
[oracle@ocm2 agent10g]$ cd ..
[oracle@ocm2 OracleHome]$ ls
agent10g db10g oms10g

以上官方文档上的步骤,但是这样执行完后是否正常启动完毕就需要用如下命令查看:
[oracle@ocm2 OracleHome]$ cd oms10g/opmn/bin/
[oracle@ocm2 bin]$ ./opmnctl status

Processes in Instance: EnterpriseManager0.ocm2
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status 
-------------------+--------------------+---------+---------
DSA | DSA | N/A | Down 
HTTP_Server | HTTP_Server | 4816 | Alive 
LogLoader | logloaderd | N/A | Down 
dcm-daemon | dcm-daemon | 4783 | Alive 
OC4J | home | N/A | Down 
OC4J | OC4J_EM | 4858 | Alive 
OC4J | OC4J_EMPROV | N/A | Down 
WebCache | WebCache | 4935 | Alive 
WebCache | WebCacheAdmin | 4927 | Alive

以上输出中,status为down的说明没有正常启动完毕,采用 ./opmnctl startall命令启动所有组件,从结果看,还是部分组件未启动成功

[oracle@ocm2 bin]$ ./opmnctl startall
opmnctl: starting opmn and all managed processes...
[oracle@ocm2 bin]$ ./opmnctl status

Processes in Instance: EnterpriseManager0.ocm2
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status 
-------------------+--------------------+---------+---------
DSA | DSA | N/A | Down 
HTTP_Server | HTTP_Server | 4816 | Alive 
LogLoader | logloaderd | N/A | Down 
dcm-daemon | dcm-daemon | 4783 | Alive 
OC4J | home | 6172 | Alive 
OC4J | OC4J_EM | 4858 | Alive 
OC4J | OC4J_EMPROV | 6171 | Alive 
WebCache | WebCache | 4935 | Alive 
WebCache | WebCacheAdmin | 4927 | Alive


因此我们采用如下命令针对那些未启动组件进行独立启动操作:

[oracle@ocm2 bin]$ ./opmnctl startproc ias-component=DSA
opmnctl: starting opmn managed processes...
[oracle@ocm2 bin]$ ./opmnctl startproc ias-component=LogLoader
opmnctl: starting opmn managed processes...

在此查看状态,说明正启动完毕。
[oracle@ocm2 bin]$ ./opmnctl status

Processes in Instance: EnterpriseManager0.ocm2
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status 
-------------------+--------------------+---------+---------
DSA | DSA | 6279 | Alive 
HTTP_Server | HTTP_Server | 4816 | Alive 
LogLoader | logloaderd | 6315 | Alive 
dcm-daemon | dcm-daemon | 4783 | Alive 
OC4J | home | 6172 | Alive 
OC4J | OC4J_EM | 4858 | Alive 
OC4J | OC4J_EMPROV | 6171 | Alive 
WebCache | WebCache | 4935 | Alive 
WebCache | WebCacheAdmin | 4927 | Alive

[oracle@ocm2 bin]$

如果忘记grid control 的URL地址,则可以插叙如下文件:

[oracle@ocm2 bin]$ cd ..
[oracle@ocm2 opmn]$ cd ..
[oracle@ocm2 oms10g]$ cd ..
[oracle@ocm2 OracleHome]$ ls
agent10g db10g oms10g
[oracle@ocm2 OracleHome]$ cd agent10g/sysman/
[oracle@ocm2 sysman]$ ls
admin config emd install j2ee jlib lib log opmn setupinfo.txt
[oracle@ocm2 sysman]$ more setupinfo.txt 
See below for information pertaining to your Enterprise Manager Installation:
1. Use the following URL to access the Enterprise Manager Grid Control:

http://ocm2:4889/em

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值