Collection Contents Index Configuring Open Servers with DSEDIT CHAPTER 32.  Replicating Data with Replication Server pdf/chap31.pdf

User's Guide
   PART 5. The Adaptive Server Family
     CHAPTER 31. Adaptive Server Anywhere as an Open Server       

Characteristics of Open Client and jConnect connections


When Adaptive Server Anywhere is serving applications over TDS, it automatically sets relevant database options to values that are compatible with Adaptive Server Enterprise default behavior. These options are set temporarily, for the duration of the connection only. They can be overridden by the client application at any time.

Default settings 

The database options that are set on connection using TDS are as follows:

Option

Set to

ALLOW_NULLS_BY_DEFAULT

OFF

ANSINULL

OFF

ANSI_BLANKS

ON

ANSI_INTEGER_OVERFLOW

ON

AUTOMATIC_TIMESTAMP

ON

CHAINED

OFF

CONTINUE_AFTER_RAISERROR

ON

DATE_FORMAT

YYYY-MM-DD

DATE_ORDER

MDY

ESCAPE_CHARACTER

OFF

ISOLATION_LEVEL

1

FLOAT_AS_DOUBLE

ON

QUOTED_IDENTIFIER

OFF

TIME_FORMAT

HH:NN:SS.SSS

TIMESTAMP_FORMAT

YYYY-MM-DD HH:NN:SS.SSS

TSQL_HEX_CONSTANT

ON

TSQL_VARIABLES

ON

How the startup options are set 

The default database options are set for TDS connections using a system procedure named sp_tsql_environment. This procedure sets the following options:

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 AUTOMATIC_TIMESTAMP='ON';
SET TEMPORARY OPTION ANSINULL='OFF';
SET TEMPORARY OPTION CONTINUE_AFTER_RAISERROR='ON';
SET TEMPORARY OPTION FLOAT_AS_DOUBLE='ON';
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' 

Do not edit the sp_tsql_environment procedure    
You should not alter the procedure yourself. It is for system use only.

The procedure only sets options for connections that use the TDS communications protocol. This includes Open Client and JDBC connections using jConnect. Other connections (ODBC and Embedded SQL) have the default settings for the database.

You can change the options for TDS connections as follows:

  To change the option settings for TDS connections:
  1. Create a procedure that sets the database options you want. For example, you could use a procedure such as the following:

    CREATE PROCEDURE my_startup_procedure()
    BEGIN
      IF connection_property('CommProtocol')='TDS' THEN
        SET TEMPORARY OPTION QUOTED_IDENTIFIER='OFF';
      END IF
    END

    This procedure changes only the QUOTED_IDENTIFIER option from the default settings.

  2. Set the LOGIN_PROCEDURE option to the name of a new procedure:

    SET OPTION LOGIN_PROCEDURE= 'dba.my_startup_procedure'
  3. Future connections will use the procedure.

For Info     For more information about database options, see Database Options.

Data type mappings 

If you are developing Open Client applications, you should be aware of mappings between the data types supported by Adaptive Server Anywhere and those expected by Open Client.

For Info     For more information about these data type mappings, see Data type mappings.


Collection Contents Index Configuring Open Servers with DSEDIT CHAPTER 32.  Replicating Data with Replication Server pdf/chap31.pdf