Solved

I want to drop the just the Clustered Index on the Primary Key not the Primary Key itself.

Posted on 2011-02-25
4
374 Views
Last Modified: 2012-05-11
I want to drop the just the Clustered Index on the Primary Key not the Primary Key itself.


I have read the third method on link: http://www.dbtalks.com/UploadFile/sapnabeniwal01/339/
0
Comment
Question by:Mr_Shaw
  • 3
4 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 34978932
you cannot drop the index for a primary key.
you cannot change a clustered index to non-clustered without dropping it

conclusion:
you have to drop the primary key (and before that, any foreign keys pointing to it),
recreate the primary key with a non-clustered index
finally recreate the foreign keys dropped before
0
 

Author Comment

by:Mr_Shaw
ID: 34978957
Is there a quick way which I can out all the foreign key which link to my primary key which I am going to drop?
0
 

Author Comment

by:Mr_Shaw
ID: 34979055
I found a link to list all foreign keys.

http://www.mssqltips.com/tip.asp?tip=1151
0
 

Author Closing Comment

by:Mr_Shaw
ID: 34979056
thanks
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question