Database Compare
-
Hi all, I am thinking about writing a program to compare two databases. Basically I need to know what tables are missing or added and what the differences between them are. Has anyone done anything like this before that could give me some pointers? I will be trying to do it using C# and hoping it won't be database specific (if possible). Thanks Ash
-
Hi all, I am thinking about writing a program to compare two databases. Basically I need to know what tables are missing or added and what the differences between them are. Has anyone done anything like this before that could give me some pointers? I will be trying to do it using C# and hoping it won't be database specific (if possible). Thanks Ash
Hi Ash, Assuming you have the privs., you can run this query:
select * from sysobjects
against each database. That will give you a list of everything in the DB: tables, views, sprocs, triggers, constraints, etc. Use the xtype column to identify what each object is. hth, Bill -
Hi Ash, Assuming you have the privs., you can run this query:
select * from sysobjects
against each database. That will give you a list of everything in the DB: tables, views, sprocs, triggers, constraints, etc. Use the xtype column to identify what each object is. hth, BillThanks Bill, I have done that before but unfortunately it makes it database specific. eg have to use all_tables in Oracle. I was hoping maybe ADO.net had a generic method of getting the structure of the database similar to how you create a XML schema by dragging over the tables from the database explorer. Ash
-
Thanks Bill, I have done that before but unfortunately it makes it database specific. eg have to use all_tables in Oracle. I was hoping maybe ADO.net had a generic method of getting the structure of the database similar to how you create a XML schema by dragging over the tables from the database explorer. Ash
Yes, you can probably write it yourself but when you browse to www.planetsourcecode.com you can probably find a solution there. Grtz, Guus