|
|
Archives of the TeradataForum
Message Posted: Tue, 29 Nov 2005 @ 14:36:41 GMT
Subj: | | Re: How to leave an intentional lock for testing |
|
From: | | Victor Sokovin |
| I'm trying to lock up a table because I have to "prove" to my QA folks that the TABLEWAIT option on MLOAD actually works. I know I've
locked one up before, but I cannot seem to make it work now. I thought I had just removed the ".end mload;" from the MLOAD script and it didn't
release the lock. But now I'm thinking that it was fastload that I had used, and I can get FLOAD to work, but I can't even lock a populated table
with FLOAD. | |
FastLoad is not designed to load in populated tables so a MultiLoad lock might be easier to get. I would suggest to create a simple ML script
and run it with, say, a single-record data file. The record must be manufactured in such a way that it guarantees an ML failure in the application
phase (for example, NULL value to be loaded into the non-nullable column). This should leave a nice lock on the target table.
To remove the lock after the test, just use (from BTEQ) RELEASE MLOAD <table name>; . Also, don't forget to drop ML temp tables.
Regards,
Victor
| |