SAS Programming

DATA Step, Macro, Functions and more
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 is hosting free webinars!
Next up: Rick Wicklin presents Ten Tips for Effective Statistical Graphics (with SAS code) on Wednesday March 26.
Register now at https://www.basug.org/events.

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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