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
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.
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
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.
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 16. Read more here about why you should contribute and what is in it for you!
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.