DSC (Disconnect) logs a session off the Teradata Database.
- Check the Return Code; if zero, the disconnect was successfully completed.
- If the session has a pending request, a return code of 336 (request may be aborted) is returned to the application. The session is still logged off but the response is lost.
- If there is an active transaction at the time of the DSC, the Teradata Database rolls back all work performed within that transaction prior to completing the logoff.
- DSC should be used to clean up session context even if the connect was not successful (initial or final status).
- In Two-phase commit mode, Disconnect ensures that the current session is aborted at syncpoint if the session has performed any uncommitted Teradata SQL requests.
DBCAREA Input Fields
Before using the Disconnect function, the application must set the DBCAREA fields in the first table and may optionally set those in the second table depending on the application's requirements.
|DBCAREA Input Fields Required for the Disconnect Function|
|DBCAREA Input Fields Optional for the Disconnect Function|
DBCAREA Output Fields
Upon completion of the Disconnect function, CLIv2 will always set DBCAREA fields in the table.
|DBCAREA Output Fields always set by the Disconnect Function|