aix下安装oracle10g遭遇em错误

There are two possible methods for adding in Enterprise Manager. You can use the dbca, or you can use a command line tool called emca. I will be using emca, but before I do, I will show you some common errors you will want to avoid as seen through dbca.

The first error to look at is here:
failed_to_unlock_all_EM-related_accounts.gif

You would think that with a GUI tool like dbca, Oracle would check for that condition before running the scripts to add in the repository, and either fail first or make the necessary change for you.

Rather than doing that, the error comes at the very end, so the install is incomplete. A mess! Let's avoid this error from SQL*Plus like so:
SQL> show parameter job_queue_p

NAME                         TYPE        VALUE
---------------------------- ----------- --------------------
job_queue_processes          integer     0
SQL> alter system set job_queue_processes=1 scope=both;

System altered.

SQL>


The next common error looks like this:
Enterprise Manager Configuration failed due to the following error - failed to unlock all EM-related accounts.

This error can be caused by having the DEFAULT profile inappropriately configured or the MONITORING_PROFILE profile inappropriately configuured. Here is how to get that configuration straight:
SQL> col profile for a10 trun
SQL> col resource_name for a25 trun
SQL> col limit for a10 trun
SQL> SELECT   PROFILE, resource_name, LIMIT
  2    FROM dba_profiles
  3   WHERE resource_type = 'PASSWORD'
  4   ORDER BY 1, 2;

PROFILE    RESOURCE_NAME             LIMIT
---------- ------------------------- ----------
DEFAULT    FAILED_LOGIN_ATTEMPTS     10
DEFAULT    PASSWORD_GRACE_TIME       UNLIMITED
DEFAULT    PASSWORD_LIFE_TIME        UNLIMITED
DEFAULT    PASSWORD_LOCK_TIME        UNLIMITED
DEFAULT    PASSWORD_REUSE_MAX        UNLIMITED
DEFAULT    PASSWORD_REUSE_TIME       UNLIMITED
DEFAULT    PASSWORD_VERIFY_FUNCTION  NULL

7 rows selected.

SQL> -- Default profile is OK, we need a monitoring_profile.
SQL> -- use ALTER PROFILE if the 
SQL> -- monitoring_profile already exists!
SQL> CREATE PROFILE monitoring_profile
  2  LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED
  3  PASSWORD_GRACE_TIME UNLIMITED
  4  PASSWORD_LIFE_TIME UNLIMITED
  5  PASSWORD_LOCK_TIME UNLIMITED
  6  PASSWORD_REUSE_MAX UNLIMITED
  7  PASSWORD_REUSE_TIME UNLIMITED
  8  PASSWORD_VERIFY_FUNCTION NULL;

Profile created.

SQL> -- make sure the user dbsnmp is assigned to 
SQL> -- the monitoring_profile:
SQL> ALTER USER dbsnmp PROFILE monitoring_profile;

User altered.

SQL> col profile for a19 trun
SQL> SELECT   PROFILE, resource_name, LIMIT
  2    FROM dba_profiles
  3   WHERE resource_type = 'PASSWORD'
  4   ORDER BY 1, 2;

PROFILE             RESOURCE_NAME             LIMIT
------------------- ------------------------- ----------
DEFAULT             FAILED_LOGIN_ATTEMPTS     10
DEFAULT             PASSWORD_GRACE_TIME       UNLIMITED
DEFAULT             PASSWORD_LIFE_TIME        UNLIMITED
DEFAULT             PASSWORD_LOCK_TIME        UNLIMITED
DEFAULT             PASSWORD_REUSE_MAX        UNLIMITED
DEFAULT             PASSWORD_REUSE_TIME       UNLIMITED
DEFAULT             PASSWORD_VERIFY_FUNCTION  NULL
MONITORING_PROFILE  FAILED_LOGIN_ATTEMPTS     UNLIMITED
MONITORING_PROFILE  PASSWORD_GRACE_TIME       UNLIMITED
MONITORING_PROFILE  PASSWORD_LIFE_TIME        UNLIMITED
MONITORING_PROFILE  PASSWORD_LOCK_TIME        UNLIMITED
MONITORING_PROFILE  PASSWORD_REUSE_MAX        UNLIMITED
MONITORING_PROFILE  PASSWORD_REUSE_TIME       UNLIMITED
MONITORING_PROFILE  PASSWORD_VERIFY_FUNCTION  NULL

14 rows selected.

SQL>
SQL> select PROFILE
  2  FROM dba_users WHERE username = 'DBSNMP';

PROFILE
-------------------
MONITORING_PROFILE

SQL> -- that is the correct configuration.



Make one final check that you can login using SYS AS SYSDBA using a network connection (using the "@" symbol to go through TNS):
[oracle@x7000 admin]$ sqlplus sys@qtest as sysdba

SQL*Plus: Release 10.2.0.2.0 - Production on Thu Jun 22 2006

Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

Enter password: ********

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

SQL> -- a successful login for sys@qtest as sysdba verifies both 
SQL> -- the tnsnames.ora entry and the password file!



We are now ready to create the Enterprise Manager Repository. You can use dbca to do this, but there is also a command line tool called emca that can be used. This tool is used from the bash shell, not from SQL*Plus. I will use emca for this demonstration. Emca has many different commands. Type emca without any parameters to view a "help" listing.
### Possible commands include:

# Drop Enterprise Manager repository:
emca -deconfig dbcontrol db -repos drop 

# Create Enterprise Manager repository:
emca -config dbcontrol db -repos create

# Recreate Enterprise Manager repository:
emca -config dbcontrol db -repos recreate

Now we try the Enterprise Manager Repository Install:
[oracle@x7000 admin]$ emca -config dbcontrol db -repos create

STARTED EMCA at Jun 22, 2006 10:11:26 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: qtest
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional): mis-dba@dept.fuller.edu
Outgoing Mail (SMTP) server for notifications 
                                  (optional): dept.fuller.edu
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME 
    ................ /u01/app/oracle/product/10.2.0/db_1
Database hostname  ................ x7000.fuller.edu
Listener port number ................ 1521
Database SID ................ qtest
Email address for notifications 
    ............... mis-dba@dept.fuller.edu
Outgoing Mail (SMTP) server for notifications 
    ............... dept.fuller.edu

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jun 22, 2006 10:12:13 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
$ORACLE_HOME/cfgtoollogs/emca/qtest/emca_2006-06-22_10-11-26-AM.log
Jun 22, 2006 10:12:25 AM 
   oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 22, 2006 10:18:45 AM 
   oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jun 22, 2006 10:19:04 AM 
   oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for x7000.fuller.edu
Jun 22, 2006 10:19:29 AM 
   oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 22, 2006 10:21:57 AM 
   oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 22, 2006 10:21:57 AM 
   oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: 
>>>> The DB Control URL is http://x7000.fuller.edu:5500/em <<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 22, 2006 10:21:57 AM
[oracle@x7000 admin]$


Configuration files for the Enterprise Manager are found in AGENT_HOME/sysman/config where AGENT_HOME is $ORACLE_HOME/server_name.domain_SID. So for this install, the configuration files are found here:
$ORACLE_HOME/c1000.fuller.edu_qtest/sysman/config
[@more@]

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

转载于:http://blog.itpub.net/24487368/viewspace-1040543/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值