Error when creating EM: configuration: Failedtounlockmgmt_viewaccount2013-4-2922: 47: 03oracle. sysman. emcp. EMReposConfiginvoke severe: Unable to unlock all EM-related accounts 2013-4-2922: 47: 03oracle. sysman. emcp. EMConfigperform severe: cannot unlock all EM-related accounts
When you create an EM instance, the following error occurs: configuration: Failed to unlock mgmt_view account 22:47:03 oracle. sysman. emcp. EMReposConfig invoke severe: Unable to unlock all EM-related accounts 22:47:03 oracle. sysman. emcp. EMConfig perform is critical: cannot unlock all EM-related accounts
When creating EM, an error is reported:
Configuration: Failed to unlock mgmt_view account
22:47:03 oracle. sysman. emcp. EMReposConfig invoke
Severe: cannot unlock all EM-related accounts
22:47:03 oracle. sysman. emcp. EMConfig perform
Severe: cannot unlock all EM-related accounts
For more information, see log files in D: oracledesktoollogsemcaorclemca_2013_04_29_22_43_32.log.
22:47:03 oracle. sysman. emcp. EMConfig perform
Configuration: Stack Trace:
Oracle. sysman. emcp. exception. EMConfigException: cannot unlock all EM-related accounts
At oracle. sysman. emcp. EMReposConfig. invoke (EMReposConfig. java: 349)
At oracle. sysman. emcp. EMReposConfig. invoke (EMReposConfig. java: 158)
At oracle. sysman. emcp. EMConfig. perform (EMConfig. java: 253)
At oracle. sysman. emcp. EMConfigAssistant. invokeEMCA (EMConfigAssistant. java: 590)
At oracle. sysman. emcp. EMConfigAssistant. Configure mconfiguration (EMConfigAssistant. java: 1453)
At oracle. sysman. emcp. EMConfigAssistant. statusMain (EMConfigAssistant. java: 574)
At oracle. sysman. emcp. EMConfigAssistant. main (EMConfigAssistant. java: 522)
22:47:03 oracle. sysman. emcp. EMConfig restoreOuiLoc
Configuration: Restoring oracle. installer. oui_loc to D: oracleproduct11.2.0dbhome _ 1oui
View the log file because the following statement is executed and an error is reported:
22:47:03 oracle. sysman. emcp. util. PlatformInterface executeCommand
Configure: Run CMD/c d: oracleproduct11.2.0dbhome _ 1sysmanadminscriptsemcaemcaDbUtil. bat "D: oracleproduct11.2.0dbhome _ 1 sysmanadminscripts; D: oracleproduct11.2.0dbhome _ 1bin;" D:/oracle/product/11.2.0/dbhome_1/perl/binperl.exe D: oracleproduct11.2.0dbhome _ example. pl D: oracleproduct11.2.0dbhome _ 1 "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = PC201303231245) (PORT = 1521) (CONNE CT_DATA = (SERVICE_NAME = canonical) "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. trim (view_user, view_user_pwd); execute immediate 'alter user' | view_user | 'identified by '| view_user_pwd | ''; end if; end; orcl 1 SYSMAN_PWD Error
However, it is strange that such an error does not occur when you pull it out separately. Let's look at the log and find that another error is reported before the preceding statement is executed:
22:47:03 oracle. sysman. emcp. util. PlatformInterface executeCommand
Configuration :'? 'It is neither an internal or external command nor a program that can be run
Or batch files.
It can be seen that this is the error message displayed at the cmd command prompt in windows. It is estimated that an error occurred while calling the internal command. Check the error message displayed at the first line of the window when cmd is started:
It can be confirmed that it is a windows command line problem. Errors like this are not encountered in linux. Execute the following command, when executing cmd, the system automatically runs a command, but the command does not exist, so an error is returned. You just need to leave the automatic operation blank:
Reg add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommand Processor"/v "AutoRun"/d ""/f
Re-execute the operation, and the above error will no longer appear.
The preceding statement adds a registry key. The meanings of each parameter are as follows:
/V: AutoRun
/D: Data to be allocated
/F: Do not force rewrite existing data