BookmarkSubscribeRSS Feed
raphcla
Fluorite | Level 6

Hi every one.

I'm trying to access a SQL database via SAS. 

My SAS is installed in Linux server and SQL Database in Windows. I try to map the library with this code:

 

libname teste pcfiles server=&IP. port=&porta. DSN=SQL UID=&USER PWD=&PASS schema=DBST800 database=dbo.dados_gestao_risco;

 

and doesn't work. I will put here a print of SQL structure. I'm missing something?

 

Estrutura_SQL_1.PNGEstrutura_SQL_2.PNG

5 REPLIES 5
SASKiwi
PROC Star

A better way is to use SAS/ACCESS to SQL Server or SAS/ACCESS to ODBC. Do you not have either of these? 

raphcla
Fluorite | Level 6
Unfortunately i don't have this software. I only have PC File Server, it's useful?
andreas_lds
Jade | Level 19

@raphcla wrote:
Unfortunately i don't have this software. I only have PC File Server, it's useful?

Access to PC Files is useful for accessing some file-types, like MS Access Files, but afaik it is of no use, if you want to process data stored in an MS SQL DB.

raphcla
Fluorite | Level 6

I dont't know. But apparently in this online manual (http://support.sas.com/documentation/cdl/en/acpcref/63181/HTML/default/viewer.htm#n12tx6b9ilne0kn198...) exist a way to use pcfile to do this connection. See this part below:

SAS_Doc.PNG

David236774
Calcite | Level 5

The server you specified in the libname will need to have the PCFiles listener running, and the ODBC data source set up.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1226 views
  • 2 likes
  • 4 in conversation