473,695 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compare two databases and update objects?

Is there a way to compare two databases one being an old
database and the second being a new database, I will
update the old database's objects to match the new database's

Is there SQL code that could do this easily?

How do you do this if you deal with the same scenario?

Thank you

Jul 23 '05 #1
2 2096
serge (se****@nospam. ehmail.com) writes:
Is there a way to compare two databases one being an old
database and the second being a new database, I will
update the old database's objects to match the new database's

Is there SQL code that could do this easily?
The standard recommendation is to look at SQL Compare from Red Gate.
How do you do this if you deal with the same scenario?

I'm avoiding it by having my code under version control, and keeping
track of what I shipped. Our load tool actuall has its own set of tables
to do this.
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
Jul 23 '05 #2
DB Ghost is a tool that will compare databases and upgrade a target
database to make it match a source.

It also integrates with any source control system so the 'source'
database becomes a simple set of drop/create scripts. The power of
this approach is that it enables any size of development team to work
on the schema under source control at the same time using the same
mechanism that they do for other application code such as C#, Java, VB,
C++ etc. This provides you with a full audit trail of who made what
changes to the schema, when and why.

This process is one that delivers more as your development needs
increase. For example it doesn't matter how many developers work on
the scripts in source control, the amount of time required to extract
all the scripts and perform the upgrade doesn't noticeably increase.
Also, this process works perfectly with parallel development as it
means that concepts such as isolated worksets and merges between code
lines becomes as easy as it is with normal application code. Try doing
parallel development with delta scripts, it is a completely error prone
manual process of looking through the delta scripts to work out what
has been changed!

Diff tools such as SQL Compare are great at what they do but,
ultimately, they are really just there to get you out of trouble.

This trouble is normally caused by not having proper processes and
tools to control changes to your schema.

DB Ghost plus any source control system gives you such a process.

Build, Compare and Synchronize = Database Change Management for SQL

Jul 23 '05 #3

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

Similar topics

by: Stephen | last post by:
I have to write a .Net application which can compare SQL Databases including things like: - DB structure, PK's, FK's, indexes and types of indexes i.e. should be able to detect if the same index has cascade set on one db and not on another, or unique on one and not the other, Constraints, Triggers, Stored procs, Users, Roles. I downloaded the SQL Data Compare 3.0 application 14 day trial and it seemed really good however does a bit more...
by: serge | last post by:
Is there a stored procedure to allow me to compare two SQL objects? In my case for example I want to compare two stored procedures on two different databases? If there is no SP that does comparison, would there be any code in SQL DMO that does this? How does someone learn SQL DMO? Does SQL Server 2000 have by default DMO learning material or I have to search for books?
by: Rob Geraghty | last post by:
I've just spent some time looking through FAQ sites and searching the google archives of this newsgroup, but I still haven't been able to find a clear explanation of an issue with multi-user databases. Essentially I have two questions; 1) Does the system.mdw file have any significance to multi-user sharing of an Access 97 database other than security? 2) Can any number of users open an Access 97 database using the same
by: Mark | last post by:
All, Excuse the re-post but I have found something which works for the UserID but not for the Password (see previous post below). The problem is I don't understand how it works and therefore cannot update it to do as I need. Could someone explain A) how to modify this to make sure the username & password are valid or B) How the below works so I can do it myself. I have never seen "PARAMETERS" used before in SQL which has thrown me...
by: Stephen | last post by:
I am trying to compare the tables in two similar databases using the SQLDMO object. I am able to use this object to access different SQL servers and choose two different databases. The versions of the databases are slightly different so I would like to be able to compare them for things like datatypes, primary and foreign keys, number of records etc. I know that there are packages out there that do this kind of thing but I have to...
by: TDS News | last post by:
Here's my code... Private oConn As New OleDb.OleDbConnection() Private oCommand As New OleDb.OleDbCommand() Private oDataAdapter As New OleDb.OleDbDataAdapter() Private oDataSet As New DataSet() Public Event Err() Public Sub Init()
by: lennon1 | last post by:
Hi, I have already started learning .NET and I have a question. If I want to do anything - Display Data, Navigate, Update - with database (SQL Server) in Visual Studio 2005, do I have to use all this objects : - DATASET - sqlDataAdapter - BindingSource - sqlConnection I usually write database applications in Delphi, but now I want to learn Dot Net platform ant it's quite diffrent than programming
by: Fred Exley | last post by:
I have a traditional application using a database and procedural code that works fine. I'm re-writing it using the OOP methodology, just to see how this may be the better way to do things. I think I've got a pretty good grasp of the three pillars of OOP, and have objects properly defined using inheritance, encapsulation, etc. as appropriate. Now it's time to do some processing using real data, and the data resides on a relational...
by: Lamis | last post by:
Hi, what is the best way to compare 2 haschtables contatining objects. the objects has 2 property, name & value. I need to print out the differences -- LZ
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,...
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...
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...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.