my code :
%let env = DBPROD;
%let user = sam;
%let pwd = welcome;
proc sql;
connect to db2 as db2con (db="&env" user="&user" pw="&pwd");
quit;
error:
ERROR: CLI error trying to establish connection: [IBM][CLI Driver] SQL1013N The database alias name or database name "DBPROD"
could not be found. SQLSTATE=42705
Hi @radha009
SQL1013N and SQLSTATE=42705 means that the database, in this case DBPROD may not have been cataloged on the DB2 client.
You can read about it, here.
https://www.ibm.com/support/pages/sql1013n-db2-connect
If you have the DB2 CLI installed on the client you can invoke it and issue the following command:
db2 list db directory
If DBPROD isn't listed, it will need to be cataloged.
This Stackoverflow thread may help you:
https://stackoverflow.com/questions/19303061/db2-database-directory-shows-db-that-does-not-exist
If this is all gibberish, you may need to contact your DBA and have them configure the client.
Best wishes,
Jeff
Hi @radha009
SQL1013N and SQLSTATE=42705 means that the database, in this case DBPROD may not have been cataloged on the DB2 client.
You can read about it, here.
https://www.ibm.com/support/pages/sql1013n-db2-connect
If you have the DB2 CLI installed on the client you can invoke it and issue the following command:
db2 list db directory
If DBPROD isn't listed, it will need to be cataloged.
This Stackoverflow thread may help you:
https://stackoverflow.com/questions/19303061/db2-database-directory-shows-db-that-does-not-exist
If this is all gibberish, you may need to contact your DBA and have them configure the client.
Best wishes,
Jeff
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.