View Single Post

   
  #3 (permalink)  
Old 02-29-2008, 06:53 AM
Erland Sommarskog
 
Posts: n/a
Default Re: How to copy Database Structure from one db to another w/o affecting data

(spamproof2005@yahoo.com) writes:
> Is there a way to copy the structure from one database to another
> without affecting the actual data?
>
> For example, I added new fields and stored procedures to a db in my
> development environment. There are a lot of them.
>
> I now want to make the same changes to my production environment db but
> don't want to affect the data. Only the fields, stored procs &
> constraints and stuff pertaining to the structure of the db should be
> changed.
>
> Does anyone know of a program that can do this or can this be done in
> MS SQL Enterprise Manager.


In addition to Simon's post, I like to add that there is no tool in
this whole wide world that can read your thoughts and do what you want.
Sure, loading new stored procedures is piece of cake. But if you have
addded, changed or drop columns, there needs to be a human to decide
what is going to happen with the data. A tool can generate a boiler-
plate for you, but you are setting your data at risk, if you run it
without reviewing. And testing. (Take a backup of the production
environment, and run the update script there until everything seems
fine.)



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Reply With Quote