Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Database Compare

Database Compare

Scheduled Pinned Locked Moved Database
csharpdatabasequestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Ganjah786
    wrote on last edited by
    #1

    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

    B 1 Reply Last reply
    0
    • G Ganjah786

      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

      B Offline
      B Offline
      Bill Dean
      wrote on last edited by
      #2

      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

      G 1 Reply Last reply
      0
      • B Bill Dean

        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

        G Offline
        G Offline
        Ganjah786
        wrote on last edited by
        #3

        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

        G 1 Reply Last reply
        0
        • G Ganjah786

          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

          G Offline
          G Offline
          gpa2000
          wrote on last edited by
          #4

          Yes, you can probably write it yourself but when you browse to www.planetsourcecode.com you can probably find a solution there. Grtz, Guus

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups