LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-SEP-2012 14:19:49
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
查看命令行 lsnrctl 的使用方法: LSNRCTL> help The following operations are available An asterisk (*) denotes a modifier or extended command:
TNSLSNR for Linux: Version 10.2.0.1.0 - Production System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat4)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat4)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production Start Date 22-SEP-2012 14:20:13 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/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat4)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Services Summary... Service "PL***tProc" has 1 instance(s). Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
利用命令行 lsnrctl status 查看监听器的状态: [oracle@redhat4 ~]$ lsnrctl status;
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-SEP-2012 14:23:43
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat4)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production Start Date 22-SEP-2012 14:20:13 Uptime 0 days 0 hr. 3 min. 30 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat4)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Services Summary... Service "PL***tProc" has 1 instance(s). Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service... Service "jiagulun" has 1 instance(s).
Instance "jiagulun", status READY, has 1 handler(s) for this service... Service "jiagulunXDB" has 1 instance(s). Instance "jiagulun", status READY, has 1 handler(s) for this service... Service "jiagulun_XPT" has 1 instance(s). Instance "jiagulun", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@redhat4 ~]$
3. 利用 emctl 来管理em: 查看emctl 使用方法: [oracle@redhat4 ~]$ emctl 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. Invalid arguments
emctl set ssl test|off|on em emctl set ldap emctl blackout options can be listed by typing "emctl blackout" emctl config options can be listed by typing "emctl config" emctl secure options can be listed by typing "emctl secure" emctl ilint options can be listed by typing "emctl ilint" emctl deploy options can be listed by typing "emctl deploy"
利用 emctl start dbconsole 启动em: [oracle@redhat4 ~]$ 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.
Starting Oracle Enterprise Manager 10g Database Control ................. started. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/redhat4_jiagulun/sysman/log
利用 emctl status dbconsole 查看em的状态: [oracle@redhat4 ~]$ emctl status 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.
Oracle Enterprise Manager 10g is running. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/redhat4_jiagulun/sysman/log
利用 emctl status dbconsole 关闭em: [oracle@redhat4 ~]$ emctl stop 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.
-config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [parameters]: configure Database Control for a database
-config centralAgent (db | asm) [-cluster] [-silent] [parameters]: configure central agent management
-config all db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [parameters]: configure both Database Control and central agent management
-deconfig dbcontrol db [-repos drop] [-cluster] [-silent] [parameters]: de-configure Database Control
-deconfig centralAgent (db | asm) [-cluster] [ -silent] [parameters]: de-configure central agent management
-deconfig all db [-repos drop] [-cluster] [-silent] [parameters]: de-configure both Database Control and central agent management
-addInst (db | asm) [-silent] [parameters]: configure EM for a new RAC instance
-deleteInst (db | asm) [-silent] [parameters]: de-configure EM for a specified RAC instance
-reconfig ports [-cluster] [parameters]: explicitly reassign Database Control ports
-reconfig dbcontrol -cluster [-silent] [parameters]: reconfigures RAC Database Control deployment
-displayConfig dbcontrol -cluster [-silent] [parameters]: displays information about the RAC Database Control configuration
-upgrade (db | asm | db_asm) [-cluster] [-silent] [parameters]: upgrades an earlier version of the EM configuration to the current version
-restore (db | asm | db_asm) [-cluster] [-silent] [parameters]: restores the current version of the EM configuration to an earlier version
对上面参数和选择的解释:
Parameters and Options:
[parameters]: [ -respFile fileName ] [ -paramName paramValue ]* db: perform configuration operation for a database (including databases that use ASM) asm: perform configuration operation for an ASM-only instance db_asm: perform upgrade/restore operation for a database and an ASM instance -repos create: create a new Database Control repository -repos drop: drop the current Database Control repository -repos recreate: drop the current Database Control repository and recreate a new one
-cluster: perform configuration operation for a RAC database
-silent: perform configuration operation without prompting for parameters
-backup: configure automatic backup for a database
Parameters for single instance databases
HOST: Database hostname
SID: Database SID
PORT: Listener port number
ORACLE_HOME: Database ORACLE_HOME
HOST_USER: Host username for automatic backup
HOST_USER_PWD: Host user password for automatic backup
BACKUP_SCHEDULE: Automatic backup schedule (HH:MM)
EMAIL_ADDRESS: Email address for notifications
MAIL_SERVER_NAME: Outgoing Mail (SMTP) server for notifications
ASM_OH: ASM ORACLE_HOME
ASM_SID: ASM SID
ASM_PORT: ASM port
ASM_USER_ROLE: ASM user role
ASM_USER_NAME: ASM username
ASM_USER_PWD: ASM user password
SRC_OH: ORACLE_HOME for the database to be upgraded
DBSNMP_PWD: Password for DBSNMP user
SYSMAN_PWD: Password for SYSMAN user
SYS_PWD: Password for SYS user
DBCONTROL_HTTP_PORT: Database Control HTTP port
AGENT_PORT: EM agent port
RMI_PORT: RMI port for Database Control
JMS_PORT: JMS port for Database Control
Additional Parameters for cluster databases
CLUSTER_NAME: Cluster name
DB_UNIQUE_NAME: Database unique name
SERVICE_NAME: Service name
EM_NODE: Database Control node name
EM_SID_LIST: Agent SID list [comma separated]
[oracle@redhat4 config]$