Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 20 May 2009 @ 15:19:05 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Comparison of data in two servers
 
From:   Leslie, Quincy

Two options are possible for comparing your tables:

1) Perform row counts of the same table on each server and capture the count metrics, or

2) Perform sum function on selected numeric columns, again on the same table on each server.

1a) Compare the row counts metrics for each table from each server,

2a) Compare the sum result metrics for the columns summed, for each table.


To perform (1) create a table on each server (name them differently, see why below) with columns to capture the db name, table name, row count, and date performed; time stamp optional. Populate one row per table with its row counts.

To perform (2), create a similar table to (1), but add columns for the column name and sum obtained; cast as Dec 12. One db.table will potentially have multiple rows, one per column summed.

In (1), once the row counts are obtained on both servers, via bteq and populated to the table on both servers, then you have two options. The first is to use Access or BI Query or other tool that can log on to each server and extract the row counts, but compare visually. I am not aware that SQL can do the compare, when logged onto two servers. The SQL can only extract the row count metrics from each table. So to use SQL for comparative purposes, copy the row counts metrics table from the 2nd server over the first; obviously each table name should be different. SQL Asst or some tool can then quickly run a nice comparative analysis of the row counts on a db.table name basis.

Concept for (2) is an extension of (1).



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023