Problem Note 53961: A "Write permission" error occurs when you attempt to update a table using the SQL procedure
A problem might occur when a database library is defined in SAS® metadata and the DIRECTEXEC option is used. Even though you have Read Metadata, Read, and Write permissions set for the table, if you have the DIRECTEXEC option set and attempt to update the table using PROC SQL, the following error occurs:
ERROR: The Write permission is required to update data in table/view when updating table in metadata.
For example, the problem occurs when you define an Oracle library in the metadata and you have set the following permissions for sasdemo user:
- RM on the library
- RM+R on a table from the library
For this example, the library ORALIB is registered in the above metadata server configuration. And you would submit the following code from a SAS session.
libname ora meta library='ORALIB';
options sql_ip_trace=all;
options nodbidirectexec;
proc options option=dbidirectexec;run;
proc sql;
update ora.test set loc='BOSTON' where deptno>30;
quit;
In this case, the error is returned:
SQL_IP_TRACE: Some of the SQL was directly passed to the DBMS.
ERROR: The Write permission is required to update data in table/view ORA.TEST.DATA.
ERROR: ROLLBACK issued due to errors for data set ORA.TEST.DATA.
options dbidirectexec;
proc options option=dbidirectexec;run;
proc sql;
update ora.test set loc='BOSTON' where deptno>30;
quit;
The following succeeds:
SQL_IP_TRACE: passed down query: update TEST set TEST."LOC"='BOSTON' where TEST."DEPTNO" > 30
libname ora clear;
As you see, with DBIDIRECTEXEC, permissions on the table are ignored.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | Microsoft® Windows® for x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows 8 Enterprise 32-bit | 9.3_M2 | | 9.3 TS1M2 | |
Microsoft Windows 8 Enterprise x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows 8 Pro 32-bit | 9.3_M2 | | 9.3 TS1M2 | |
Microsoft Windows 8 Pro x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows 8.1 Enterprise x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows 8.1 Pro | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows 8.1 Pro 32-bit | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3_M2 | | 9.3 TS1M2 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3_M2 | | 9.3 TS1M2 | |
Microsoft Windows Server 2003 Standard Edition | 9.3_M2 | | 9.3 TS1M2 | |
Microsoft Windows Server 2003 for x64 | 9.3_M2 | | 9.3 TS1M2 | |
Microsoft Windows Server 2008 | 9.3_M2 | | 9.3 TS1M2 | |
Microsoft Windows Server 2008 R2 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2008 for x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2012 Datacenter | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2012 R2 Datacenter | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2012 R2 Std | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2012 Std | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.3_M2 | | 9.3 TS1M2 | |
Windows 7 Enterprise 32 bit | 9.3_M2 | | 9.3 TS1M2 | |
Windows 7 Enterprise x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Home Premium 32 bit | 9.3_M2 | | 9.3 TS1M2 | |
Windows 7 Home Premium x64 | 9.3_M2 | | 9.3 TS1M2 | |
Windows 7 Professional 32 bit | 9.3_M2 | | 9.3 TS1M2 | |
Windows 7 Professional x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Ultimate 32 bit | 9.3_M2 | | 9.3 TS1M2 | |
Windows 7 Ultimate x64 | 9.3_M2 | | 9.3 TS1M2 | |
Windows Vista | 9.3_M2 | | 9.3 TS1M2 | |
Windows Vista for x64 | 9.3_M2 | | 9.3 TS1M2 | |
64-bit Enabled AIX | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
HP-UX IPF | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Linux | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Linux for x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
Solaris for x64 | 9.3_M2 | 9.4 | 9.3 TS1M2 | 9.4 TS1M0 |
*
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.
ERROR: The Write permission is required to update data in table/view when updating table in metadata.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2015-10-05 10:08:09 |
Date Created: | 2014-08-21 15:38:53 |