1

I am trying to restore a SQL Server 2014 database in SQL Server 2005. I am doing by generating the complete script (with schema and data) from SQL Server 2014.

I get an error saying

'INSERT 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.'

and

'Cannot insert explicit value for identity column in table 'T_GASAdminNote' when IDENTITY_INSERT is set to OFF.'

I have searched for solution but have not been able to rectify the problem. I have tried the solution given in this link, but it didn't help me.

Can anyone suggest me some solutions for restoring the database.

asked Dec 26, 2015 at 6:51

1 Answer 1

3

Update: sorry - misread your question...

The first error means just that - for some operation you're trying to do, your SET ANSI_PADDING setting is wrong. Read the official documentation on ANSI_PADDING on MSDN to learn more about this setting. Check what your setting is now - obviously, if that error occurs, you need the other setting for that operation you're attempting to do.

The second error means that your table T_GASAdminNote has an identity column, and you're trying to insert values into that column, but without first enabling this by using SET IDENTITY_INSERT T_GASAdminNote ON (and don't forget to disable the option after you're done!)

answered Dec 26, 2015 at 8:20
Sign up to request clarification or add additional context in comments.

2 Comments

I generated scripts and i got those errors while running the script
That can happen. It's always a good idea to review generated scripts before running them.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.