Was this helpful?
Direct Execute Immediate
The DIRECT EXECUTE IMMEDIATE statement is used to issue (SQL) statements to the host DBMS without gateway processing. These statements may or may not be SQL and are typically host-specific.
A DIRECT EXECUTE IMMEDIATE statement can return a status message or completion code, but cannot return data to the calling program. As a result, only statements that do not return data can be used with a DIRECT EXECUTE IMMEDIATE statement.
For similar support for SELECT statements that can return data to the calling program, see Select... With.
Statement Restrictions
The following restrictions are imposed on which statements may be issued using DIRECT EXECUTE IMMEDIATE:
Certain statements are not permissible using DIRECT EXECUTE IMMEDIATE. The gateway prevents the following statements from executing:
commit
rollback
alter session set NLS_DATE_FORMAT
alter session set NLS_TERRITORY (see note)
alter session set NLS_NUMERIC_CHARACTERS (see note)
Note:  The support status of these statements may change with a future release of the Enterprise Access product.
DIRECT EXECUTE IMMEDIATE should be used with caution since its use makes an application DBMS dependent unless wrapped in "if oracel, if mssql, ..." style checks in the application. For this reason, you should not use DIRECT EXECUTE IMMEDIATE with ING_SET (and related environment variables) if the client is expected to connect to multiple back-end server types.
Note:  You must execute all target DBMS server utilities directly on the host operating system because they are not available through the gateway.
Last modified date: 02/16/2024