Hi,



How do we control the ANSI SETTINGS for the scripts which create the objects on the subscriber database during snapshot/transactional replication.



For example: When I create a publication for AdventureWorks database Address table

the following script is created on .sch file



drop Table [Person].[Address]
go
SET ANSI_PADDING OFF
go

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON

GO
CREATE TABLE [Person].[Address](
[AddressID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[AddressLine1] [nvarchar](60) COLLATE Latin1_General_CS_AS NOT NULL,
[AddressLine2] [nvarchar](60) COLLATE Latin1_General_CS_AS NULL,
[City] [nvarchar](30) COLLATE Latin1_General_CS_AS NOT NULL,
[StateProvinceID] [int] NOT NULL,
[PostalCode] [nvarchar](15) COLLATE Latin1_General_CS_AS NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL
)



How to control these settings



The error message in Replication monitor



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)



Thanks