When using a Cloud Data Exchange (CDE) LIBNAME statement with the DEFER=YES option, you might encounter a segmentation violation or a resource unavailability issue. When using either PROC DATASETS or PROC DS2, an error message similar to the following might appear in the SAS log:
ERROR: An exception has been encountered. Please contact technical support and provide them with the following traceback information:
The SAS task name is [DATASETS] Segmentation Violation
ENCRYPTED TRACEBACK BEGIN
...
ENCRYPTED TRACEBACK END
or
When DEFER=YES is specified as an option in the CDE LIBNAME statement, the connection to the data source occurs when a data source table is opened. To work around the issue, do not specify DEFER=YES in the CDE LIBNAME statement. Instead, use the CONNECT TO option in PROC SQL.
You can force the database connection attempt by using the CONNECT TO syntax in PROC SQL. The example below does the following:
PROC SQL;
CONNECT TO dbms-name AS myconn (user=your_user password=your_password ...);
/* ... your SQL Pass-Through statements ... */
DISCONNECT FROM myconn;
QUIT;