Wednesday, June 29, 2011

ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin)


$ emctl status dbconsole     
OC4J Configuration issue. /oracle/product/11.2.0/oc4j/j2ee/OC4J_DBConsole_****.***.***.***_T11852 not found.

$ emctl start dbconsole
OC4J Configuration issue. /oracle/product/11.2.0/oc4j/j2ee/OC4J_DBConsole_*********_T11852 not found.

Then decided to reconfigure dbconsole.

First step is deconfigure and drop the repository already created.
$ ./emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Jun 29, 2011 3:44:46 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: T11852
Listener port number: 1521
Password for SYS user: 
Password for SYSMAN 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 29, 2011 3:45:09 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/cfgtoollogs/emca/T11852/emca_2011_06_29_15_44_45.log.
Jun 29, 2011 3:45:09 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed. 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 29, 2011 3:45:09 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jun 29, 2011 3:45:10 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /oracle/product/11.2.0/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=T11852.xxx.xxx.usg_ons))) -repos_user SYSMAN -action drop -verbose -output_file /oracle/cfgtoollogs/emca/T11852/emca_repos_drop_2011_06_29_15_45_09.log
Jun 29, 2011 3:45:10 PM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error dropping the repository
Jun 29, 2011 3:45:10 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at /oracle/cfgtoollogs/emca/T11852/emca_repos_drop_<date>.log for more details.
Jun 29, 2011 3:45:10 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error dropping the repository
Refer to the log file at /oracle/cfgtoollogs/emca/T11852/emca_2011_06_29_15_44_45.log for more details.
Could not complete the configuration. Refer to the log file at /oracle/cfgtoollogs/emca/T11852/emca_2011_06_29_15_44_45.log for more details.
oracle@cookie:/oracle/product/11.2.0/bin[T11852]
$

Checked /oracle/cfgtoollogs/emca/T11852/emca_repos_drop_2011_06_29_15_45_09.log:
=================================================================================

[29-06-2011 15:45:10] Enter SYS user's password :
[29-06-2011 15:45:10]
[29-06-2011 15:45:10] Getting temporary tablespace from database...
[29-06-2011 15:45:10] Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=**********)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=T11852.******))): ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin)


I was not able to connect to db using "sqlplus sys@T11852 as sysdba". I was getting ORA-01031 error.

I did below:
1.
SQL> show parameter remote_login_passwordfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE

2. There was no password file under $ORACLE_HOME/dbs

3. created password file using
orapwd file=$ORACLE_HOME/dbs/orapwT11852 password=u_pick_it force=y nosysdb>

4. Retried "sqlplus sys@T11852 as sysdba" and it connected.

5. then reran emca and it worked.

1 comment: