I have a bteq script, which insert and update data in 5 table (table1,table2,table3,table4,table5) and same bteq is called by different unix script and it might run parallel. So How to Lock all the 5 tables at session level and only writeable for the session and other session run will not update and wait for completion of first session ( session level integrity)
Thanks and Regards,
Teradata, like every other commercial database system, serializes access at the transaction level. If you cannot use transactions to accomplish what you want, you could perhaps implement an exclusivity protocol using a queue table as a kind of semaphore.
you can use BT ET syntax or multistatement request to keep locks till end
Is it possible to lock the tables used in the session with below statements for reading and writing and maintain integrity at session level?
LOCK Table table1 for WRITE;
LOCK Table table2 for WRITE;
LOCK Table table3 for READ;