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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.