ITPub博客

首页 > 数据库 > Oracle > 11g单机创建database control遇到的问题

11g单机创建database control遇到的问题

原创 Oracle 作者:startforever 时间:2014-11-20 14:16:55 0 删除 编辑
11g database 单机创建database control,遇到问题:
(1) listener 没起,lsnrctl start
(2)日志报 没权限:orapwd 重建密码文件
(3)ORACLE_UNQNAME  export ORACLE_UNQNAME=$ORACLE_SID 
(4)手工建库后,有些脚本没执行:补执行(看提示)



Connected to an idle instance.


SQL> startup ;
ORACLE instance started.


Total System Global Area  836976640 bytes
Fixed Size    1339740 bytes
Variable Size  507514532 bytes
Database Buffers  322961408 bytes
Redo Buffers    5160960 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rhel6 ~]$ lsnrctl status


LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-NOV-2014 13:39:35


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


Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@rhel6 ~]$ lsnrctl start


LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-NOV-2014 13:39:41


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


Starting /u01/app/oracle/product/11.2.0/bin/tnslsnr: please wait...


TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/rhel6/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6)(PORT=1521)))


Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                20-NOV-2014 13:39:41
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/rhel6/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@rhel6 ~]$ clear;
[oracle@rhel6 ~]$ emca -config dbcontrol db -repos recreate


STARTED EMCA at Nov 20, 2014 1:40:20 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.


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


You have specified the following settings


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


Local hostname ................ rhel6
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0
Listener port number ................ 1521
Database SID ................ ocm
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 


-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Nov 20, 2014 1:40:46 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/ocm/emca_2014_11_20_13_40_19.log.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ocm/emca_2014_11_20_13_40_19.log for more details.
Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ocm/emca_2014_11_20_13_40_19.log for more details.
[oracle@rhel6 ~]$ tail -100 ^C
[oracle@rhel6 ~]$ tail -100 /u01/app/oracle/cfgtoollogs/emca/ocm/emca_2014_11_20_13_40_19.log
CONFIG: No value was set for the parameter DBCONTROL_HTTP_PORT.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter AGENT_PORT_rhel6.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter AGENT_PORT.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.OUIInventoryUtil setOUILoc
CONFIG: Setting oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0/oui
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager markAllUsedPorts
CONFIG: Homes to scan for used ports: [/u01/app/oracle/product/11.2.0]
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager markAllUsedPorts
CONFIG: Searching all DBConsole instances for used ports under ORACLE_HOME /u01/app/oracle/product/11.2.0
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager markAllUsedPorts
CONFIG: Marking JMS port: null from /u01/app/oracle/product/11.2.0/oc4j/j2ee/OC4J_DBConsole
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager markAllUsedPorts
CONFIG: Marking RMI port: null from /u01/app/oracle/product/11.2.0/oc4j/j2ee/OC4J_DBConsole
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager markAllUsedPorts
CONFIG: Marking HTTP port: null from /u01/app/oracle/product/11.2.0/oc4j/j2ee/OC4J_DBConsole
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager getAgentPort
CONFIG: Cannot parse EMD_URL correctly. No port identified
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager markAllUsedPorts
CONFIG: Marking Agent port: null from /u01/app/oracle/product/11.2.0/sysman/config/emd.properties
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager markAllUsedPorts
CONFIG: Cannnot parse EMD_URL correctly. No port identified
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.FileUtil getProperties
CONFIG: Error reading file /u01/app/oracle/product/11.2.0/install/staticports.ini
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.PortManager getFreePorts
CONFIG: /u01/app/oracle/product/11.2.0:rhel6:null:ocm:{}:null:{DBCONTROL_HTTP_PORT=1158, RMI_PORT=5520, JMS_PORT=5540, AGENT_PORT=3938}
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter AGENT_PORT_rhel6.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: AGENT_PORT_rhel6 value: 3938
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter DBCONTROL_HTTP_PORT_rhel6.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: DBCONTROL_HTTP_PORT_rhel6 value: 1158
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter JMS_PORT_rhel6.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: JMS_PORT_rhel6 value: 5540
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter RMI_PORT_rhel6.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: RMI_PORT_rhel6 value: 5520
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.EMDBPreConfig getFreePorts
CONFIG: Ports assigned for Node: rhel6 : {DBCONTROL_HTTP_PORT=1158, RMI_PORT=5520, JMS_PORT=5540, AGENT_PORT=3938}
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.ClusterUtil getLocalNode
CONFIG: isLocalNodeDone: true localNode: null
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.EMDBPreConfig copyAgentTimeStampFile
CONFIG: File: /u01/app/oracle/product/11.2.0/rhel6_ocm/sysman/emd/agntstmp.txt:rhel6 does not exists.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
CONFIG:  connectDesc : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel6)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ocm)))
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getHost
CONFIG: Host having instnces running for database ocm : rhel6
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: REP_DB_RUNNING_HOST value: rhel6
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager getRepDbPort
CONFIG: Listener Port: 1521
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.GeneralUtil isLocalConnectionRequired
CONFIG: isLocalConnectionRequired: true
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
CONFIG: isLocalConnectionRequired: true. Connecting to database instance locally.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine connecting with SID: ocm, oracleHome: /u01/app/oracle/product/11.2.0, and user: SYS
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine created successfully and connected
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
CONFIG: ORA-01031: insufficient privileges


oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01031: insufficient privileges


at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeSql(SQLEngine.java:1898)
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3230)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:203)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ocm/emca_2014_11_20_13_40_19.log for more details.
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace: 
oracle.sysman.emcp.exception.EMConfigException: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3245)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:203)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Nov 20, 2014 1:40:47 PM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0/oui
[oracle@rhel6 ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 20 13:49:59 2014


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




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> show parameter romote_login
SQL> show parameter remote_


NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_dependencies_mode     string TIMESTAMP
remote_listener     string
remote_login_passwordfile     string EXCLUSIVE
remote_os_authent     boolean FALSE
remote_os_roles     boolean FALSE
result_cache_remote_expiration     integer 0
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rhel6 ~]$ orapwd
Usage: orapwd file= entries= force= ignorecase= nosysdba=


  where
    file - name of password file (required),
    password - password for SYS will be prompted if not specified at command line,
    entries - maximum number of distinct DBA (optional),
    force - whether to overwrite existing file (optional),
    ignorecase - passwords are case-insensitive (optional),
    nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
    
  There must be no spaces around the equal-to (=) character.
[oracle@rhel6 ~]$ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=sys entries=5
[oracle@rhel6 ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 20 13:51:49 2014


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




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> conn sys/sys as sysdba
Connected.
SQL> show user;
USER is "SYS"
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rhel6 ~]$ emca -config dbcontrol db -repos recreate


STARTED EMCA at Nov 20, 2014 1:52:11 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.


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


You have specified the following settings


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


Local hostname ................ rhel6
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0
Listener port number ................ 1521
Database SID ................ ocm
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 


-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Nov 20, 2014 1:52:33 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/ocm/emca_2014_11_20_13_52_11.log.
Nov 20, 2014 1:52:33 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Nov 20, 2014 1:52:35 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Nov 20, 2014 1:52:35 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Nov 20, 2014 1:56:44 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Nov 20, 2014 1:56:47 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 20, 2014 1:57:19 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 20, 2014 1:57:20 PM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for rhel6
Nov 20, 2014 1:57:22 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Nov 20, 2014 1:57:22 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Nov 20, 2014 1:57:46 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Nov 20, 2014 1:57:46 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 20, 2014 1:59:09 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Nov 20, 2014 1:59:09 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 20, 2014 1:59:37 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 20, 2014 1:59:37 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://rhel6:1158/em <<<<<<<<<<<
Nov 20, 2014 1:59:40 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING: 
************************  WARNING  ************************


Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/rhel6_ocm/sysman/config/emkey.ora.   Please ensure this file is backed up as the encrypted data will become unusable if this file is lost. 


***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 20, 2014 1:59:40 PM
[oracle@rhel6 ~]$ 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28743704/viewspace-1340280/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-03-22

  • 博文量
    106
  • 访问量
    65505