I am using the FastLoad utility to remove and replace data in a table. If the DELETE command is in and part of the FastLoad script, is there any potential that another query could read the table and get no rows in that moment between when all the records are removed and when they are reinserted?
Here is the type of FastLoad script I am running:
...
DELETE FROM WHBPX;
BEGIN LOADING WHBPX
ERRORFILES WHBPX_ERROR_1,
WHBPX_ERROR_2;
ERRLIMIT 100;
DEFINE
CTHLD_SSN_ID9 (CHAR( 09))
,GP_N8 (CHAR( 08))
DDNAME=INFILE;
INSERT INTO WHBPX (
CTHLD_SSN_ID9
,GP_N8
) VALUES (
:CTHLD_SSN_ID9
,:GP_N8
);
END LOADING;
LOGOFF;
or will all this happen in a single unit of work and only be commited when it is complete.
No it is not possible.
Whereas, normally table is dropped and created within a FL script.
HTH!
Of course it's possible, but the probability is low.
The DELETE is a SQL DELETE setting a WRITE lock, which is released after the commit. Then FastLoad submits the BEGIN LOAD to set the FastLoad lock.
A SELECT might run concurrently with the DELETE (using ACCESS lock). Or it's queued (using READ lock) by that DELETE and then it returns zero rows after the commit.
Dieter
Hi,
I ran the fastload script successfully. But when I check - Select * from the (Table), I am getting '?' in all the fields. the actual values from the txt file are not inserted. Can you please let me know the reason?
Thanks,
Deepak S
@Adeel_Chaudhry wrote:No it is not possible.
Whereas, normally table is dropped and created within a FL script.
HTH!
@Adeel_Chaudhry wrote:No it is not possible.
Whereas, normally table is dropped and created within a FL script.
HTH!
@Adeel_Chaudhry wrote:No it is not possible.
Whereas, normally table is dropped and created within a FL script.
HTH!