473,402 Members | 2,046 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,402 software developers and data experts.

SQLDMO Compare DB help needed please

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
complete this task myself in house. Would anyone have any code doing this
kind of thing or could anyone point me in the direction of help in terms of
which specific objects I should be using to complete the task I have set??
Thanks for any help you can give me
Nov 16 '05 #1
1 1826
Stephen,

You could use SQLDMO for this, but you might have a much easier time
issuing statements against each db and comparing the structures that way.
Basically, you can query for the structure of the table, query for the
primary key information, etc, etc, and you can get it in two tables (and
then comparing the values in the two tables is much easier than comparing
object trees which are disparate).

If you do this, you are going to be looking at the sysobjects,
sysindexes, and sysindexkeys table primarily.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Stephen" <St*****@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
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
complete this task myself in house. Would anyone have any code doing this
kind of thing or could anyone point me in the direction of help in terms
of
which specific objects I should be using to complete the task I have set??
Thanks for any help you can give me

Nov 16 '05 #2

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

Similar topics

3
by: silven | last post by:
Hi all I am trying to do a Bulk Copy from a "tab delmimited" text file to a table in my database. I have it almost working except when the file has too few columns for the table (table has 421...
2
by: Stephen | last post by:
I am trying to compare the tables in two similar environments using the SQLDMO object. I am able to use this object to access different SQL servers and choose two different databases. The versions...
1
by: Mohammed Abdel-Razzak | last post by:
Dear sirs I`ve used SQLDMO to make a backup to my database How can I use it to restore database? thanks Mohammed
3
by: T. | last post by:
I dumped VB and adopted C# for this version of Visual Studio. My problem! I am trying to reference an SQLDMO.Database object in C# like so: private SQLDMO.Database dbcurrent; private string...
1
by: | last post by:
Hi all My requirement is to "on button_click, backup a SQL database using SQLDMO.Backup object and update the progress in a ProgressBar. The problem is the progress bar does not update at all...
2
by: | last post by:
Hi all, continued from yesterday's posting... I still haven't found a solution to this issue. I put a breakpoint in private void SqlBackupPercentComplete(string message, int Percent) {...
1
by: | last post by:
Hi all I am posting this to check if anyone could help me. The problem still persists. I am beginner in C#. Thanks. Subject: SQLDMO.Backup and ProgressBar - help please From: ...
3
by: Dean L. Howen | last post by:
I tries to search for SQL server using SQLDMO, but it alway return null although I have updated SQL to sp3 Please tell me more.
1
by: soulcode | last post by:
Hi There, I was wondering what the process is (if there is one) to get a .NET application that uses the below code and the SQLDMO.DLL reference to work on a PC without SQL2000 installed on it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
0
tracyyun
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...
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,...

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.