SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 53961: A "Write permission" error occurs when you attempt to update a table using the SQL procedure

DetailsHotfixAboutRate It

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

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASMicrosoft® Windows® for x649.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows 8 Enterprise 32-bit9.3_M29.3 TS1M2
Microsoft Windows 8 Enterprise x649.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows 8 Pro 32-bit9.3_M29.3 TS1M2
Microsoft Windows 8 Pro x649.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows 8.1 Enterprise 32-bit9.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows 8.1 Enterprise x649.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows 8.1 Pro9.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows 8.1 Pro 32-bit9.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.3_M29.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.3_M29.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.3_M29.3 TS1M2
Microsoft Windows Server 2003 for x649.3_M29.3 TS1M2
Microsoft Windows Server 20089.3_M29.3 TS1M2
Microsoft Windows Server 2008 R29.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows Server 2008 for x649.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows Server 2012 Datacenter9.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows Server 2012 R2 Datacenter9.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows Server 2012 R2 Std9.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows Server 2012 Std9.3_M29.49.3 TS1M29.4 TS1M0
Microsoft Windows XP Professional9.3_M29.3 TS1M2
Windows 7 Enterprise 32 bit9.3_M29.3 TS1M2
Windows 7 Enterprise x649.3_M29.49.3 TS1M29.4 TS1M0
Windows 7 Home Premium 32 bit9.3_M29.3 TS1M2
Windows 7 Home Premium x649.3_M29.3 TS1M2
Windows 7 Professional 32 bit9.3_M29.3 TS1M2
Windows 7 Professional x649.3_M29.49.3 TS1M29.4 TS1M0
Windows 7 Ultimate 32 bit9.3_M29.3 TS1M2
Windows 7 Ultimate x649.3_M29.3 TS1M2
Windows Vista9.3_M29.3 TS1M2
Windows Vista for x649.3_M29.3 TS1M2
64-bit Enabled AIX9.3_M29.49.3 TS1M29.4 TS1M0
64-bit Enabled HP-UX9.3_M29.49.3 TS1M29.4 TS1M0
64-bit Enabled Solaris9.3_M29.49.3 TS1M29.4 TS1M0
HP-UX IPF9.3_M29.49.3 TS1M29.4 TS1M0
Linux9.3_M29.49.3 TS1M29.4 TS1M0
Linux for x649.3_M29.49.3 TS1M29.4 TS1M0
Solaris for x649.3_M29.49.3 TS1M29.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.