BookmarkSubscribeRSS Feed
mdavidson
Quartz | Level 8
I'm querying several tables from Oracle and am wondering if there is a procedure out there that will tell me which Oracle tables my extracted fields are coming from. When reading the source code in SAS I can obviously see the names of the Oracle tables that are being used to extract my data, but I am wondering if there is a way to determine this programmatically.

If you're wondering what all of this is for -- I'm trying to write a procedure that will essentially create a report inventory so I will be able to determine which Oracle tables/columns are being used on which reports.
3 REPLIES 3
Peter_C
Rhodochrosite | Level 12
most data bases have their own internal dictionary tables.
In SAS it is called dictionary.columns or sashelp.vcolumn for the metadata about columns; dictionary.members and dictionary.tables for metadata about tables and dictionary.indexes, dictionary..... many other things.
Although your SAS session (once connected to the data base with a libname statement) will be able to provide most of what you need in dictionary.columns, you may find a more useful collection of metadata (and faster) in your database's own system tables.

good luck
peterC
polingjw
Quartz | Level 8
If you do want to use the metadata in the Oracle system tables, as Peter suggested, you can view this data from within SAS by assigning a libname to the database with “SYS” as the schema, provided that your DBA has given you the appropriate permissions to view the system tables.
LAP
Quartz | Level 8 LAP
Quartz | Level 8
Message was edited by: LAP Message was edited by: LAP

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1962 views
  • 0 likes
  • 4 in conversation