Thursday 17 November 2011

Enterprise Manager Category


Archive for the ‘Enterprise Manager’ Category
EMCTL is one service which we never know whether it will run fine or not…. :-)
Just kidding, here is one such problem with Enterprise Manager configuration and its solution
Problem:
When trying to configure EM for 10g or trying to drop repository or trying to recreate repository you may get below error
[oracle@issgascop218 ~]$ emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Aug 24, 2010 7:51:44 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: PASQ
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Aug 24, 2010 7:51:54 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/oracle/product/10.2.0/cfgtoollogs/emca/PASQ/emca_2010-08-24_07-51-44-AM.log.
Aug 24, 2010 7:51:55 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) …
Aug 24, 2010 7:51:57 AM oracle.sysman.emcp.EMReposConfig stopDBMSJobs
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Aug 24, 2010 7:51:57 AM oracle.sysman.emcp.EMReposConfig invoke
WARNING: Unable to remove DBMS jobs.
Aug 24, 2010 7:51:57 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) …
Aug 24, 2010 7:51:57 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /opt/oracle/product/10.2.0/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=issgascop218)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PASQ.issgascop218.global.iss.biz))) -repos_user SYSMAN -action drop -verbose -output_file /opt/oracle/product/10.2.0/cfgtoollogs/emca/PASQ/emca_repos_drop_2010-08-24_07-51-57-AM.log
Aug 24, 2010 7:51:57 AM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error dropping the repository
Aug 24, 2010 7:51:57 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at /opt/oracle/product/10.2.0/cfgtoollogs/emca/PASQ/emca_repos_drop_<date>.log for more details.
Aug 24, 2010 7:51:57 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error dropping the repository
Refer to the log file at /opt/oracle/product/10.2.0/cfgtoollogs/emca/PASQ/emca_2010-08-24_07-51-44-AM.log for more details.
Could not complete the configuration. Refer to the log file at /opt/oracle/product/10.2.0/cfgtoollogs/emca/PASQ/emca_2010-08-24_07-51-44-AM.log for more details.
When i opened log file, i found below information…
[24-08-2010 07:51:57] Enter SYS user’s password :
[24-08-2010 07:51:57]
[24-08-2010 07:51:57] Enter repository user password :
[24-08-2010 07:51:57]
[24-08-2010 07:51:57] Getting temporary tablespace from database…
[24-08-2010 07:51:57] Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=issgascop218)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PASQ.issgascop218.global.iss.biz))): ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin)
One of possible reasons for ORA-01031 is OS user is not added to either oinstall or dba group. But in my case, its there.
After a search, i found that the reason is lack of PASSWORD FILE. Then i created password file which solved the issue
[oracle@issgascop218 ~]$ cd $ORACLE_HOME/dbs
[oracle@issgascop218 dbs]$ orapwd file=orapw$ORACLE_SID password=oracle entries=1 force=y
[oracle@issgascop218 dbs]$ ls -ltr
total 16096
-rw-r—–  1 oracle dba    8385 Sep 11  1998 init.ora
-rw-r—–  1 oracle dba   12920 May  3  2001 initdw.ora
-rw-rw—-  1 oracle dba      24 Mar 22  2007 lkPAS
-rw-rw—-  1 oracle dba    1552 Mar 22  2007 hc_PAS.dat
-rw-rw—-  1 oracle dba    1552 May  9  2007 hc_PASQ.dat
-rw-rw—-  1 oracle dba      24 May  9  2007 lkPASQ
-rw-r—–  1 oracle dba    2430 May  9  2007 initPASQ.ora
-rw-r—–  1 oracle dba    2560 Dec 28  2007 spfilePAS.oraold
-rw-r—–  1 oracle dba    2393 Dec 28  2007 initPAS.ora
-rw-r—–  1 oracle dba    1536 Apr 30 11:54 orapwPAS
-rw-r—–  1 oracle dba    2560 Jul  1 22:00 spfilePAS.ora
-rw-r—–  1 oracle dba    3584 Jul 12 22:00 spfilePASQ.ora
-rw-r—–  1 oracle dba 7716864 Aug 23 18:30 snapcf_PASQ.f
-rw-r—–  1 oracle dba 8601600 Aug 23 18:57 snapcf_PAS.f
-rw-r—–  1 oracle dba    1536 Aug 24 07:54 orapwPASQ
[oracle@issgascop218 dbs]$ emca -config dbcontrol db -repos recreate
Last few lines of above command
INFO: Repository successfully created
Aug 24, 2010 8:01:56 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) …
Aug 24, 2010 8:03:32 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Aug 24, 2010 8:03:33 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://issgascop218:5500/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
So, whenever you get ora-01031 while performing some action on EM, plz do check if this solution works out
Hi Friends, today i face some problem with EM dbconsole in one of my databases are here is the way how i resolved it
Database version : 10.2.0.4 standard edition
OS version : windows 2003 server with service pack 2
Problem : Sys admin performed firm upgrade on my database server and rebooted it. From that moment EM dbconsole is not working
1) i checked the status of dbconsole as follows
C:\Documents and Settings\oracms>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://cmsp-database.klpcph.local:5500/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.
——————————————————————
Logs are generated in directory N:\oracle\product\10.2.0\db/cmsp-database.klpcph.local_KLPPROD01/sys
man/log
2) then i tried starting dbconsole and got following error
C:\Documents and Settings\oracms>emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
https://cmsp-database.klpcph.local:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control …The OracleDBConsoleKLPPROD01 service is s
tarting…………………………………………………………………………………
……………………………………………………………………………………….
……………………
The OracleDBConsoleKLPPROD01 service could not be started.
A service specific error occurred: 1.
More help is available by typing NET HELPMSG 3547.
3) then i tried to find out what this message is
C:\Documents and Settings\oracms>NET HELPMSG 3547
A service specific error occurred: ***.
EXPLANATION
A service-specific error occurred.
ACTION
Refer to the Help or documentation for that service to determine the problem.
as you can see we cannot understand what is the exact problem here…
4) sometimes this problem may occur because SYSMAN and DBSNMP users got locked. so i checked their account status
C:\Documents and Settings\oracms>sqlplus “/ as sysdba”
SQL*Plus: Release 10.2.0.4.0 – Production on Tue May 18 08:26:24 2010
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Release 10.2.0.4.0 – 64bit Production
SQL> select username,account_status from dba_users;
USERNAME                       ACCOUNT_STATUS
—————————— ——————————–
MGMT_VIEW                      OPEN
SYS                            OPEN
SYSTEM                         OPEN
DBSNMP                         OPEN
SYSMAN                         OPEN
so from above, its clear that both the user accounts are open
5) then i checked if agent is running or not
C:\Documents and Settings\oracms>emctl status agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
—————————————————————
Agent is Not Running
6) because agent is not running, i tried to start it
C:\Documents and Settings\oracms>emctl start agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
as mentioned i tried to check what this message is…
C:\Documents and Settings\oracms>NET HELPMSG 2185
The service name is invalid.
EXPLANATION
You tried to start a service that is not configured on this system.
ACTION
Check the spelling of the service name or check the configuration information for the service using
the Services option from Server Manager.

