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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.