BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
Hi,
If i use windows sas or unix to access databases on SQL Server what are the different type of connections besides ODBC that i could use?
Thx
1 ACCEPTED SOLUTION

Accepted Solutions
SAS_INFO
Quartz | Level 8

hi ,

 

Signon Rsubmit works

View solution in original post

9 REPLIES 9
SAS_INFO
Quartz | Level 8

hi ,

 

Signon Rsubmit works

SASKiwi
Opal | Level 21

I believe OLEDB is an option under Windows but not Unix - you would need SAS/ACCESS to OLEDB for that. I'm fairly sure that SAS/ACCESS to SQL Server also uses ODBC behind the scenes. Why the question? I recommend ODBC with SAS/ACCESS to ODBC as it can be used with a variety of databases.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
I tried running pc sas n also EG SAS locally n remotely and i keep gettin the CLI error:wrong userid/password or ODBC drivers not installed
I mean sql server n pc sas both run on windows. Why do i still need odbc drivers?
LinusH
Tourmaline | Level 20
Because ODBC requires ODBC drivers regardless of where your database is situated.
Data never sleeps
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
But even when i run sas on unix i get the same error and i checked the odbc.ini file. Looks all good
Do i need to be registered in the SAS metadata by a SAS admin or something?
SASKiwi
Opal | Level 21

If you want help with your ODBC connection problems then please post a log of your program including error messages. 

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

 

when running the following query on PS SAS ,EG(Remote) and UNIX with including "rsubmit" statement i  am ok :

 

 rsubmit;

proc sql;

connect to sqlsvr as mydb (datasrc=DM_UserDB user =xxx password=yyy readbuff=32767);

 create table test(compress = no) as select * from connection to mydb

(SELECT COUNT(*)  FROM table_name );

 disconnect from mydb;

quit; 

endrsubmit;

 

 but when running  it on UNIX lets say without the "rsubmit" then i get this:

 

 

ERROR: The SAS/ACCESS Interface to SQLSRV cannot be loaded. The SASSQSRV code appendage could not be loaded.

ERROR: A Connection to the sqlsvr DBMS is not currently supported, or is not installed at your site.

 

I thought the ODBC.ini file would take care of that. So why still the need of rsubmit if i am running this on the remote server?

 

ChrisHemedinger
Community Manager

With the RSUBMIT, your program is being sent to a different SAS node for processing (exactly which node depends on your SAS/CONNECT and signon statements).  It's that node that must have the SQL Server connectors configured and the SAS/ACCESS product installed/licensed.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

i see.thanks

but at my previous company we had the databases on  oracle and  we never used the "rsubmit" statement to make the connections so i am  trying to sense whether this does not apply to Oracle or not

 

or does that mean they might had the sas/access  interface to  oracle there but they dont  have the sas/access to sqlserver  here?

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 1100 views
  • 4 likes
  • 5 in conversation