BookmarkSubscribeRSS Feed
saspert
Pyrite | Level 9

Hi guys,

My libname is here - 

 

LIBNAME WWTest ODBC NOPROMPT="server=HMIDWPRD03;driver=sql server;Trusted Connection=yes;Database=WW;" SCHEMA=dbo USER=myid PASSWORD="{sas002}secretalphanumericcode123" ;

 

I tried several kinds of combinations for proc sql but it will not work -

 


23 Proc sql;
24 Connect to odbc ( user=myid password=myunecryptedpwd database="WW.dbo") ;
ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver
specified

 

I tried datasrc=/ database= /single quote/double quote/ and other combinations but of no avail. 

 

Thanks,

saspert

5 REPLIES 5
DBailey
Lapis Lazuli | Level 10

Have you tried:

 

connect using WWtest as cWWTest;

 

 

saspert
Pyrite | Level 9

This is a more OS -related issue as per my supervisor. So we can ignore this for now. Thanks! 

SASKiwi
PROC Star

Does your LIBNAME actually work? Supplying a username and password is not required if you are using Windows authentication as your string Trusted Connection=yes; indicates. With this option SQL Server authenticates against your Windows user credentials.

saspert
Pyrite | Level 9

LIBNAME WW2 ODBC  NOPROMPT="server=ABCDEFGPRD;driver=sql server;Trusted Connection=yes;Database=WW;" ;

 

This works fine. The original library is WW. The new test library I created is WW2. Both are shown as assigned/created.

SASKiwi
PROC Star

In that case your same NOPROMPT string should work fine in a CONNECTION statement.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 1874 views
  • 1 like
  • 3 in conversation