ODBC Server Reference Manual

Managing Customized Catalogs
HP NonStop ODBC Server Reference Manual429151-002
7-85
SERVERCLASS Statements
LOGIN_TIMEOUT_SEC seconds
is an INT(4) value that specifies the time in seconds SCS waits before sending a
logon denied message to a client who is trying to logon to a NonStop ODBC
Server. This option applies only when the MAX_SERVERS option has reached its
limit. SCS measures seconds from when it first receives the client’s logon request.
A value less than or equal to zero (0) disables the option, The default is -1.
CANCEL_TIMEOUT_SEC seconds
is an INT(2) value that specifies the time in seconds that SCS waits before
stopping a NonStop ODBC Server process after an SQLCancel request.
Use the SQLCancel feature as follows:
1. Set the CANCEL_TIMEOUT_SEC attribute to 0 or more seconds.
2. Set the SQLSetStmtOption option on the client: set SQL_ASYNC_ENABLE to
SQL_ASYNC_ENABLE_ON.
3. Call either SQLPrepare, SQLPrepare followed by SQLExecute, or
SQLExecDirect for a statement such as insert, update, delete, or select.
4. Make repeated calls to SQLPrepare, SQLExecute, or SQLExecDirect to
determine if the function is still processing; if it is still processing, it returns
SQL_STILL_EXECUTING.
5. Call the SQLCancel function to cancel the SQL processing. SQLCancel should
return SQL_SUCCESS and trigger a timer for the server, which times out after
the time specified for CANCEL_TIMEOUT_SEC has elapsed.
6. Continue calling SQLPrepare, SQLExecute, or SQLExecDirect until the
function returns either SQL_SUCCESS or SQL_ERROR with a specific error
communication link failure.
SQL_SUCCESS indicates that the SQL processing could not be canceled
because it finished before the time specified for CANCEL_TIMEOUT_SEC
had elapsed.
SQL_ERROR with a communication link failure indicates that the SQL
processing has been canceled and that the application cannot proceed
until a new connection is made. (Because the SQL processing took longer
than the amount of time specified for CANCEL_TIMEOUT_SEC, the SCS
process terminated the NOS process that was processing the SQL
statement. SQL_ERROR indicates that the termination was successful,
and a communication link failure indicates that the connection between the
client and server has been terminated. A new connection must be made
available for communication between client and server to proceed.)
Caution. If the NOS process is terminated while AUTOCOMMIT is on, there is a remote
possibility that data corruption might occur. This might happen if the SCS process terminates
the NOS process between the time when the NOS process ends the transaction and the time
when it replies to the client.