Problem Note 55487: The SCHEMA= option in a LIBNAME statement can cause errors when you create a Teradata table from PROC DS2
Error messages like the following might be generated when the SCHEMA= option is used in a LIBNAME statement to create a Teradata table from PROC DS2:
ERROR: Base table or view not found Object 'DUMMY2' does not exist.
ERROR: Unable to add rows to table.
ERROR: General error
To circumvent the problem, use the DATABASE= option instead of SCHEMA= option in the LIBNAME statement.
The sample code on the Full Code tab illustrates the problem.
Be aware that while the DATABASE= and SCHEMA= options are related, they do function differently. The DATABASE= option issues a DATABASE command, potentially altering the default database for your connection. In contrast, the SCHEMA= option alters the SQL that is submitted, prefacing table names with the SCHEMA= value. Therefore, SAS issues the following without the SCHEMA= option:
With SCHEMA=OTHERDB specified, SAS issues the following:
SELECT * FROM OTHERDB.TAB"
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows 8.1 Pro x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 10 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 R2 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 for x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 Datacenter | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 R2 Std | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 Std | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Windows 7 Enterprise x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
64-bit Enabled AIX | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
64-bit Enabled Solaris | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
HP-UX IPF | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Linux for x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Solaris for x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8 Pro x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8 Enterprise x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft® Windows® for x64 | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
z/OS 64-bit | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
z/OS | 9.4 | 9.4 | 9.4 TS1M0 | 9.4 TS1M3 |
*
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 sample code below will not run correctly as is. You need to specify the correct values for your site for the options in the LIBNAME statement.
libname dd1 teradata user="TEST_BATCH" password=XXXXXXXXXX tdpid="IDW" logdb=ABC_SAS schema=xyz_dwa;
proc ds2;
data dd1.dummy3(overwrite = yes);
method init();
end;
method run();
set shoes;
end;
method term();
end;
enddata;
run;
quit;
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2015-04-09 13:49:03 |
Date Created: | 2015-04-02 13:21:02 |