Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Add primary key to a partioned table

Author  Topic 

sqlserverdeveloper
Posting Yak Master

243 Posts

Posted - 2008-11-16 : 00:57:10
I have created partition on an existing table, Steps I followed are as follows:

Created partition function
Created partition scheme
I tried to drop index , but could not because of composite primary key, so I have dropped primary key and recreated clustered Index on partition scheme assuming that primary key will be added automatically after creation of index, but it did not create primary key.
So I am trying to figure it out how to add composite primary key to table. I cannot leave table with out primary key.

So far I see that data in the table is partitioned as I required, but only composite primary key is missing on the table.
Can any one please advise how can I resolve this problem. Thanks!

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-16 : 12:29:56
First of all,
1) Why did you drop primary key if it was clustered? You should have moved(Clustered Primary Key) to different FG.If records are unique,can you add primary key again with composite key?
Go to Top of Page
   

- Advertisement -