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 MAY 19, 2014

Applies to:

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


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="orcl: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 -db_password=manager -db_role=normal -host_username=oracle -host_password=mypwd -targets="orcl:oracle_database"
* Target: orcl:oracle_database
* Execution Status: Succeeded


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



Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms