Locking a SQL Editor Window to a Datasource
When executing scripts or setting query options, all directives are issued to the currently active datasource. Since the selected datasource can be changed, locking the SQL Editor window to a datasource ensure that all directives are issued to the correct datasource and that sessions are set up to terminate properly.
- Note: For information on the ways in which the selected datasource can change, see Connected/Selected Datasource options.
A SQL Editor window’s locked/unlocked status is shown by the Lock - Unlock Connection button on the SQL Editor Toolbar. For information on the toolbar, see SQL Editor Windows Basics.
|Lock - Unlock Connection button state||Description|
Manual session termination. The ISQL window will open a session and keep it open while the window remains open, unless the DBMS terminates the session due to a timeout, or the session is closed. The ISQL Window does not respond to datasource change events in other windows, and only uses the current connection for subsequent execution.
Automatic session terminations. The ISQL window will execute each statement in a new session with no session state maintained between them. When explicitly unlocking an ISQL window, the connection can be returned to the connection pool or disconnected. For details, see the DBMS specific information under ISQL Options.
To toggle the datasource locked/unlocked status of a SQL Editor window
- Click the Lock - Unlock Connection button.