Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataBase difference

Status
Not open for further replies.

db2sachin

Programmer
Jun 9, 2003
24
0
0
AU
We have two database servers. Both the servers have same databases. Actually we set up two same databases one for development & other for testing. Whenever we make changes to development DB we replicate the same to test DB as well. But despite of taking care sometimes we miss to replicate changes. Now I want to check which table is different alongwith its columns, datatypes, default & nulls. How do I do it ? I tried some queries on SYSCAT.COLUMNS but I'm getting cartesian products. Pls help.
 
The easiest way I can think of is to do a db2look on both databases and 'diff' the output ..

If there are too many differences, you can do something like :

db2look -d <dbname> -e -x -l | grep -yp <objectname>

This will retrieve all references to the object specified in the object name (other unrelated objects can also be retruned here, like, a table name is mydata and a filed in another table name is mydata) ... But, it is something you can make use of ...

Cheers

Sathyaram

More DB2 questions answered at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top