BookmarkSubscribeRSS Feed
JakubDeka
Calcite | Level 5
I am a new user of SAS and EG.

I have a question. What do I have to do to be able to extract data from my company's MS SQL server database? How would I do this?

I presume that I need to add a remote server on which the database is hosted and then add a library (connecting through ODBC) which is going to reference my database.

Am I correct?

Thanks for help. Message was edited by: Jakub Deka
7 REPLIES 7
ChrisHemedinger
Community Manager
Jakub,

First choice: use SAS/ACCESS to OLE DB to connect to the SQL Server data as a SAS library.

Second choice: you can use File->Open->OLE DB to connect EG to your SQL Server, but it's inefficient and you'll notice it's slow for large data. That's because the process moves your SQL Server data into SAS via the EG client (two hops instead of one).

More here:
http://support.sas.com/kb/26/178.html

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
JakubDeka
Calcite | Level 5
Thanks Chris. I will look at this document now.

Could you tell me what do I have to do to set this up?

I presume that I have to add a server on which my database is hosted and then add the library which will match my database. I am very confused and I am not sure what I have to do. Could you help?

What are the requirements for this to work? Do I need SAS running on that server? I have licence for SAS/ACCESS to ODBC. Is this the right product? Message was edited by: Jakub Deka
LinusH
Tourmaline | Level 20
To give you some advice we need to know your setup in more detail. Does your license for ACCES to ODBC apply to your SAS server license? Is your SAS server a metadata/workspace server implementation?

I don't think there any big difference in performance between OLE DB and ODBC. And the best solution is probably to have your connection to SQL Server on your SAS server if any processing spills over to SAS, or you want to store some large intermediate results.

/Linus
Data never sleeps
JakubDeka
Calcite | Level 5
Hi Linus,

OK. At the moment I have SAS including SAS/ACCESS to ODBC installed on my laptop. Nothing was installed on the server so far.

Server hosting the database is running on Windows.

What I am hoping to achieve is to be able to pass queries directly to the database using pass through.

Thanks for your help. If you need any more details I am more than happy to provide them to you.
LinusH
Tourmaline | Level 20
You probably already have your local SAS defined as an EG meta server.
You need the SQL Server ODBC driver locally (most probably installed by default). In the ODBC manager you have to define your data source using this driver.
In EG, I think you just have to define a Library using a Wizard under Tools. For details se EG documentation.

Linus
Data never sleeps
JakubDeka
Calcite | Level 5
I have defined the server (which works) in the Windows. Should I define it as User DNS or System DNS?

I tried adding the library to the EG using tools -> Assign Library.

Once I do this I am getting following error. Any idea what I am doing wrong?

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.
ChrisHemedinger
Community Manager
I suggest sending a note to SAS tech support with the details; they are pretty well versed in the database connectivity issues.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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