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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to compare DDLs/Indexes/Collect Stats between Databases?

Status
Not open for further replies.

IamVenkat

IS-IT--Management
Nov 22, 2005
1
US
Hi All,
We have two databases (DEV_RETAIL and TEST_RETAIL) used for different loads in the same Teradata Box. Different people are using these environments and before promoting the stuff from DEV_RETAIL to TEST_RETAIL to Production, i would like to make sure that all the below items are exactly matching between DEV and TEST.

1. DDL
2. Indexed (Primary,Secondary etc)
3. Statistics

Can we do all of the above by accessing DBC tables? Also, how can i achieve this, if the databases are across two Teradata machines?

Thanks
Venkat Rao
 
If your Databases are on the same machine, it will be easy to compare the structure of tables (column and indexes) via the DBC tables. Even collected stats can be compared by this way.

If your db's are not on the same machine, I think the easiest way to compare structures is to extract tables DDL via the SHOW TABLE command and then compare the text.
For stats, you could use HELP STATS to know the columns with collected stats.
I don't know about a SHOW STAT command (Perhaps V2R6 or later)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top