ASA SQL Reference
System Procedures and Functions
System and catalog stored procedures
Sets connection options when users connect from jConnect or Open Client applications.
sp_tsql_environment
None
None
sp_login_environment system procedure
LOGIN_PROCEDURE option [database].
At startup, sp_login_environment is the default procedure called by the LOGIN_PROCEDURE database option. If the connection uses the TDS communications protocol (that is, if it is an Open Client or jConnect connection), then sp_login_environment in turn calls sp_tsql_environment.
This procedure sets database options so that they are compatible with default Sybase Adaptive Server Enterprise behavior.
If you wish to change the default behavior, it is recommended that you create new procedures and alter your LOGIN_PROCEDURE option to point to these new procedures.
Here is the text of the sp_tsql_environment procedure:
CREATE PROCEDURE dbo.sp_tsql_environment() BEGIN IF db_property('IQStore')='OFF' THEN -- ASA datastore SET TEMPORARY OPTION AUTOMATIC_TIMESTAMP='ON' END IF; SET TEMPORARY OPTION ANSINULL='OFF'; SET TEMPORARY OPTION TSQL_VARIABLES='ON'; SET TEMPORARY OPTION ANSI_BLANKS='ON'; SET TEMPORARY OPTION TSQL_HEX_CONSTANT='ON'; SET TEMPORARY OPTION CHAINED='OFF'; SET TEMPORARY OPTION QUOTED_IDENTIFIER='OFF'; SET TEMPORARY OPTION ALLOW_NULLS_BY_DEFAULT='OFF'; SET TEMPORARY OPTION FLOAT_AS_DOUBLE='ON'; SET TEMPORARY OPTION ON_TSQL_ERROR='CONTINUE'; SET TEMPORARY OPTION ISOLATION_LEVEL='1'; SET TEMPORARY OPTION DATE_FORMAT='YYYY-MM-DD'; SET TEMPORARY OPTION TIMESTAMP_FORMAT='YYYY-MM-DD HH:NN:SS.SSS'; SET TEMPORARY OPTION TIME_FORMAT='HH:NN:SS.SSS'; SET TEMPORARY OPTION DATE_ORDER='MDY'; SET TEMPORARY OPTION ESCAPE_CHARACTER='OFF' END