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 our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

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!

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