Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sumitha sudhakar
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic