BUG: NULL Padding Behavior Different on SubscriberLast reviewed: July 11, 1997Article ID: Q171285 |
The information in this article applies to:
SYMPTOMSSubscriber tables may be created with ANSI_PADDING turned ON, sometimes causing undesirable behavior with NULLable fixed-length columns (char, binary, and so on) at the subscriber. This may also be perceived as incorrect data at the subscriber. The data that is copied over during the initial synchronization does not have this problem because it uses DB-Library to connect to the subscriber to apply the BCP data and the default behavior for these SET options is OFF.
CAUSEIn SQL 6.5, the ODBC driver (build 2.65.0240) automatically sets the following option:
SET ANSI_DEFAULTS ONThis option enables the ANSI_PADDING option. This causes the tables at the subscriber to exhibit this behavior even if ANSI_PADDING is turned OFF during INSERT operations.
WORKAROUNDThe workaround for this problem is to edit the schema files (.sch files in the replication working directory) immediately after creating the publication to include the following statements before the CREATE TABLE statement:
SET ANSI_DEFAULTS OFF goAt the end of the script, after the CREATE statements, add the following statements:
SET ANSI_DEFAULTS ON goThis reverts back to ANSI standard behavior for the other statements to follow. If you do not add the SET ANSI_DEFAULTS ON statement, subsequent statements may fail because the replication process expects this option to be turned ON.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional query words: blank spaces suffixed dblib db-lib
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |