Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ANSI_PADDING ON and OFF
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
ANSI_PADDING ON and OFF
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01556316
Message ID:
01556316
Vues:
108
Hi,

I am creating a new SQL Server database, using a script generated from another database. When I executed the script, it runs, but in one place I get error:
CREATE INDEX 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 filtered indexes and/or query 
notifications and/or XML data type methods and/or spatial index operations.
So I started looking through the script and see that there is SET ANSI_PADDING ON before every Create Table and then it is set to OFF. What is the purpose of this ON/OFF? And is there a way to find the place in the script (which is quite long) which causes the above error?

TIA.

UPDATE. I think I know what triggered the error. I added a Filtered index to one of the tables on which the script was generated. Apparently it is ok to add a filtered index in SSMS but when the script does it, the SET ANSI_PADDING conflicts.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Répondre
Fil
Voir

Click here to load this message in the networking platform