Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

problem regarding unique key in partitioned table

$
0
0

Hi,

  I am facing a problem regarding unque key in partitioned table

I read the following link regarding partitioning unqiue key

http://msdn.microsoft.com/en-us/library/ms187526.aspx

"Sql server 2008r2 only investigate only a single partition to make sure no duplicate of a new key value already exists in the table"

My situation,

I need to ensure uniqueness in a column on a partitioned table and I cannot create non-align unique key (Non-align indexes have to be rebuilt if I perform a switch partition )I must create an aligned unqiue index because I need to perform switch partition on that partitioned table. Switch partition cannot be performed on tables with non-align index. I must disable the index and rebuild it once switch partition has completed.aligned

Does anyone know how do I create an unique index and also ensure switch partition can be performed on that partitioned table without rebuilt that index?

I tried using INSTEAD OF triggers to check duplicate keys on partition. if there are duplicate records, insertation of the records will not take place but it does not work if there are concurrent sessions inserting records into that table

does anyone know how do I overcome the uniqueness issue in partitioned tables

thank you


Viewing all articles
Browse latest Browse all 15694

Trending Articles



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