BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
radha009
Quartz | Level 8

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

1 ACCEPTED SOLUTION

Accepted Solutions
JBailey
Barite | Level 11

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

View solution in original post

1 REPLY 1
JBailey
Barite | Level 11

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 6247 views
  • 1 like
  • 2 in conversation