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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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