Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 05 Jun 2014 @ 10:19:07 GMT


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


Subj:   Re: How to get complete SQL by Combining DBQLSQLTBL and DBQLOGTBL
 
From:   Bodla, Sravan Kumar

Dave Wellman wrote:

  I think you're saying that the sqltextinfo column gets written if a '.txt' file on your pc. That is happening because the sqltextinfo column is treated by sqla as a 'large object'.  


  What you can do is when the dialog box id displayed that allows you to enter a file name, click 'cancel' and you should get the full sqltextinfo displayed in the normal answer set window.  


Hi Dave,

Thanks for the reply.

Sorry. I didn't follow you correctly.

When I run my query, I do not get any dialogue box and the result gets displayed directly to my screen after the successful execution of the query.

The concern here is, the sqltextinfo of DBQLSQLTBL will be displayed in .txt format (i.e. in a file) and I will not be able to copy the sql to excel (As it appears in a link(.txt file) format).

     sel
     a.username
     ,a.procid
     ,a.queryid
     ,a.collecttimestamp
     ,a.sessionid
     ,a.ampcputime
     ,a.querytext
     ,a.maxampcputime
     ,a.maxampio
     , B.SQLTEXTINFO
     ----------------------------------------------------------------------------
     sql
     from dbc.dbqlogtbl a   , dbc.dbqlsqltbl b
     where a.sessionid='XXXXX'
     and a.queryid=b.queryid
     and a.procid=b.procid
     and A.username='ABC_XYZ'

Have a nice day ahead!


Thanks,

Sravan.

SRAVAN KUMAR BODLA
GCC International - Technical Consultant



     
  <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