update_db_account_status
Updates the database account status to any of LOCKED,OPEN,EXPIRED and LOCKED & EXPIRED.
Format
emcli update_db_account_status -target_name="tname" -user_name="user_name" -connect_as= "DBUserName:uname;DBPassword:upassword[;DBRole:SYSDBA]" or "[DBCredsOwner:ucredsowner;]DBNamedCreds:unamedcreds" -action=action [-target_type="ttype"] [-input_file="tag1:file_path1;tag2:file_path2;..."] [-validate_only="yes/no" default "no"] [ ] indicates that the parameter is optional.
Options
-
target_name
Name of the target.
-
user_name
Name of the database user. The user_name is case sensitive.
-
action
Action to be performed. Possible values for this option are as follows:
-
LOCK - locks the account.
-
UNLOCK- unlocks the account.
-
EXPIRE - expires the account.
-
LOCK_AND_EXPIRE - lock as well as expires the account.
-
UNLOCK_AND_EXPIRE - unlock as well as expires the account.
-
-
target_type
Type of target. The possible values for target type in this verb are:
-
oracle_database
-
rac_database
The default value for this argument is oracle_database.
-
-
connect_as
Connect to the target database as. It should be specified in one of the two following formats:
-
DBUserName:uname;DBPassword:upassword[;DBRole:SYSDBA]
-
[DBCredsOwner:ucredsowner;]DBNamedCreds:unamedcreds
-
-
input_file
Use this option to hide passwords. Specify the path to the file containing the old and new passwords. Each path must be accompanied by a tag that is referenced in the password options.
-
validate_only
Indicate whether to validate the options mentioned without doing the actions.
-
Yes - Validate the options mentioned. Do not do any actions. Through any validation errors on to the console.
-
No - do the actions as per the mentioned options.
The default value of this option is NO.
-
Exit Codes
0 if successful. A non-zero value indicates that verb processing was unsuccessful.
Examples
The following are three examples of the update_db_account_status_verb verb.
Example 1
The following example locks account Admin1 on the target database myDB using the named credential SYS_myDB.
emcli update_db_account_status -target_name=myDB -user_name=Admin1 -action=LOCK -connect_as="DBNamedCreds:SYS_myDB"
Example 2
The following example unlocks account Admin1 on target database myDB using SYSDBA.
emcli update_db_account_status -target_name=myDB -user_name=Admin1 -action=UNLOCK -connect_as="DBUserName:sys;DBPassword:welcome;DBRole:sysdba"