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.

 

The Boston Area SAS Users Group (BASUG) is hosting an in person Meeting & Training on June 27!
Full details and registration info at https://www.basug.org/events.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 2074 views
  • 0 likes
  • 3 in conversation