Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sp_servercaps system procedure Next Page

sp_tsql_environment system procedure


Sets connection options when users connect from jConnect or Open Client applications.

Syntax

sp_tsql_environment( )

Remarks

The sp_login_environment procedure is the default procedure specified by the login_procedure database option. For each new connection, the procedure specified by login_procedure is called. 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 want 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.

Permissions

None

Side effects

None

See also
Example

Here is the text of the sp_tsql_environment procedure:

CREATE PROCEDURE dbo.sp_tsql_environment( )
BEGIN
  IF db_property( 'IQStore' )='OFF' THEN
    -- SQL Anywhere 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'
  SET TEMPORARY OPTION close_on_endtrans='Off'
END;