PROC METALIB returns "ERROR: Read Access Violation..." when updating the metadata for a Microsoft SQL Server table with an extremely long index name


PROC METALIB returns an error when you update the SAS metadata for an SQL Server table that has an index with an extremely long name. You encounter this issue when you run code similar to the following:

proc metalib;
omr (LIBURI="A5WBS44O.B500000T"
user="xxxxx" password="yyyy"
);
REPORT(type = summary out = "tab_info");
SELECT ("TheTable" );
FOLDERID = "A5WBS44O.AA0000DC";
run;

In this scenario, you encounter an error similar to the following:

ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [METALIB]
ERROR: Read Access Violation METALIB
Exception occurred at (60657456)
Task Traceback
Address Frame (DBGHELP API Version 4.0 rev 5)
00007FF860657456 00000078046DE0E0 sasmetas:tkvercn1+0x36416
00007FF860634F9F 00000078046DE8B0 sasmetas:tkvercn1+0x13F5F
00007FF860630C42 00000078046DF150 sasmetas:tkvercn1+0xFC02
00007FF860623D02 00000078046DFC00 sasmetas:tkvercn1+0x2CC2
00007FF886C2F5A8 00000078046DFC08 sashost:Main+0x15268
00007FF886C359CC 00000078046DFF30 sashost:Main+0x1B68C
00007FF8C2A484D4 00000078046DFF38 KERNEL32:BaseThreadInitThunk+0x14
00007FF8C3A1E871 00000078046DFF68 ntdll:RtlUserThreadStart+0x21
If the SAS Metadata server is executing in Linux, the error and traceback will look like this:
ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:

The SAS task name is [METALIB ]
Segmentation Violation
Traceback of the Exception:

/data/sas/sashome/SASFoundation/9.4/sasexe/sas(+0x17d5fe) [0x5615818a05fe]
/data/sas/sashome/SASFoundation/9.4/sasexe/sas(+0x503fe) [0x5615817733fe]
/data/sas/sashome/SASFoundation/9.4/sasexe/tkmk.so(bkt_signal_handler+0x14b) [0x7f804d6b12db]
/lib64/libpthread.so.0(+0x12b20) [0x7f804eef6b20]
/data/sas/sashome/SASFoundation/9.4/sasexe/sasmetas(addndx+0x21a) [0x7f800537151a]
/data/sas/sashome/SASFoundation/9.4/sasexe/sasmetas(+0x3e08d) [0x7f800537008d]
/data/sas/sashome/SASFoundation/9.4/sasexe/sasmetas(updmeta+0x29a9) [0x7f800534db69]
/data/sas/sashome/SASFoundation/9.4/sasexe/sasmetas(refmeta+0x1208) [0x7f800534a488]
/data/sas/sashome/SASFoundation/9.4/sasexe/sasmetas(sasmetas+0x2d11) [0x7f800533db31]
/data/sas/sashome/SASFoundation/9.4/sasexe/sas(vvtentr+0x17f) [0x561581772fbf]
/lib64/libpthread.so.0(+0x814a) [0x7f804eeec14a]
/lib64/libc.so.6(clone+0x43) [0x7f804e46cdc3]

To work around this problem, shorten the length of the index name to 60 or fewer characters.