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
Opal | Level 21

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
PROC Star

@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 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!

From SAS Users blog
Want more? Visit our blog for more articles like these.
5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

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