Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

SELECT failed because the following SET options have incorrect settings: ANSI_PADDING

$
0
0

I come across the following error message quite frequently whenever I have to reinitialize any of the subscribers. Even though I know how to resolve it but always wondered why it would be produced at the first place as offending script is auto-generated by snapshot agent.

 

Error messages:

SELECT failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods. (Source: MSSQLServer, Error number: 1934)
Get help: http://help/1934

SELECT failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods. (Source: MSSQLServer, Error number: 1934)
Get help: http://help/1934

As a resolution what I have to do is to go to snapshot folder and update sch file for the offending table; i.e; change SET ANSI_PADDING from OFF to ON in sch file and it resolves the error message. What I have observed, though, that ANSI_PADDING is always off for those tables which contain only numeric data types. That is how I suppose it should be as I see that setting is only relevant to char, varchar, binary, and varbinary data types.

 

BOL: We recommend that ANSI_PADDING always be set to ON. In a future version of SQL Server ANSI_PADDING will always be ON and any applications that explicitly set the option to OFF will produce an error.

 

That explains why replication insist for having it ON but what I don't understand is that why Snapshot agent generated script have it as off?

 

I have enabled ANSI_PADDING from database properties but it would make no difference whatsoever.


Viewing all articles
Browse latest Browse all 4054

Trending Articles