A script-enabled browser is required for this page to function properly.

Changing the primary database connection

If you change the primary connection after you have called EXEC_SQL.DEFAULT_CONNECTION, the next EXEC_SQL.DEFAULT_CONNECTION call continues to return the handle from the cache; it does not automatically return a handle to the new primary connection.

To make sure you have the correct handle, always use EXEC_SQL.CLOSE_CONNECTION (without arguments) before you change the primary connection. This allows EXEC_SQL to free up the memory resources allocated to the previous connection, without actually closing it.

See also

About the EXEC_SQL built-in package

EXEC_SQL built-in package

Connection and cursor handles

Copying data between two databases

EXEC_SQL predefined exceptions

Retrieving result sets from queries or non-Oracle stored procedures

About built-in packages