My Oracle Support Banner

Emcli Execute_sql Fails With Error 'Preferred Credentials Do Not Exist For Some Targets" in Enterprise Manager 12c (Doc ID 1639266.1)

Last updated on NOVEMBER 01, 2024

Applies to:

Enterprise Manager for Oracle Database - Version 12.1.0.3.0 to 12.1.0.5.0 [Release 12.1]
Information in this document applies to any platform.

Symptoms

The emcli command execute_sql can be used to run a sql command against multiple managed databases or groups.  Running the "execute_sql" command and specifying a credential_set_name returns the message "Preferred Credentials do not exist for some targets".  For example:-

emcli execute_sql -sql="select * from dual" -credential_set_name="DBCredsSYSDBA" -targets="<target_name>:oracle_database"
Preferred Credentials do not exist for some targets.

 

When passwords are explicitly specified for the database (and host on which this database runs), the command completes ok, for example:-

emcli execute_sql -sql="select * from dual;" -db_username=<system_user> -db_password=<system_user_password> -db_role=normal -host_username=<host_user_account> -host_password=<host_user_account_password> -targets="<target_name>l:oracle_database"
*******************************************************************************
* Target: <targert_name>:oracle_database
* Execution Status: Succeeded
*******************************************************************************

D
-
X

*******************************************************************************
* Execution Summary
* Targets Succeeded: 1
* orcl:oracle_database
* Targets Failed: 0
******************************************************************************* 

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.