473,786 Members | 2,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10417

<sp***********@ yahoo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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****@sommarsk og.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
38885
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 for the data and Quest's (BTW this a very nice product) 'create like' function. That would work, but it seems a lot of work for something DB2 should know how to do.
1
2568
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. I want to add the functionality to copy records from subformA to subformB WITHOUT USING COPY/PASTE. The reasonfor this is that I must
4
12462
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 then dimension another variable (var1save) as "mystruct" and set var1save = var1 with the intent of changing var1 data elements and subsequently reasigning var1 back to it's original values of var1save. VB.Net makes only a shallow copy of var1...
28
7414
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 "good" in such terms, that this core data structure is changed only by atomic operations, so that the data structure is always consistent regarding the application. Only the change-operations on the dicts and lists itself seem to cause problems...
12
3777
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 laptop, on which db2/nt was installed. i had tried to use DTS service from microsoft sql server. it didn't work. any suggestion? any help would be appreciated. alan.
4
5167
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 changes in dta, dta2 is also changed... For example:
19
5761
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 care about the old data and I don't need to copy it to the new location. Is there a standard function that could do that? As far as I understand the description of the realloc() function, it _always_ copies the data to the new location, even if that...
5
34049
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. My company has two identical web sites. One copy is for our customer, and one copy is for us to test our code changes on. We developed a hard to isolate bug in the copy of the web stie for our
0
4729
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 -Guarantees that no data loss will occur if the primary database fails. To provide this level of protection, the redo data needed to recover each transaction must be written to both the local online redo log and to a standby redo log on at least...
0
9650
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.