get_db_profile

Shows the database profile details as profile, resource name, resource type and limit for a given search criteria.

Format

emcli get_db_profile
        -target_name="tname"
        -connect_as= "DBUserName:uname;DBPassword:upassword[;DBRole:SYSDBA]" or "[DBCredsOwner:ucredsowner;]DBNamedCreds:unamedcreds"
        [-target_type="ttype"]
        [-profile=profile default ""]
        [-resource=resource 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.

  • profile

    Profiles to be searched for. You can include multiple profiles separated by a semicolon (;). The default value of this option is an empty string with all profiles shown in the result. The profile is case sensitive.

  • target_type

    Type of the target. The possible values for target type in this verb are:

    • oracle_database

    • rac_database

    The default value for this argument is oracle_database.

  • resource

    Resource name of the database profile for which you want to search. The default value of this option is an empty string. Profiles with any resource name 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.

  • noheader

    Display tabular output without column headers.

  • connect_as

    Connect to the target database as. It should be specified in one of the following two 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

    Indicates whether to validate the options mentioned without doing the actions. Choose from one of the following options:

    • Yes - Validate the options mentioned. Do not do any actions.

    • No - do the actions as per the mentioned options.

    The default value of this option is No.

Output

Output columns: Profile Resource Name Resource Type Limit

Examples

Refer to the following examples:

Example 1

Use the following example to get details of all resources of a profile DEFAULT using SYS_myDB named credentials.

emcli get_db_profile
      -target_name=myDB
      -profile=DEFAULT
      -connect_as="DBNamedCreds:SYS_myDB"

Example 2

Use the following example to get the details of resource of profile DEFAULT using sysdba credentials.

emcli get_db_profile
      -target_name=myDB
      -profile=DEFAULT
      -resource=CONNECT_TIME
      -connect_as="DBUserName:sys;DBPassword:welcome;DBRole:sysdba"