Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 20 Oct 2008 @ 12:21:11 GMT


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


Subj:   Re: Comparing two tables in teradata present on different servers
 
From:   Ferry, Craig

I do something similar, except I am comparing yesterday's objects to today's objects. It is a korn shell script that basically does the following.

First it gathers all the object names, types, etc into a file.

Second it reads in the file via a 'using' SQL command to build the 'show' command for each object into a database table. I do it this way to eliminate multiple logins required to run each show command.

Third it dumps the new table's contents into one big file. This file contains the show command for each object I am checking.

Fourth it runs the new file and puts the output into a unique directory. For my case since I need to capture changes from the prior day, I have a yesterday and today directory that I use.

Fifth, it runs a loop to do a diff command on similarly named output files (I use the database and table name as part of the file name). Finally if any differences are found, it e-mails them to the person responsible for monitoring sox changes.

If this is something that you would be able to use, let me know and I can send you the script. There may be a better way, but this works for us.


Craig



     
  <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