BookmarkSubscribeRSS Feed
tellmeaboutityo
Obsidian | Level 7

I'm sorry this is possibly a silly question, but I've always had IT people to set this up for me. 

 

I'm trying to connect SAS to an ODBC server.  I have both a user DSN and system DSN working.

 

I can access the tables in Oracle SQL Developer.  However, and I don't know if this is relevant, but in the navigating pane to the left, where there is a sort of 'drop down file structure', the tables are located:  server_name/other_users/libraries/table(s).  As far as SAS code to access those tables, this is as far as I've gotten: 

 

libname my_library odbc user=username password="password" datasrc=server_name;

 

This creates a library, but with no tables. 

 

I don't know what other commands or info I am missing, but recognize many people used a schema and I do not know what that is.  Can anyone please help? 

 

Thanks in advance!

 

 

1 REPLY 1
SASKiwi
PROC Star

You are on the right track. It looks like you have successfully created an Oracle database connection but are missing the SCHEMA option on the LIBNAME. The hierarchy for a database server is as follows: Server, Database, Schema, Table. I'm assuming your ODBC DSN includes the server and database. Oracle SQL Developer should give you details of the required schema which may be displayed as a prefix on table names.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 478 views
  • 0 likes
  • 2 in conversation