Problem Note 69398: Running DS2 code against long data types on SAS® Federation Server 4.4 with VARCHAR exceeding 1024 (Linux)/4096 (Windows) causes an access violation
You might encounter an issue in which running DS2 code against long data types on SAS Federation Server 4.4 with a VARCHAR data type that exceeds 1,024 characters in Linux environments and 4,096 characters in Windows environments causes an access violation.
For example, you encounter the issue when you complete the following steps:
- Create a table using code similar to the following in Microsoft SQL Server database (assuming the DSN points to a database named "sas"):
proc sql;
connect to odbc (dsn="<MS SQL Server DSN>" user="<userid>" pw="<password>");
execute (
CREATE TABLE [dbo].[TestVCMID]
(
ID INT IDENTITY(1, 1) ,
TestData VARCHAR(MAX) ,
PRIMARY KEY CLUSTERED ( ID )
)
) by odbc;
execute (DECLARE @str1 VARCHAR(MAX) = 'a'
INSERT INTO [dbo].[TestVCMID]
( TestData )
SELECT REPLICATE(@str1, 8192)
) by odbc;
quit;
- Run DS2 code similar to the following on SAS Federation Server 4.4 against a table similar to the one in step 1:
proc ds2 nolibs noprompt="driver=remts;server='<Federation Server host>';port=24141;
protocol=bridge;uid='<userid>';pwd='<password>';conopts=(driver=ds2;
conopts=(driver=sql;conopts=(DSN=DSFEDERATEDDSN)))";
data null;
dcl int ID;
dcl varchar(10) value;
dcl int i;
dcl int rc;
dcl varchar(8192) TestData;
dcl int ID;
dcl package sqlstmt query('select ID, TestData from "sas"."dbo"."TestVCMID" where ID = ?', [value]);
method run();
this.value = 1;
rc = query.execute();
if (rc = 0) then do;
rc = query.bindResults([ID, TestData]);
rc = query.fetch();
put ID=;
put TestData=;
end;
end;
enddata;
run; quit;
In this scenario, the following error message occurs:
ERROR: Access violation
The same issue occurs when you use a CLOB data type in Oracle.
The only workaround is to use a VARCHAR data type with a fixed length within the queried database table.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS Federation Server | Microsoft® Windows® for x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise 32-bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro 32-bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise 32-bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro 32-bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 10 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 11 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2008 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2008 R2 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2008 for x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 Datacenter | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 R2 Datacenter | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 R2 Std | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 Std | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2016 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2019 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2022 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise 32 bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium 32 bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional 32 bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate 32 bit | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled AIX | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled Solaris | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
HP-UX IPF | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Linux for x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
Solaris for x64 | 4.4 | 4.5 | 9.4 TS1M7 | 9.4 TS1M8 |
*
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.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2022-07-28 14:13:05 |
Date Created: | 2022-07-15 09:21:38 |