今天在用DBCA建库时发现报如下错误:Enterprise manager configuration succeeded with the following warnings
Error securing Database Control, Database Control has been brought up in non-secure mode. To secure the Database Control execute the following command(s):
1) Set the environment variable ORACLE_SID to orcl
2) /u01/app/oracle/product/10.2.0/db_2/bin/emctl stop dbconsole
3) /u01/app/oracle/product/10.2.0/db_2/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/10.2.0/db_2/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/10.2.0/db_2/bin/emctl start dbconsole
To secure Em Key, run /u01/app/oracle/product/10.2.0/db_2/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
去metalink找,发现说是Oracle的一个bug,因此需要打个补丁,补丁见附件。
具体操作如下:
bash-3.2$ unzip p8350262_10204_Generic.zip
bash-3.2$ cd 8350262/
bash-3.2$ ls
README.txt etc files killDBConsole killDBConsole.pl
bash-3.2$ $ORACLE_HOME/OPatch/opatch apply
Invoking OPatch 10.2.0.4.2
Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/10.2.0/db_2
Central Inventory : /u01/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /u01/app/oracle/product/10.2.0/db_2/oui
Log file location : /u01/app/oracle/product/10.2.0/db_2/cfgtoollogs/opatch/opatch2013-10-01_21-30-30PM.log
ApplySession applying interim patch '8350262' to OH '/u01/app/oracle/product/10.2.0/db_2'
Running prerequisite checks...
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '8350262' for restore. This might take a while...
Backing up files affected by the patch '8350262' for rollback. This might take a while...
Patching component oracle.sysman.agent.core, 10.2.0.4.0a...
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/u01/app/oracle/product/10.2.0/db_2/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/SecConstants.class"
ApplySession adding interim patch '8350262' to inventory
Verifying the update...
Inventory check OK: Patch ID 8350262 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8350262 are present in Oracle Home.
OPatch succeeded.
SQL> select instance_name ,version from v$instance;
INSTANCE_NAME VERSION
---------------- -----------------
orcl 10.2.0.4.0
# 修改sysman的口令
SQL> alter user sysman identified by oracle;
User altered.
修改dbsnmp的口令
SQL> alter user dbsnmp identified by oracle;
User altered.
bash-3.2$ lsnrctl stauts
LSNRCTL for Solaris: Version 10.2.0.4.0 - Production on 01-OCT-2013 22:42:27
Copyright (c) 1991, 2007, Oracle. All rights reserved.
NL-00853: undefined command "stauts". Try "help"
bash-3.2$ lsnrctl status
LSNRCTL for Solaris: Version 10.2.0.4.0 - Production on 01-OCT-2013 22:42:29
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.2.0.4.0 - Production
Start Date 01-OCT-2013 21:33:45
Uptime 0 days 1 hr. 8 min. 44 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/product/10.2.0/db_2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=solaris)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
bash-3.2$ emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
http://solaris:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
bash-3.2$
bash-3.2$ emca -repos drop
STARTED EMCA at Oct 1, 2013 9:34:52 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 1, 2013 9:35:20 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_2/cfgtoollogs/emca/orcl/emca_2013-10-01_09-34-52-PM.log.
Oct 1, 2013 9:35:21 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Oct 1, 2013 9:36:14 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 1, 2013 9:36:14 PM
bash-3.2$ emca -repos create
STARTED EMCA at Oct 1, 2013 9:38:55 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 1, 2013 9:39:12 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_2/cfgtoollogs/emca/orcl/emca_2013-10-01_09-38-55-PM.log.
Oct 1, 2013 9:39:12 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Oct 1, 2013 9:41:11 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 1, 2013 9:41:11 PM
bash-3.2$ emca -config dbcontrol db
STARTED EMCA at Oct 1, 2013 9:42:39 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform. a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1521
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/10.2.0/db_2
Database hostname ................ solaris
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 1, 2013 9:44:01 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_2/cfgtoollogs/emca/orcl/emca_2013-10-01_09-42-39-PM.log.
Oct 1, 2013 9:44:06 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Oct 1, 2013 9:44:18 PM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for solaris
Oct 1, 2013 9:44:22 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 1, 2013 9:44:46 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 1, 2013 9:44:46 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 1, 2013 9:46:22 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 1, 2013 9:46:22 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://solaris:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 1, 2013 9:46:22 PM
# 查看EM database control的当前状态
bash-3.2$ emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://solaris:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_2/solaris_orcl/sysman/log
bash-3.2$
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29669236/viewspace-1165824/
,如需转载,请注明出处,否则将追究法律责任。