I would try that. SAS is not finding the DSN/driver for whatever reason, so, yes, that would be the next area to look in. Since the driver you're using is in the list of available drivers, I'm assuming that the driver is installed, but maybe not. Where's @SASKiwi when you need him? 🙂
Jim
If you use that UDL trick I mentioned, on the server, or go into the ODBC drivers and look, you can get the ODBC driver version that is on your system. The UDL trick combined with a far easier way to connect using the ODBC NOPROMPT option will help you find the issue.
I put that in my first example. Trick is to make sure you get the ODBC connection string exact. You can get that using the udl trick. the udl trick, if followed all the way to where the string is stored, will provide the entire connection string for you. Otherwise, copy the driver string from the ODBC wizards in Windows.
Run this to confirm if you have SAS/ACCESS to ODBC installed or not and post the output:
proc product_status;
run;
The evidence you have supplied indicates you are licensed for it, but the errors you are getting suggest you either do not have it installed or it is not configured correctly.
Good ideas from @SASKiwi*
Additional question: Is your SAS environment running with an 32 bit or 64 bit OS? Would you run this bit of code and post the log, please?
%PUT NOTE: &=SYSHOSTINFOLONG;
Jim
*It took you six entire minutes to respond to my post. You're slipping I see. Why, I bet Superman would never have let this occur. Tsk, tsk. 😂😉
This is the output
@tampham92 - Correct. You have a licence for SAS/ACCESS to ODBC but the product is not installed. However you do have SAS/ACCESS to SQL Server installed and licensed so that is the LIBNAME engine you need to try.
Where are you SAS sessions running? Locally on your PC or on a remote SAS server? If you are using a remote SAS server what OS does it run on?
I run it on a SAS server within EG.
When I tried to run the libname statement, I got this error message
24 libname sqwirdsn sqlsvr dsn=SQL_SAS2 user=xxx password=XXXXXXXXXX schema=dbo;
ERROR: CLI error trying to establish connection: [DataDirect][ODBC lib] Data source name not found and no default driver specified
ERROR: Error in the LIBNAME statement.
You need to talk to your SAS administrator regarding what database connection settings to use. If your SAS server runs on Unix then data sources need to be defined in an odbc.ini file not the Windows ODBC Administrator and only users with remote login access to your SAS server can do this work.
@tampham92 wrote:
This is the output
That is a bit odd that @tampham92's SETINIT, see below, mentions ODBC but the product status does not. @SASKiwi, what do you think?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.