Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Location
    Manila, Philippines
    Posts
    16

    Unanswered: Error configuring OEM using DBCA

    Hello guys,

    I've manually created a database and I needed to access OEM to configure replication of Oracle Streams. From what I've read I can configure it through DBCA. However when I used it, it returned an error saying:

    Failed to unlock all EM-related account. Refer to log file at D:\oracle\cfgtools\dbca\MLA23STR\emConfig.log for more details

    When I checked the log file it says:

    Jun 10, 2009 4:10:10 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Error executing CMD /C D:\oracle\ora11106\sysman\admin\scripts\emca\emcaD bUtil.bat "D:\oracle\ora11106\sysman\admin\scripts;D:\oracle \ora11106\bin;" D:/oracle/ora11106/perl/5.8.3/bin/MSWin32-x64-multi-thread\perl.exe D:\oracle\ora11106\sysman\admin\scripts\emca\emcaD bUtil.pl D:\oracle\ora11106 MLA23STR SYS SYSDBA declare repos_pwd varchar2(30); view_user varchar2(30); view_user_pwd varchar2(30); view_user_acc_status varchar2(30); begin repos_pwd := ?; sysman.mgmt_view_priv.get_view_user(view_user); select account_status into view_user_acc_status from sys.dba_users where upper(username) = upper ( view_user ); IF view_user_acc_status like '%LOCKED%' THEN execute immediate 'alter user ' || view_user || ' account unlock'; END IF; IF view_user_acc_status like '%EXPIRED%' THEN sysman.mgmt_view_priv.set_view_user_creds ( repos_pwd ); sysman.mgmt_view_priv.GET_VIEW_USER_CREDS ( view_user, view_user_pwd ); execute immediate 'alter user ' || view_user || ' identified by ' || view_user_pwd || ''; END IF; end; 1 SYSMAN_PWD
    Jun 10, 2009 4:10:10 PM oracle.sysman.emcp.EMReposConfig unlockMGMTAccount
    CONFIG: Failed to unlock mgmt_view account
    Jun 10, 2009 4:10:10 PM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Failed to unlock all EM-related accounts
    Jun 10, 2009 4:10:10 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Failed to unlock all EM-related accounts
    Refer to the log file at D:\oracle\cfgtoollogs\dbca\MLA23STR\emConfig.log for more details.
    Jun 10, 2009 4:10:10 PM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Failed to unlock all EM-related accounts
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposCon fig.java:335)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposCon fig.java:147)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java: 222)
    at oracle.sysman.assistants.util.em.EMConfiguration** **n(EMConfiguration.java:460)
    at oracle.sysman.assistants.util.em.EMConfigStep.exec uteImpl(EMConfigStep.java:139)
    at oracle.sysman.assistants.util.step.BasicStep.execu te(BasicStep.java:210)
    at oracle.sysman.assistants.util.step.BasicStep.callS tep(BasicStep.java:251)
    at oracle.sysman.assistants.dbca.backend.PostDBConfig ureStep.executeImpl(PostDBConfigureStep.java:287)
    at oracle.sysman.assistants.util.step.BasicStep.execu te(BasicStep.java:210)
    at oracle.sysman.assistants.util.step.Step.execute(St ep.java:140)
    at oracle.sysman.assistants.util.step.StepContext$Mod eRunner****n(StepContext.java:2497)
    at java.lang.Thread****n(Thread.java:595)
    Jun 10, 2009 4:10:10 PM oracle.sysman.emcp.EMConfig restoreOuiLoc
    CONFIG: Restoring oracle.installer.oui_loc to D:\oracle\ora11106\oui


    I tried unlocking SYSMAN account but it still gives the same error. Any suggestions on whats the best approach to this problem?

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool dmsnp

    Quote Originally Posted by dadorador
    ... From what I've read I can configure it through DBCA. However when I used it, it returned an error saying:...

    I tried unlocking SYSMAN account but it still gives the same error. Any suggestions on whats the best approach to this problem?
    a) Use emca (not dbca).
    b) Try unlocking the DBSNMP account.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Aug 2013
    Posts
    1

    Lightbulb try this

    apologies for resurrecting a dead thread but this is the first search result in Google for "dbca CONFIG: Failed to unlock account"

    Which just bit me, the solution is as follows:

    # emctl stop dbconsole
    OC4J Configuration issue. /u01/app/oracle/product/11.2.0.3.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_FQDN_SID not found.

    Where FQDN is your fully qualified Domain Name, (pulled out of /etc/hosts) and SID is your ORACLE_SID (dbname, the instance name of your DB)

    Check your ORACLE_SID to make sure you're on the right DB then:

    sqlplus / as sysdba
    SQL> drop user sysman cascade;
    User dropped.

    The next to bits of SQL should fail:

    drop triger sysman.emd_user_logoff;
    drop triger sysman.emd_user_logon;

    You can check if sysman still exists with the following SQL if required:
    select USERNAME,ACCOUNT_STATUS from dba_users order by username;

    In prior experiments I reset and unlock the dbsnmp user as follows:

    SQL> alter user dbsnmp identified by dbsnmp;
    User altered.

    SQL> alter user dbsnmp account unlock;
    User altered.

    Exit sqlplus
    SQL> exit

    $ORACLE_HOME/sysman/admin/emdrep/bin/RepManager hostname listener port SID -action drop

    This will ask you for your sys account password, and the repo user name:

    Enter SYS user's password :
    Enter repository user name : dbsnmp

    It doesn't seem to matter what name you give it, it then says the user doesn't exist and removes your repo.

    This is a full run trough:

    Enter SYS user's password :
    Enter repository user name : dbsnmp
    Getting temporary tablespace from database...
    Found temporary tablespace: TEMP
    Checking SYS Credentials ... rem error switch
    OK.
    rem error switch
    Dropping the repository..
    Checking for Repos User ... Does not Exist.
    Repos User does not exist ... Continuing with cleanup ...
    Dropping Roles/Synonymns/Tablespaces ... Done.
    Dropped Repository Successfully.

    Listener port is 1512 by default. You can discover what your is set to thus:
    lsnrctl status |grep PORT

    You should then delete your repo directories (two of them) as follows:

    cd $ORACLE_HOME
    rm -rf ./oc4j/j2ee/OC4J_DBConsole_FQDN_SID ./FQDN_SID

    Where FQDN is your fully qualified Domain Name, (pulled out of /etc/hosts) and SID is your ORACLE_SID (dbname, the instance name of your DB)

    Now you can run dbca thus:

    dbca
    [Next >]
    * Configure Database options
    [Next >]
    SID
    [Next >]
    [Next >]
    [Standard Database Components]
    * Oracle JVM
    * Oracle XML DB
    [OK]
    [Next >]
    Add/configure seperate passwords for dbsnmp & sysman
    [Next >]
    * Shared Server Mode
    1
    [Finish]

    Database has to be restarted [OK]
    Configure new settings for "SID" [OK]

    For whatever SID you chose from the available instances on your server.

    It should now complete successfully, tell you the URL & port to use, then the location of your encryption key, make a copy of that as instructed.

    If you have already tried to install the EM, and it failed, you don't need to install JVM & XML DB, just check to make sure that there is a tick (greyed out or black) next to the option:

    Enterprise Manager Repository.

    If it's greyed out it means it already exists.
    If it's an empty box tick it, if it's already been ticked leave it, these mean it will build the EM repo for you.

    If you have a black tick it will ask you for passwords for the users dbsnmp & sysman, I chose separate passwords, the defaults are dbsnmp & sysman

    It should then complete and give you the URL and encryption key location.

    If the tick was greyed out it will rebuild your repo and use the old passwords. It will then give you URL and encryption key location.

    Allegedly you can find more details in MOS Doc 729893.1 for those that have oracle support, but the above works for me:

    Oracle Version:

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    ON Suse Linux, but Oracle is Oracle, it work with Windows too provided you understand how to run this in a DOS shell.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •