Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

SQL 2012 database behaves differently with a unique index and ignore_dup_key = on when inserting data. It works on SQL 2008 db

$
0
0

If you have a table with a unique index and ignore_dup_key = on and you INSERT rows into that table with an ORDER BY clause (because you want to control which of the duplicate key rows gets inserted),  the wrong row gets inserted in SQL2012.  It works correctly in SQL 2008.

We have recently migrated  a database from SQL 2008 to SQL 2012.  We do have few other dbs which are in compatability mode 100.  The above operation works fine in SQL 2008 dbs but not SQL 2012.

I've even tried applying the latest patch for SQL 2012 SP2 with CU2. Still the problem exists.  I'm going to call MS support, but want to know if anyone has come across this problem ?


Viewing all articles
Browse latest Browse all 12963

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>