Initial Option Settings

You can use stored procedures to configure the initial database option settings of a user.

Connections to Sybase IQ can be made through the TDS (tabular data stream) protocol (Open Client and jConnect™ for JDBC™ connections) or through the Sybase IQ protocol (ODBC, Embedded SQL).

If users have both TDS and the Sybase IQ-specific protocol, you can configure their initial settings using stored procedures. As it is shipped, Sybase IQ uses this method to set Open Client connections and jConnect connections to reflect default Adaptive Server Enterprise behavior.

The initial settings are controlled using the LOGIN_PROCEDURE option, which is called after all the checks have been performed to verify that the connection is valid. The LOGIN_PROCEDURE option names a stored procedure to run when users connect. The default setting is to use the sp_login_environment system stored procedure. You can specify a different stored procedure. See Reference: Building Blocks, Tables, and Procedures.

The sp_login_environment procedure checks to see if the connection is being made over TDS. If it is, it calls the sp_tsql_environment procedure, which sets several options to new default values for the current connection.

Related reference
LOGIN_PROCEDURE Option