Bo's Oracle Station

查看: 1228|回复: 0

课程第11次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2019-6-1 08:50:02 | 显示全部楼层 |阅读模式
[oracle@station80 dbhome_1]$ emca
/u01/app/oracle/product/11.2.0/dbhome_1/bin/emca [operation] [mode] [dbType] [fl                                                                             ags] [parameters]

-h | --h | -help | --help: prints this help message
-version: prints the version

-config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup]                                                                              [parameters]: configure Database Control for a database
-config centralAgent (db | asm) [-cluster] [-silent] [parameters]: configure cen                                                                             tral agent management
-config all db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [para                                                                             meters]: configure both Database Control and central agent management

-deconfig dbcontrol db [-repos drop] [-cluster] [-silent] [parameters]: de-confi                                                                             gure Database Control
-deconfig centralAgent (db | asm) [-cluster] [ -silent] [parameters]: de-configu                                                                             re central agent management
-deconfig all db [-repos drop] [-cluster] [-silent] [parameters]: de-configure b                                                                             oth Database Control and central agent management

-addNode (db | asm) [-silent] [parameters]: configure EM for a newly added node                                                                              for a database

-deleteNode (db | asm) [-silent] [parameters]: de-configure EM for for a databas                                                                             e on node getting deleted

-addInst (db | asm) [-silent] [parameters]: configure EM for a new RAC instance
-deleteInst (db | asm) [-silent] [parameters]: de-configure EM for a specified R                                                                             AC instance

-reconfig ports [-cluster] [parameters]: explicitly reassign Database Control po                                                                             rts
-reconfig dbcontrol -cluster [-silent] [parameters]: reconfigures RAC Database C                                                                             ontrol deployment

-displayConfig dbcontrol -cluster [-silent] [parameters]: displays information a                                                                             bout the RAC Database Control configuration

-migrate -from dbcontrol -to centralAgent  [-repos drop] [-cluster] [-silent] [p                                                                             arameters]: migrates EM configuration from Database Control to central agent

-upgrade (db | asm | db_asm) [-cluster] [-silent] [parameters]: upgrades an earl                                                                             ier version of the EM configuration to the current version

-updateTargets crs [-silent] [parameters]: updates new crs home for all dbcontro                                                                             l and central agents on crs upgrade

-restore (db | asm | db_asm) [-cluster] [-silent] [parameters]: restores the cur                                                                             rent 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
        ORACLE_HOSTNAME: Local hostname
        SID: Database SID
        PORT: Listener port number
        ORACLE_HOME: Database ORACLE_HOME
        LISTENER_OH: Listener ORACLE_HOME
        HOST: Listener Host
        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
        EM_SWLIB_STAGE_LOC:  Software library location
        PORTS_FILE: Path to a static file specifying the ports to use (Default v                                                                             alue : ${ORACLE_HOME}/install/staticports.ini).

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_NODE_LIST: Agent Node list [comma separated]

Note: For Desktop Class Install always pass parameter ORACLE_HOSTNAME
      as "localhost" to any emca command

[oracle@station80 dbhome_1]$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Jun 1, 2019 8:45:16 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jun 1, 2019 8:47:08 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/em                                                                             ca_2019_06_01_08_45_16.log.
Jun 1, 2019 8:47:09 AM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be p                                                                             erformed. Some of the possible reasons may be:
1) EM is configured with different hostname then physical host. Set environment                                                                              variable ORACLE_HOSTNAME=<hostname> and re-run EMCA script
2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA script
Jun 1, 2019 8:47:09 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[oracle@station80 dbhome_1]$ emca -config dbcontrol db -repos create

STARTED EMCA at Jun 1, 2019 8:51:47 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: orcl
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/grid ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /u01/app/oracle/product/11.2.0/grid ]:
ASM SID [ +ASM ]:
ASM port [ 1521 ]:
ASM username [ ASMSNMP ]:
ASM user password:
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1

Local hostname ................ station80.example.com
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/grid
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/grid
ASM SID ................ +ASM
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jun 1, 2019 8:53:47 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2019_06_01_08_51_46.log.
Jun 1, 2019 8:53:48 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
--------------------------------------------------
  1. db_name=orcl
  2. db_domain=example.com
  3. control_files='+data/orcl/CONTROLFILE/current.260.1008971239','+FRA/orcl/controlfile/current.256.1008971239'
  4. memory_target=2G
  5. db_recovery_file_dest='+fra'
  6. db_recovery_file_dest_size=5G
  7. undo_tablespace=undotbs1
  8. db_create_file_dest='+data'
  9. compatible=11.2.0.4.0
复制代码
Oracle10g_Views.pdf (209.33 KB, 下载次数: 158)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-20 14:33 , Processed in 0.037734 second(s), 27 queries .

快速回复 返回顶部 返回列表