Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternate Key/Unique Key maintenance
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01462924
Message ID:
01463024
Vues:
23
Thank you. The most useful - in terms of articles - was one of those that Sergey provided. But I will follow your link to the tread as well.

>By strange conincidence here is another thread on this very topic http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/fca39561-46b5-484b-8674-e7a29dbd8222
>
>>>>Some time ago I set up an alternate key (unique key) index (named AK_CompReference2). Now I want to drop it but when I try to Delete it in the SSMS I get error that "the index cannot be dropped because it is being used in UNIQUE KEY constraint enforcement" But what if I don't want this enforcement any more? How can I drop this index?
>>>
>>>You may want to first drop unique constraint.
>>>
>>>Check http://msdn.microsoft.com/en-us/library/ms177420.aspx
>>
>>I don't see any items/constraints in the Constraints node in the SSMS for this table. The only item I see (that I am attempting to get rid of) is in the Keys node. Here is the script for this key that I want to delete:
>>
>>
>>USE [MyDataBasep]
>>GO
>>ALTER TABLE [dbo].[luCompReference2] ADD  CONSTRAINT [AK_CompReference2] UNIQUE NONCLUSTERED 
>>(
>>	[CompRef2] ASC
>>)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
>>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform