Select (SHOW sometable) into volatile table
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Select (SHOW sometable) into volatile table Expand / Collapse
Author
Message
Posted 10/30/2009 7:50:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/3/2009 3:15:54 AM
Posts: 2, Visits: 3
hi,

i am a tester. After changes in some object (or in some source object etc) the first thing we have to test is to compare old and new object whether only the changes documented are done. I would like to somehow make this process automatic.

To compare two sometables (prod and test) we just manually compare the output of "SHOW sometable" from different environments. Is it somehow possible to select the results of this command? I would just select then the results to some volatile tables and create sql to compare the two tables.


--pxr--
Post #17205
Posted 11/2/2009 12:25:00 AM


Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Yesterday @ 12:42:08 AM
Posts: 74, Visits: 32
Hi,
The task you are requesting is not a straight forward implementation in Teradata. But what you could do is as follows:
1. Use BTEQ and get the Structure of the tables fromthe 2 environments in 2 seperate files. Please note that Formatting of the output is very important.
2. In a Shell Script/File compare, compare these 2 files for inconsistencies.
3. Document the difference results and this will be your script output which you can then refine manually.
Hope that helps. You can call multiple BTEQs and Shell commands from a single script, hence you can finally write just one Shell Script which does all of the above stated or break them down in to multiple tasks having a script for each.


Strive to success.

Arun.

Post #17211
Posted 11/2/2009 3:34:29 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 3:55:54 AM
Posts: 111, Visits: 263
It depends what differences you are looking for.

DBC.Columns contains details of every column, DBC.Indices contains details of the indices.
You can do a relatively simple compare based on these.

The only thing it is not so easy to get is the SET/ Multiset propery if the table - I am sure it is in DBC.TVM, but do not know where.

This only works for Global Temp and permanent tables - volatile tables dont go into the dictionary.

Let me know if you need more.
Post #17213
Posted 11/3/2009 3:16:45 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/3/2009 3:15:54 AM
Posts: 2, Visits: 3
thanks jimm, that was really helpfull

--pxr--
Post #17216
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 8:48pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.203. 10 queries. Compression Disabled.