473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Urgent - DB2LOAD API db2LoadInfoIn Struct

Hi All

In DB2 load API
for struct db2LoadIn
I am setting following values ...
inputInfoStruct.piUseTablespace = NULL;
inputInfoStruct.iSavecount = 0; /* consistency points as
infrequently as possible */
inputInfoStruct.iRestartcount = 0; /* start at row 1 */
inputInfoStruct.iRowcount = 0; /* load all rows */
inputInfoStruct.iWarningcount = 0; /* don't stop for warnings

*/
inputInfoStruct.iDataBufferSize = 0; /* default data buffer
size */
inputInfoStruct.iSortBufferSize = 0; /* def. warning buffer
size */
inputInfoStruct.iHoldQuiesce = 0; /* don't hold the quiesce
*/
inputInfoStruct.iRestartphase = ' '; /* ignored anyway */
inputInfoStruct.iStatsOpt = SQLU_STATS_NONE; /* don't bother with
them */
inputInfoStruct.iIndexingMode = SQLU_INX_DEFERRED;/* let load
choose */ /*
indexing mode */
inputInfoStruct.iCpuParallelism = 0;
inputInfoStruct.iNonrecoverable = SQLU_NON_RECOVERABLE_LOAD;
inputInfoStruct.iAccessLevel = SQLU_ALLOW_NO_ACCESS;
inputInfoStruct.iLockWithForce = SQLU_NO_FORCE;
inputInfoStruct.iCheckPending = SQLU_CHECK_PENDING_CASCADE_IMMEDIATE;

But whenever i run stored procedure depending on this values....
My tablespace goes in backup pending state... though i am setting
Nonrecoverable=SQLU_NON_RECOVERABLE_LOAD
Can you explain me why this was happening or please tell me necccessary

change..
Suresh

May 11 '06 #1
2 1637
Suresh,
You probably have:
-- archive logging switched on,
-- load "copy no" option

As you know LOAD is doing something on your database which is not
logged. DB2 is preventing users to modify the loaded data (forceing
backup) to guarantee, that in the future it will be possible to restore
that table from transactional logs.

To resolve the problem:
- specify "copy yes" option in your load (however it till slow down the
load)
- do at least tablespace backup after the load, or
- if you are loading into staging table, create separate tablespace,
and then copy data from the loaded table into destination table using
SQL insert. You will be able to read data from tablespace, which is in
backup pending state.

-- Artur Wronski

May 11 '06 #2
Suresh wrote:
Hi All

In DB2 load API
for struct db2LoadIn
I am setting following values ...
inputInfoStruct.piUseTablespace = NULL;
inputInfoStruct.iSavecount = 0; /* consistency points as
infrequently as possible */
inputInfoStruct.iRestartcount = 0; /* start at row 1 */
inputInfoStruct.iRowcount = 0; /* load all rows */
inputInfoStruct.iWarningcount = 0; /* don't stop for warnings

*/
inputInfoStruct.iDataBufferSize = 0; /* default data buffer
size */
inputInfoStruct.iSortBufferSize = 0; /* def. warning buffer
size */
inputInfoStruct.iHoldQuiesce = 0; /* don't hold the quiesce
*/
inputInfoStruct.iRestartphase = ' '; /* ignored anyway */
inputInfoStruct.iStatsOpt = SQLU_STATS_NONE; /* don't bother with
them */
inputInfoStruct.iIndexingMode = SQLU_INX_DEFERRED;/* let load
choose */ /*
indexing mode */
inputInfoStruct.iCpuParallelism = 0;
inputInfoStruct.iNonrecoverable = SQLU_NON_RECOVERABLE_LOAD;
inputInfoStruct.iAccessLevel = SQLU_ALLOW_NO_ACCESS;
inputInfoStruct.iLockWithForce = SQLU_NO_FORCE;
inputInfoStruct.iCheckPending = SQLU_CHECK_PENDING_CASCADE_IMMEDIATE;

But whenever i run stored procedure depending on this values....
My tablespace goes in backup pending state... though i am setting
Nonrecoverable=SQLU_NON_RECOVERABLE_LOAD


That's exactly the issue. You're loading data w/o logging and w/o any other
mechanisms to recover from it (copy). So DB2 cannot ensure the integrity
of the database in case of a system failure and forces you to take a
backup.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
May 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: nekiv90 | last post by:
Greetings, We need to initial load hundreds of tables from within programs. We try to run several programs that call the DB2LOAD in parallel (to load different tables of course) in order to...
1
by: UDBDBA | last post by:
Hi: How can one call SYSPROC.DB2LOAD procedure within a SQL stored procedure. I get the following error: DB21034E The command was processed as an SQL statement because it was not a valid...
0
by: Suresh | last post by:
Hi All I am tring to call SYSPROC.DB2LOAD stored procedure from DB2 UDB 8.2. Command editor. i used the follwoing syntax... CALL DB2LOAD (1,NULL,'LOAD CLIENT FROM...
0
by: Suresh | last post by:
Hi All In DB2 load API for struct db2LoadIn I am setting following values ... inputInfoStruct.piUseTablespace = NULL; inputInfoStruct.iSavecount = 0; /* consistency points...
0
by: anils | last post by:
I am trying to implement db2Load in C#, using PInvoke looking at the sample C programe which has Dbconn() & db2Load() methods I could find db2Load in db2app.dll, I could not find Dbconn()...
1
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
7
by: Vivek | last post by:
Hi, I want to know if it is possible to load(using the db2load API) into a remote database. By remote database i mean one that i have cataloged. Any parameters that need to be changed ? TIA
2
by: Vivek | last post by:
Hi, Iam using the db2load API to write data to a table. I see that by default the load process creates/overwrites the msgfile. Is there a way to change this behaviour so that messages are...
0
by: Vivek | last post by:
Hi, Ive written a test program for loading data into a table using the db2Load api. It works fine except when i specify COPY = YES USE TSM. Ive set the aforementioned attribute in the api by the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.