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
351 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

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.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now