SAS/ACCESS® software takes advantage of database management system (DBMS) capabilities by passing certain SQL operations to the DBMS whenever possible. This function can reduce data movement and therefore improve performance. The performance impact can be significant when you access large DBMS tables and the SQL query that is passed to the DBMS subsets the table to reduce the number of rows. SAS/ACCESS software sends operations to the DBMS for processing in these situations.
When you use the SAS/ACCESS LIBNAME statement, you submit SAS statements that SAS/ACCESS software can often translate into the SQL of the DBMS and then pass to the DBMS for processing. With the automatic translation abilities of SAS/ACCESS software, you can often achieve performance benefits without needing to write DBMS-specific SQL code.
SQLIPONEATTEMPT System Option
Typically, the SQL query that SAS generates for the DBMS is highly optimized. However, in cases when SQL query generation is partial (or not optimal), the partial resulting data is read into SAS, where the remainder of the SQL query is processed. The SQLIPONEATTEMPT option specifies that if the first attempt to optimize the SQL query is not acceptable to the DBMS, no further attempts are made. Then the log shows a SQL procedure error, as shown here:
You can obtain more information in the SAS log when you add the SAS system options SQL_IP_TRACE and MSGLEVEL=I, as shown here:
The resulting log information looks similar to this:
SQL_DBIDIRECTEXEC_IP_ONE_ATTEMPT Environment Variable
There might also be situations where the highly optimized SQL query is passed to the database, but an error occurs during processing. For example, an out-of-space condition occurs. In this case, SAS/ACCESS software might attempt to rewrite the query and send it partially to the database. Setting the environment variable SQL_DBIDIRECTEXEC_IP_ONE_ATTEMPT to YES or Y prevents the rewrite of the query.
The environment variable can enable you to control what happens when an execution-type error occurs. The case-sensitive environment variable can be set as follows:
options set=SQL_DBIDIRECTEXEC_IP_ONE_ATTEMPT=YES;
options set=SQL_DBIDIRECTEXEC_IP_ONE_ATTEMPT=Y;
options set=SQL_DBIDIRECTEXEC_IP_ONE_ATTEMPT=NO; /* default setting */
options set=SQL_DBIDIRECTEXEC_IP_ONE_ATTEMPT=N; /* default setting */
You must also use the SAS system option DBIDIRECTEXEC. To enable the additional execution or run-time checking, use this code:
The SQLIPONEATTEMPT option is not required when using SQL_DBIDIRECTEXEC_IP_ONE_ATTEMPT=YES.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | Base SAS | z/OS | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 |
z/OS 64-bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft® Windows® for x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8 Enterprise 32-bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8 Enterprise x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8 Pro 32-bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8 Pro x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8.1 Enterprise x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8.1 Pro 32-bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 8.1 Pro x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows 10 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows Server 2008 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows Server 2008 R2 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows Server 2008 for x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows Server 2012 Datacenter | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows Server 2012 R2 Std | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Microsoft Windows Server 2012 Std | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Enterprise 32 bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Enterprise x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Home Premium 32 bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Home Premium x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Professional 32 bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Professional x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Ultimate 32 bit | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Windows 7 Ultimate x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
64-bit Enabled AIX | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
64-bit Enabled Solaris | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
HP-UX IPF | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Linux for x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 | ||
Solaris for x64 | 9.4_M4 | 9.4_M7 | 9.4 TS1M4 | 9.4 TS1M7 |
A fix for this issue for Base SAS 9.4_M6 is available at:
https://tshf.sas.com/techsup/download/hotfix/HF2/D9T.html#63923A fix for this issue for Base SAS 9.4_M5 is available at:
https://tshf.sas.com/techsup/download/hotfix/HF2/B6Q.html#63923Type: | Usage Note |
Priority: | |
Topic: | Data Management ==> Data Sources ==> External Databases Data Management ==> Data Sources ==> External Databases ==> Adabas Data Management ==> Data Sources ==> External Databases ==> AsterData Data Management ==> Data Sources ==> External Databases ==> Datacom Data Management ==> Data Sources ==> External Databases ==> DB2 Data Management ==> Data Sources ==> External Databases ==> Dbase Data Management ==> Data Sources ==> External Databases ==> GreenPlum Data Management ==> Data Sources ==> External Databases ==> HP Neoview Data Management ==> Data Sources ==> External Databases ==> IDMS Data Management ==> Data Sources ==> External Databases ==> IMS Data Management ==> Data Sources ==> External Databases ==> Informix Data Management ==> Data Sources ==> External Databases ==> Ingres Data Management ==> Data Sources ==> External Databases ==> Lotus Data Management ==> Data Sources ==> External Databases ==> MS Access Data Management ==> Data Sources ==> External Databases ==> MS Excel Data Management ==> Data Sources ==> External Databases ==> MS SQL Server Data Management ==> Data Sources ==> External Databases ==> MySQL Data Management ==> Data Sources ==> External Databases ==> Netezza Data Management ==> Data Sources ==> External Databases ==> ODBC (Open Database Connectivity) Data Management ==> Data Sources ==> External Databases ==> OLEDB Data Management ==> Data Sources ==> External Databases ==> Oracle Data Management ==> Data Sources ==> External Databases ==> Oracle RDB Data Management ==> Data Sources ==> External Databases ==> PostgreSQL Data Management ==> Data Sources ==> External Databases ==> Redbrick Data Management ==> Data Sources ==> External Databases ==> SPSS Data Management ==> Data Sources ==> External Databases ==> Sybase Data Management ==> Data Sources ==> External Databases ==> Sybase IQ Data Management ==> Data Sources ==> External Databases ==> System 2000 Data Management ==> Data Sources ==> External Databases ==> Teradata SAS Reference ==> SQL |
Date Modified: | 2022-02-08 09:38:48 |
Date Created: | 2019-03-27 05:28:43 |