'ANSI_WARNINGS' settings error during application install


During the installation of an application, I receive the following error;

System.Data.SqlClient.SqlException: CONDITIONAL failed because the following SET options have incorrect settings: 'ANSI_WARNINGS'. 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.

I believe this occurs during an INSERT or UPDATE to a table used by the application but am still verifying this.

Doe anyone have any suggestions on why this error would occur.
I have tried setting the ANSI_WARNINGS to 'True' which did not solve this error generation.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You want to toggle your ANSI_WARNINGS.  This is either OFF or ON.  By default, it is generally OFF.

Use sp_configure to determine what state it is currently in.  Then use sp_configure to toggle it.
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
You need to set ANSI_WARNINGS to ON for creating Indexed views:
just include this in your VIEW script.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
In addition to the ANSI_WARNINGS settings, check out the other ANSI settings required for creating Indexed views:

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:

I would recommend split between

http:#a31242123, http:#a31243278, http:#a31249897
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.