Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to update a database structure?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01524837
Message ID:
01525068
Vues:
31
>>>>>>Hi,
>>>>>>
>>>>>>How do you update a database structure (default keys, constraint, etc) installed on the customer site with the changes you have made to your copy of SQL Server database? That is, I understand that I have to create some script and send it to the customer and instruct them to run this script, correct? How do you create such a script? TIA.
>>>>>
>>>>>There is always ALTER TABLE. (In a script, as Bruce says).
>>>>
>>>>As Sergey said that not all changes can be done with the ALTER TABLE. And I am sure sooner or later I will run into such a situation. Then I will have to find another way of synchronizing mine and the customer's databases.
>>>
>>>Creating indexes is not part of ALTER TABLE command (It's CREATE INDEX command).
>>
>>Thank you for your input.
>
>
>You could learn how to do it, that way:
>Make all changes in SSMS.
>Before saving the changes right click in designer area and choose "Generate Change Script".
>Most of the scripts generated are with create a temp table, do all struct changes, apply all constraints and then drop current table and rename temp one.

I will try this. Thank you very much.
"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