BookmarkSubscribeRSS Feed
forumsguy
Fluorite | Level 6

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

3 REPLIES 3
Reeza
Super User

Is EG on your desktop or is it a Server Installation?

If it's a server installation it may not see your dsn connection.

CaseySmith
SAS Employee

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

SASKiwi
PROC Star

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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

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
  • 3 replies
  • 2184 views
  • 0 likes
  • 4 in conversation