Hi,
I have an odbc connection at my desktop and I don't need username and password for that when I use libname in base sas .
Libname risk odbc dsn="risk" user="" password="" schema=dbo;
This works perfectly fine
However when I try to use the same using eg it gives me error
Ports are opened in our server and we have odbc engine in place
I really don't understand what could be the issue . it gives me CLI error
Any suggestions are welcome
Is EG on your desktop or is it a Server Installation?
If it's a server installation it may not see your dsn connection.
Similar to what Reeza said, if the libname statement works in Base SAS, and EG is connecting to SAS on the same machine (either locally or remotely), then submitting the same libname statement in EG (to the same server) should work.
For example, if Base SAS and EG is on your local machine, the same libname statement should work in both (so long as you are submitting to the "Local" server in EG).
If EG is on your local machine and you are submitting to a remote server, then the libname statement will work in EG if it also works in Base SAS installed on the server machine.
In other words, the DSN has to exist on the host machine where the SAS server process is running.
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
If you would like to avoid defining DSNs on all of your SAS local or remote SAS servers you can just do it all in your LIBNAME - note you will need to substitute RiskServerName and RiskDatabase with your actual values as defined in your DSN (stored in the ODBC Administrator tool).
libname risk odbc noprompt = "server=RiskServerName;DRIVER=SQL Server Native Client 11.0;Trusted Connection=yes" DATABASE = RiskDatabase schema = dbo;
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!
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.