ANSI versus Teradata Mode Transactions
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.


ANSI versus Teradata Mode Transactions Expand / Collapse
Author
Message
Posted 1/20/2009 8:41:23 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 10/19/2009 6:44:26 PM
Posts: 38, Visits: 409
Hi,
I have read that in ANSI mode a DDL statement should be followed immediately with a Commit statement. But in Teradata mode all the statements are implicitly commited or within a BT/ET.

I am facing a strange situation. I logon to a bteq ( by deafult Teradata mode) and submit the below set of transactions

BT;

INSERT INTO Databasename.DIM_TABLE ( Table_Key,Table_Name,Database_name,Environment_name )
VALUES ( 541,'T10128','EDWPRDE','ST'); -- DML
-- 1 row added

del from edwst1e_data_audit.dim_table
where table_key = 541; -- DML
-- 1 row removed

Collect stats on Databasename.dim_table ;
-- Completed
ET;


As you would expect everything goes smoothly but if we bring Collect stats before deleting the rows then it gives error

BT;
INSERT INTO Databasename.DIM_TABLE ( Table_Key,Table_Name,Database_name,Environment_name )
VALUES ( 541,'T10128_','EDWPRDE','ST');

collect stats on Databasename.dim_table ;

del from Databasename.dim_table
where table_key = 541;

Failure 3932 Only an ET or null statement is legal after a DDL Statement

ET;

Is Collecting stats a DDL statement? and is DATABASE/SET SESSION also considered a DDL?
Post #14150
Posted 1/20/2009 11:51:33 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 7/10/2009 6:28:52 PM
Posts: 505, Visits: 546
Yes they are treated like DDL statements.
Post #14152
« Prev Topic | Next Topic »


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


All times are GMT -5:00, Time now is 10:33am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.031. 4 queries. Compression Disabled.