Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change PK column Set Idenity On
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01550735
Message ID:
01550841
Vues:
41
>>>>>Hi,
>>>>>
>>>>>I am trying to change a PK column of a large SQL Server table to set Identity On. I do that in SSMS. But I suppose since the table is fairly large (about 600,000 rows) it runs out of time and the process is never completed.
>>>>>
>>>>>Is there a way to increase amount of time SQL Server allocates for such process so that I can make the change?
>>>>>
>>>>>TIA.
>>>>>
>>>>>UPDATE: Found the setting in Tools -> Options -> Design. Set the value from 30 to 180. The strange thing, however, when I went back to the table where I wanted to change the column the Identity is Yes. And I thought that when I tried first time it reported that the update could not been completed.
>>>>
>>>>
>>>>600,000 rows are not so much in SQL Server :-)
>>>
>>>This is my understanding too. But could it be that 600,00 is a substantial number for SSMS to "deal" with? That is, my understanding is that "under the hood" when you set a column to be an Identity, the SSMS has to create temp table, set the column in the temp table as Identity and then copy all records. So the time set for this could be more than default 30 set in the SSMS. I am still, however, puzzled, why I see that the Identity is On when I thought that initially it was not successful.
>>
>>
>>Maybe you have much more things that SQL Server should deal with?
>>Are there any FKs?
>>Some triggers?
>
>Yes, the table has many (at least about 8) FKs. You are saying that this is what make the process much longer?

Yes,
Just try it w/o these FKs.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform