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
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 143

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

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.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

688 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