473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to copy Database Structure from one db to another w/o affecting data

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.

Any help would be appreciated.

7078895

Jul 23 '05 #1
2 10401

<sp***********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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.

Any help would be appreciated.

7078895


You can generate object creation scripts from Enterprise Manager, then run
them on the production system, but this can only create objects, it can't
compare them, so it's fine for stored procs, but not for adding individual
columns to tables. Alternatively, there are third-party tools available,
such as this one:

http://www.red-gate.com/SQL_Compare.htm

However, the real answer is probably that you need source control for your
SQL code, as well as a standard deployment method and/or tool. There are
lots of discussions in this newsgroup (and others) about this - you can
search for "source control" to find them.

Simon
Jul 23 '05 #2
(sp***********@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, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert Stearns | last post by:
For testing purposes I propose to add a schema (testing, how original) and would like to copy some of my live tables to it, both structure and data. I know I could use something like dump/restore...
1
by: Sean Howard | last post by:
Dear All, As is my want I need to do something in Access that seems simple but cannot fathom out. I have main form with two subforms, both datasheets with an almost identical table structure....
4
by: Dennis | last post by:
I have several Data Structures, say "mystruct" which contain arrays of bytes, other structures, etc. I then dimension a variable (var1) as "mystruct" and set the various elements var1 to data. I...
28
by: robert | last post by:
In very rare cases a program crashes (hard to reproduce) : * several threads work on an object tree with dict's etc. in it. Items are added, deleted, iteration over .keys() ... ). The threads are...
12
by: alanchinese | last post by:
i am a db2 newbie. we have a server hosting a db2/6000 database that restricts the use of backup, generate ddl. i wonder if there is a simple way to transfer the database structure and data into my...
4
by: Férnas | last post by:
Hey guys, In my app, I have a DataTable named "dta"... If i create a new variable of DataTable type named "dta2", and assign the dta as value, it creates a reference to dta, then, when I make...
19
by: ivan.leben | last post by:
Let's say I have a piece of allocated memory which I want to expand and reuse if possible or allocate in a different part of RAM if resizing is not possible, however, in the latter case I don't...
5
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. ...
0
by: Vinod Sadanandan | last post by:
STANDBY DATABASE MONITORING & PROTECION MODES (9iR2) This document is written for understanding and monitoring standby database configured with diffrent protection modes . MAXIMUM PROTECTION ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.