Why SQL3304N The table does not exist soon after a Declare Cursor was executed & successful?

Hello all,
Something baffles me here. The code that you see was executed successfully and rows were loaded. Notlong after I decided to test again but now I am getting the following error:
db2 => DECLARE LOAD_CUR1 CURSOR DATABASE DB2DB USER myusrid USING mypasswd FOR SELECT * FROM ECDP012.RCATB_SMS_CDM;
DB20000I  The SQL command completed successfully.

db2 => LOAD FROM LOAD_CUR1 OF CURSOR warningcount 20 REPLACE INTO ECDBT012.RCATB_SMS_CDM;
SQL3304N  The table does not exist.

What exactly is happening here? Anyone seen this type of event before and how can I resolve the matter?

Thanks
okonita1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BigSchmuhConnect With a Mentor Commented:
Is your CLP command session AutoCommit mode ?
If so, your open cursor is committed (and closed) instantly...and does not exist for the LOAD command
0
 
Kent OlsenConnect With a Mentor Data Warehouse Architect / DBACommented:
Hi okonita,

Several things could cause this.

-- Is the client connected to a database?
-- Is it connected to the correct database?

0
 
okonita1Author Commented:
BigSchmuh,
How do I find out if CLP command session is set to AutoCommit mode ? I have no idea where that is turned on or off.

kdo,
The answer is yes to your questions
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
BigSchmuhCommented:
In the "Command reference" guide, you should find the "Command Line Processor (CLP) options".
The "-c" option is ON by default and means your statements are send with AUTOCOMMIT

So, you have to open your CLP sessions using this example syntax:
   db2 +c -f YourStatementsFile.SQL
0
 
okonita1Author Commented:
Thank you BigSchmuh. I googled CLP options and found same thing as you just described. I will try it when I get in the office today...

How can I make it permanent?
0
 
BigSchmuhCommented:
You can set it permanently using DB2OPTIONS environment variable.
This variable is ALREADY defined in your platform with some default values that should be kept...
0
 
okonita1Author Commented:
Just tried the recommendations from this thread and my problem did not go away...any more ideas?

Thanks
0
 
BigSchmuhCommented:
(Sorry to ask but) are you sure your ECDBT012.RCATB_SMS_CDM table exists ?

You can check using:
SELECT Count(*) FROM ECDP012.RCATB_SMS_CDM;
SELECT Count(*) FROM ECDBT012.RCATB_SMS_CDM;
0
 
okonita1Author Commented:
Thanks to you guys
0
All Courses

From novice to tech pro — start learning today.