BookmarkSubscribeRSS Feed
bmsampath
Obsidian | Level 7

Hi All,

 

I have executed the below code in order to test the windows authentication.and got an error as shown below.

 

libname TEST odbc noprompt = "server=Servername,14331;DSN=ECTEST5;

DRIVER=/app/sas/sashome/AccessClients/9.4/SQLServer/lib/S0sqls27.so;Trusted_Connection=yes"QUALIFIER = EBusinessTest1 SCHEMA = dbo;

 

ERROR: CLI error trying to establish connection: [SAS][ODBC SQL Server Wire Protocol driver]Insufficient information to connect to

the data source.

ERROR: Error in the LIBNAME statement.

 

 

If I include the userid and password, then I am able to connect the database. But I need to connect with the DB without using userid and password.

 

Could you please suggest a solution for this?

 

Thanks,

Sampath

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

It sounds like your database needs authentication to access.  There isn't a way round that, you need to provide some sort of credentials.  If you need a generic account of some sort then discuss with your database group to setup such a generic account with specific permissions.

bmsampath
Obsidian | Level 7

Hi,

 

My id is already provided access to the SQL server.

 

In EG, I am able to connect the Database and am able to query the tables using Windows authentication. For this, I have made the necessary changes in the odbc.ini file as well.

 

I am trying to make the same connection via libname with out passing user/password info as I already logged in using my credentials. I expect the connection should happen automatically as we use NOPROMPT option in the libname.

 

Thanks,

Sampath

Quentin
Super User

Sounds like you've got EG, and connecting to a SAS session running on a linux server?

 

It's working when you provide the DSN for the ODBC connection defined in the odbc.ini file, right?  And did you hardcode the username and password into the odbc.ini?  If so, that explains why it would work.  But when you use NOPROMPT, you are bypassing the ODBC.ini, so you would need to give it the username and password.

 

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 1375 views
  • 0 likes
  • 3 in conversation