• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Writing databse scripts which inturn checks for the tables, columns and constraints

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

In my current appplication, i have to write a db script which identifies that all the database stucture is up to date.(testing aginast the actual db to the expected db)
While exectuing the script it shud give an error if it finds inconsistency in the database structure. I am not sure of how to do that?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oracle has a bunch of views that describe all the object in the database (e.g. all_constraints, all_tables etc.). You'll need to trawl these and watch for inconsistencies - have a glance at the docs for what they are called.

But its probably worth mentioning there are cheap database diffing tools already out there. Might one of these be an easier option?
 
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic