0

2 Questions

  • I populated a volatile table with couple of million rows and am running a query via bteq on a Solaris Client ( so it runs regardless of my workstation connection) . Now If I see the run time explain stuck at some step , I want to abort just the query without loosing my session and VT contents how can this be done without admin privs.

    • Where are Stats stored for a VT and How can I indirectly access them or get a hint
user1874594
  • 2,277
  • 1
  • 25
  • 49
  • 1
    Please visit the [help] and review the guidelines for asking questions. Hint: one question to a post, and include your code and a detailed explanation of what you are having problems with. – Jim Garrison Oct 20 '15 at 00:43

1 Answers1

1

@user1874594 : you didn't specified which mode you are interactive or batch if you query is running for a long time in interactive mode , you can do below press control+C BREAK received. Input Command: [after pressing break key or control C]

and then fire ABORT . You will get below screen.

abort;
 *** ABORT signal received.
 *** Warning: Canceling the rest of the output.
 BTEQ -- Enter your SQL request or BTEQ command:

your VT table is still there..:)

2) VT tables are stored in SPOOL and there stats are collected in memory. You can't access them directly. Help stats is the only way .

By the way if you have script experience then write a shell script and get that stats in a file.

anwaar_hell
  • 756
  • 5
  • 23
  • I always do ^C but it quits the BTEQ completely. I guess the key is JUST one ^C. Twice & you are out – user1874594 Oct 20 '15 at 07:39
  • Press cntrl+c for once only...then it will show like BREAK received. Input Command: then write abort only – anwaar_hell Oct 20 '15 at 07:49
  • RIght on. I use to do this all the time but I never really had a situation where my VT was just preceding ^C to abort in bteq. Most times I ended up using SQL ass abort, which will keep VT. I assumed this would but I wanted to check for sure – user1874594 Oct 20 '15 at 07:52
  • http://stackoverflow.com/questions/33231402/multiple-table-aliases-between-fact-and-dimension-teradata – user1874594 Oct 20 '15 at 08:19