05-12-2015 12:22 PM
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
05-12-2015 01:47 PM
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.
05-12-2015 04:06 PM
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;