Hello.
Someone can help me connect SQL server 2012 to SAS using linked server.
I need to read some SAS tables with SQL server. This is possible?
If I read the question carefully, I think that all answers so far are backwards.
And no, SAS doesn't support database linking using the SQL Server concept. (Does that work with any other database?)
To access SAS data you need a SAS ODBC driver, and the SAS server set up for ODBC connections. Usually this means a license for SAS/SHARE and SAS/SHARE*NET is required. Contact you SAS server administrator/responsible for help.
If you are lucky (?) to have SAS installed locally to your SQL Server, you have the ODBC routine start SAS interactively in the background. But this is definitely not a production like scenario - for personal use only.
try this
%let usr = username;
%let pwd = password;
%let dbname = server;
connect to oracle(user=&usr password="&pwd" path=&dbname);
select * from
connection to oracle(select * from tableA );
tableA is the dataset that you wanted to read from the db server.
To connect to SQL Server from SAS you need a SAS ACCESS product like SAS/ACCESS to SQL Server or SAS/ACCESS to ODBC both installed and licensed. Run the following to confirm what SAS products you have:
proc product_status; run;
proc setinit; run;
What do you mean by linked server ? https://communities.sas.com/t5/SAS-Analytics-U/Connect-to-SQL-Server-Oracle-Database-by-SAS-University-Edition/m-p/273857
If I read the question carefully, I think that all answers so far are backwards.
And no, SAS doesn't support database linking using the SQL Server concept. (Does that work with any other database?)
To access SAS data you need a SAS ODBC driver, and the SAS server set up for ODBC connections. Usually this means a license for SAS/SHARE and SAS/SHARE*NET is required. Contact you SAS server administrator/responsible for help.
If you are lucky (?) to have SAS installed locally to your SQL Server, you have the ODBC routine start SAS interactively in the background. But this is definitely not a production like scenario - for personal use only.
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.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.