7) restarting the server could be a solution, but we cannot do that if it is a production database. so i recreated repository
Do remember, recreating enterprise manager repository will not have any impact on database functionality
before recreating, take out the info like
Database hostname
Database SID
Listener port number
password for SYS user
password for DBSNMP user
password for SYSMAN user
also, it is important that DBSNMP and SYSMAN user’s account should be opened
use the following command to recreate repository
C:\Documents and Settings\oracms>emca -config dbcontrol db -repos recreate
STARTED EMCA at May 18, 2010 8:28:24 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: KLPSTAGE01
Database Control is already configured for the database KLPSTAGE01
You have chosen to configure Database Control for managing the database KLPSTAGE01
This will remove the existing configuration and the default settings and perform a fresh configurati
on
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:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
—————————————————————–
You have specified the following settings
Database ORACLE_HOME ……………. N:\oracle\product\10.2.0\db
Database hostname ……………. klpdbscph601.klpcph.local
Listener port number ……………. 1521
Database SID ……………. KLPSTAGE01
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………
—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: y
this successfully created repository and started my dbconsole
8)so i am happy that my problem solved. but when i checked the EM dbconsole status….it gave me another shock
C:\Documents and Settings\oracms>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://klpdbscph601.klpcph.local:5500/em/console/aboutApplication
EM Daemon is not running.
——————————————————————
Logs are generated in directory N:\oracle\product\10.2.0\db/klpdbscph601.klpcph.local_KLPSTAGE01/sys
man/log
then i started looking at log and found following warning
May 18, 2010 8:33:00 AM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for klpdbscph601.klpcph.local
so finally, i reloaded listener and you know it started working… :-)
C:\Documents and Settings\oracms>lsnrctl reload LISTENER_STAGE01
LSNRCTL for 64-bit Windows: Version 10.2.0.4.0 – Production on 18-MAY-2010 08:37:26
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=klpdbscph601.klpcph.local)(PORT=1523)))
The command completed successfully
C:\Documents and Settings\oracms>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://klpdbscph601.klpcph.local:5500/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
——————————————————————
Logs are generated in directory N:\oracle\product\10.2.0\db/klpdbscph601.klpcph.local_KLPSTAGE01/sys
man/log
Note : we are not using grid control, so this is only for 10g EM dbconsole problem. Don’t apply it for grid control and also test it before use
Hi Friends, recently i tried to configure Oracle enterprise manager in one of my database and issued below command
$ emctl status dbconsole
i got the following ouput
OC4J Configuration issue. /opt/oracle/oracle/product/10.2.0/DB/oc4j/j2ee/OC4J_DBConsole_iss.dk_PAS not found.
Then i found that we need to have a directory in the specified location with specified name and i found a directory called OC4J_DBConsole. Then i renamed it to OC4J_DBConsole_iss.dk_PAS which solved the issue.
Hope this may help you and in next post i will present different EM commands

No comments:

Post a Comment