Usage Note 30591: Finding the schema name for the Oracle library
After you successfully assign a libref, Oracle tables might not be listed in the library. To make sure the tables are listed, you need to add the schema (owner) by including the SCHEMA= option in the LIBNAME statement.
If you are not sure what schema to use, you can submit the following code to find the appropriate schema. Note that you need to substitute your own Oracle connection information for the user-supplied values oracle-user, oracle-password, and oracle-path.
proc sql;
connect to oracle(user=oracle-user
password=oracle-password
path=oracle-path);
create table list_tab as
select * from connection to oracle
(select OWNER, TABLE_NAME from ALL_TABLES);
quit;
The SAS data set LIST_TAB will have a list of tables and their associated schema names.
Once you know the schema name, you can add it to the LIBNAME statement.
libname ora oracle user=oracle-user
password=oracle-password
path=oracle-path
schema=schema-name;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Oracle | Tru64 UNIX | 9.1 TS1M3 SP3 | |
OpenVMS Alpha | 9.1 TS1M3 SP3 | |
Linux | 9.1 TS1M3 SP3 | |
Linux on Itanium | 9.1 TS1M3 SP3 | |
HP-UX IPF | 9.1 TS1M3 SP3 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP3 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP3 | |
64-bit Enabled AIX | 9.1 TS1M3 SP3 | |
Windows Vista | 9.1 TS1M3 SP3 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP3 | |
Microsoft® Windows® for x64 | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP3 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP3 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP3 | |
z/OS | 9.1 TS1M3 SP3 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
the information for the Oracle connection (orauser, orapass and orapath) is the same info that is used in the libname which can be obtain from the Oracle DBA
proc sql;connect to oracle(user=orauser password=orapass path=orapath);
create table list_tab as
select * from connection to oracle
(select OWNER, TABLE_NAME from ALL_TABLES);
quit;
After you successfully assign a libref, Oracle tables might not be listed in the library. To make sure the tables are listed, you need to add the schema (owner) by including the SCHEMA= option in the LIBNAME statement.
Date Modified: | 2008-05-16 09:27:46 |
Date Created: | 2007-11-18 09:38:10 |