get_db_account
Shows the database account details as username, profile, account status and authentication type for a given search criteria.
Format
emcli get_db_account -target_name="tname" -connect_as= "DBUserName:uname;DBPassword:upassword[;DBRole:SYSDBA]" or "[DBCredsOwner:ucredsowner;]DBNamedCreds:unamedcreds" [-user_name="user_name"] [-target_type="ttype"] [-profile=profile default ""] [-account_status=account_status default "" ] [-authentication_type=auth_type default ""] [-limit_rows=limit_rows default 25 [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"]; ] [-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
Usernames to be searched for. You can include multiple usernames separated by a semicolon (;). The default value of this option is an empty string with all users shown in the result. The user_name is case sensitive.
-
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.
-
-
profile
Profile of the database account for which you want to search. The default value of this option is an empty string. Users with any profile will be shown in the result.
-
account_status
Account status for which you want to search. The default value of this option is an empty string. Users of any account status will be shown in the result.
-
authentication_type
Authentication type for which you want to search. The default value of this option is an empty string. Users of any authentication type will be shown in the result.
-
limit_rows
Maximum rows to be shown in the result. The default value of this option is 25.
-
script
This option is equivalent to -format="name:script".
-
format
Format specification (default is -format="name:pretty"). You can use the parameter in the following configurations:
-
-format="name:pretty" prints the output table in a readable format but is not intended to be parsed by scripts.
-
-format="name:script" sets the default column separator to a tab and the default row separator to a newline. The column and row separator strings may be specified to change these defaults.
-
-format="name:csv" sets the column separator to a comma and the row separator to a newline.
-
-
no_header
Displays tabular output without column headers.
-
connect_as
Specifies how to connect to the target database. 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 is if you want 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. Use the following two options:
-
Yes - Validate the options mentioned. Do not perform any actions. Through any validation errors on to the console.
-
No - Perform the actions as per the mentioned options.
The default value of this option is No.
-
Output
Output columns: Username Profile Account Status Authorization Type
Examples
Refer to the following examples:
Example 1
Use the following example to get the details of User Admin1 on database myDB using the named credentials SYS_myDB.
emcli get_db_account -target_name=myDB -user_name=Admin1 -connect_as="DBNamedCreds:SYS_myDB"
Example 2
Use the following example to get details of all accounts with search criteria mentioned using the sysdba user.
emcli get_db_account -target_name=myDB -profile=DEFAULT -account_status=OPEN -authentication_type=PASSWORD -connect_as="DBUserName:sys;DBPassword:welcome;DBRole:sysdba"