I am getting error when I try yo connect to SSMS in server. I have successful ODBC connection. However, I get the following error. It looks like error is coming from two words in user. How to fix it?
libname mydblib odbc user=apple orange password=XXXXXXXXXXXX dsn=sqlserver;
______
22
ERROR: Libref MYDBLIB is not assigned.
ERROR: Error in the LIBNAME statement.
ERROR 22-7: Invalid option name orange.
Hi Leonid,
Thanks for the suggestion. I tried using quotes, but It gives this error now.
ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver
specified
ERROR: Error in the LIBNAME statement.
The error suggests that the DSN sqlserver is not defined on your SAS server. Is your SAS session running locally on your PC or on a remote SAS server? If you use a remote SAS server what OS is it using?
If you are running SAS locally on your PC then you can use the Windows ODBC Administrator to define the DSN with the appropriate SQL Server ODBC driver.
Hi SASKiwi,
This SAS EG is installed in my machine and connected to the server. I am not sure what OS it is using.
How do you fix if it is connected to server?
You will need to work with your SAS administrator who will hopefully know what is required.
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!
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.