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

Home Posts Topics Members FAQ

Database Compare Application help needed

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 than I am required and I have to design
an application tailored to my businesses needs. At present there is a system
in VB.6.0 but I have to design a C#.net application using the latest SQL
objects available to do this. I was wondering if anyone could point me in
the direction of any source code/ solutions I could look at for .net which
allow me to compare databases. Or if anyone had any help and could point me
in the right direction I would be very greatful. Thank you very much. Even
if anyone know what objects are available in .net to compare databases I
would be very grateful
Jul 21 '05 #1
3 2076
Hey Stephen,

One option may be more to use C# as a reporting tool in the sense that most
of the work should be done within SQL Server. For exampley, you might
create a linked server within one SQL Server that points to the master
database of the one you wish to compare to. With this link defined, you
could then run queries comparing the two tables essentially as though they
are both right there.

You'd probably want these queries bundled into one or (likely) more stored
procedures that could then be called from a .NET app. I would envision then
returning rowsets of the differences. On the C# side, I'm sort of
envisioning a list of the comparisons that exist, allowing a user to maybe
select which to run then calling the corresponding stored procedure and
placing the results in a datagrid.

That's kind of a basic glossing over, but it sounded to me like you were
more focused on doing the work on the C# side, whereas comparing structured
data is one of the cores of an RDBMS.

HTH,

John
"Stephen" <St*****@discus sions.microsoft .com> wrote in message
news:39******** *************** ***********@mic rosoft.com...
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 than I am required and I have to design an application tailored to my businesses needs. At present there is a system in VB.6.0 but I have to design a C#.net application using the latest SQL
objects available to do this. I was wondering if anyone could point me in
the direction of any source code/ solutions I could look at for .net which
allow me to compare databases. Or if anyone had any help and could point me in the right direction I would be very greatful. Thank you very much. Even if anyone know what objects are available in .net to compare databases I
would be very grateful

Jul 21 '05 #2
Hello Stephen,

I do not know what open source libraries exist. I trust you can google for
yourself and see.
I did stumble across this older sample app:
http://www.c-sharpcorner.com/databas...e_explorer.asp

There's no objects in the framework, that I've been able to find, that are
particularly good for the kind of comparisons you want. Sure, the DataSet
contains definitions of rows and columns, but it doesn't help you find
foreign keys, or stored proc dependencies, and the like.

If all your databases are SQL Server, and your app will run on the SQL
Server machine with the highest version number (in other words, if you are
comparing SQL Server 2000 with SQL Server 7.0, you'd need to run your app on
the SQL 2000 box)... if all that is true, you can use SQL-DMO. These are
COM components that provide a complete object heirarchy for structural
comparisons, scripting, and database manipulation. (The Enterprise Manager
uses SQL DMO to actually perform it's work, so if it can be done with EM,
you can do it with SQL-DMO).

If any DB is not SQL Server, then you are out of luck with DMO. Also, DMO
is not useful to run from a client, since it is not legal to install it
there.

If you need to compare from a client app, then you will need to inspect the
SQL Server system tables themselves. Unlike John, I do believe you should
do this work in C#. Since you are comparing two databases, there is no
guarantee that the databases can, or should, talk to each other, setting up
a linked db may not be a viable solution. Even if it is viable, it is not
likely to be something you'd be allowed to do in an evironment where
security matters even a little bit. (You should meet some of the data
security folks where I work! These guys mean business. They audit
everything and they have the power to shut off any app that doesn't abide by
the rules.)

There are probably books and online tutorials that will tell you how to make
sense of the system tables... I can't help much there. I know that some of
it can be gleaned from SQL Books Online.

Hope this helps,
--- Nick

"Stephen" <St*****@discus sions.microsoft .com> wrote in message
news:39******** *************** ***********@mic rosoft.com...
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 than I am required and I have to design an application tailored to my businesses needs. At present there is a system in VB.6.0 but I have to design a C#.net application using the latest SQL
objects available to do this. I was wondering if anyone could point me in
the direction of any source code/ solutions I could look at for .net which
allow me to compare databases. Or if anyone had any help and could point me in the right direction I would be very greatful. Thank you very much. Even if anyone know what objects are available in .net to compare databases I
would be very grateful

Jul 21 '05 #3
Nick makes an excellent point on security. You'll definitely need to
consider such things.

My history has been (and this is meant to give an idea of where the
suggestion came from than because I think you want to know my life story
from DNA thru this afternoon) in smaller shops where such operations are
generally done within a company umbrella where one department shares
another's data freely. If it gives you an idea of "small shop", currently,
I AM the "security guys" <g>.

Also, having "grown up" in dBase dialects, where language and data are more
closely tied, I'm probably more skewed towards doing the anaylsis directly
from stored data than may be considered best practice in an n-tier world.

"Stephen" <St*****@discus sions.microsoft .com> wrote in message
news:39******** *************** ***********@mic rosoft.com...
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 than I am required and I have to design an application tailored to my businesses needs. At present there is a system in VB.6.0 but I have to design a C#.net application using the latest SQL
objects available to do this. I was wondering if anyone could point me in
the direction of any source code/ solutions I could look at for .net which
allow me to compare databases. Or if anyone had any help and could point me in the right direction I would be very greatful. Thank you very much. Even if anyone know what objects are available in .net to compare databases I
would be very grateful

Jul 21 '05 #4

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

Similar topics

5
2827
by: democratix | last post by:
Hi, I've only got a couple years experience developing for Access but have recently been experimenting with HTML/javascript for gui and client-side scripting, mysql for database and php for server-side scripting. I've been running it all on the development machine until the application I'm building is advanced enough to start optimising/testing with network lag in mind. So it's no slower, and in some ways at least it seems faster.
1
1474
by: Frank Maestas | last post by:
Hello, I have a company MySQL database containing e-mail addresses. Some of these addresses are bad. I have a text file with the addresses I need to remove from the MySQL database. Is there a way to compare the database against my text file, then when an address matches, remove the row from the database? Should I imnport the text file to new database then do the compare? What I'm stuck on is how to execute a compare then remove the...
20
17627
by: xixi | last post by:
hi, we use db2 udb v8.1 on windows, i am trying to use federated database objects to create wrapper, even though i have update dbm cfg using federated yes, i still get error "the instance for the db is not enable for the specified action", do i miss sth else?
7
34780
by: TJoker .NET | last post by:
I'm developing an VB.NET Windows Forms application that uses CR for VS.NET (original version shipped with VS.NET 2002 - my VS.NET has the latest SP installed, no SPs for CR). My reports get their data from ADO.NET Datasets that are pre-populated by other modules of the application. What I need to do is to use these datasets as the datasources of my reports. Fine, I know how to do that and it works perfectly on my development box. The...
3
408
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...
3
3762
by: Benny Ng | last post by:
Dear all, The following is the source. The password is encrypted and saved into the Binary in SQL2K. Now I want to create a new page to compare the existed password and the password that in the database. But I don't know how to used source code to solve it. Can you help me? Urgently! <<<<<<Save Method<<<<<<
10
7694
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on close' I think that I have read in some threads (althoug I cannot find them now) that others place such tables in a local, linked database. I could do this but I am interested to know what would be the advantages. And disadvantages, if any. Any...
0
3320
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
3292
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
8619
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
8818
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 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...
1
6487
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5832
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
4338
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...
0
4575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2996
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
2
2261
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1971
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.