All Forums General
anambiar 1 post Joined 03/10
31 Mar 2010
How to identify which BTEQ ran a particular Query

Problem Statement - We implement a lot of ELT solutions at our client side. Becuase majority of our code is in BTEQ it is becoming more and more difficult to identofy which BTEQ upserts/inserts which table. Is there some log in Teradata which will tell us which BTEQ script ran a particular query ?

Adeel Chaudhry 773 posts Joined 04/08
01 Apr 2010

Hi,

I doubt if there is any built-in solution for this .... but what you can do is pretty much possible .... couple methods can be:

- Have a log table (columns: Accessed_Table_Name, BTEQ_Name/ID, ActivityTimestamp), and put INSERT for that table with respective info in each BTEQ
- Have one table (BTEQ_ID, Table_ID), other two tables for BTEQ details and Table details and then use them
- Or, enable DBQL .... keep track of BTEQ execution times and then get the required info .... not a very good option though!

HTH!

Regards,

MAC

-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.