how to restart bteq when it fails while loading a file?

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Fan

how to restart bteq when it fails while loading a file?

Hi,

 

Suppose I am loading a file of 100 records and it fails at 82nd record due to data type mismatch. Will the rest of the 81 records be roll backed?What will be my restartability strategy?

 

Please help.


Accepted Solutions
Junior Contributor

Re: how to restart bteq when it fails while loading a file?

BTEQ is not a load utility, if you want a logtable & checkpoints & restartability you must switch to TPump/TPT.

1 ACCEPTED SOLUTION
6 REPLIES
Teradata Employee

Re: how to restart bteq when it fails while loading a file?

It depends. In Teradata mode, by default each INSERT will be an implicit, auto-committed transaction. But if you explicitly BEGIN TRANSACTION prior to the INSERTs, then they would all be rolled back when an error occurs.

In ANSI mode, the INSERTs will be part of one implicit transaction, and the script can choose to COMMIT or ROLLBACK in case of an error.

Teradata Employee

Re: how to restart bteq when it fails while loading a file?

And if you are using multiple sessions, that's another layer of complexity - since sessions are independent of each other.

Fan

Re: how to restart bteq when it fails while loading a file?

Hi Fred,

 

Thanks for your reply.

 

So if I am using TD mode and the records are auto committed ,then how do I restart? How do I delete and restart if the table is not empty?What I want to know is does bteq have any checkpoint or log table from where I can start again.

 

Junior Contributor

Re: how to restart bteq when it fails while loading a file?

BTEQ is not a load utility, if you want a logtable & checkpoints & restartability you must switch to TPump/TPT.

Fan

Re: how to restart bteq when it fails while loading a file?

Thank you so much Dieter

 

Could you please point me to the load utility manuals? 

 

 

 

Junior Contributor

Re: how to restart bteq when it fails while loading a file?

The TTU manuals are at the same place where you find all Teradata documentation: info.teradata.com