How to COLLECT STATS in BTET Mode in Multi-Statement BTEQ Scripts!
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.


How to COLLECT STATS in BTET Mode in... Expand / Collapse
Author
Message
Posted 8/3/2009 3:04:05 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 10/30/2009 6:28:19 AM
Posts: 34, Visits: 117
I need to COLLECT STATS after an Update Statement.

BT
; Update Table
; COLLECT STATS
; Delete
;
ET;

I've to use BT; ET; as a Multi-statement request in my BTEQ scripts.
But I'm getting Error - as DDL statement (COLLECT STATS) can't allowed in Multi-statement request.
Also DDL statement (COLLECT STATS) has to be the last statement of the script.

How should I use COLLECT STATS inside a Multi-statement request using BTET?
Also the below process throwing the error.

BT;
Update....;
ET;

BT;
COLLECT STATS...;
ET;

BT;
DELETE....;
ET;

Help please!!!!!!!!!
Post #16415
Posted 8/4/2009 4:13:21 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 11/5/2009 4:40:02 PM
Posts: 717, Visits: 466
In BTEQ there's no need to use BT/ET for a multistatement, because it's already a transaction.

COLLECT STATS is considered as a DDL statement, thus it's not allowed within a multistatement unless it's the last statement.

There's no way to bypass that restriction.

"Also the below process throwing the error."
Which error? This is supposed to run.

Dieter
Post #16441
Posted 8/21/2009 3:53:39 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 10/30/2009 6:28:19 AM
Posts: 34, Visits: 117
Yeah - we need to use an ET after COLLECT STATS
that's working fine....
there is no error in the last statement...
thanks Dieter...
Post #16627
« 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 6:43pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.078. 7 queries. Compression Disabled.