• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic