Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it a problem to drop and create many times?
Message
From
28/06/2012 09:10:53
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Is it a problem to drop and create many times?
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01547120
Message ID:
01547120
Views:
71
Hi,

I am still making relatively many changes to various objects of my SQL Server database (mainly FK constraints, default constraints, etc.). In order to simply my job of maintenance several customers that already switched to SQL Server I decided on the following approach. I created one script file (that grows as I make many changes). And in this script file, on every update, I check for every (for example) FK constraint, and if exist, drop it. And then right after, create it. The reason I have to drop it first is I am not sure if the set FK constraint has the latest changes. Therefore, on every update of a customer database, some FK constraints are dropped and then created. Does this approach "messes" up SQL Server? That is, my concert is that some "internal" SQL Server logs grow needlessly. Or does this approach create some kind of 'bloat' of the schema table of SQL Server? Do my concerns make sense? TIA
"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
Reply
Map
View

Click here to load this message in the networking platform