By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,851 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,851 IT Pros & Developers. It's quick & easy.

Urgent - DB2LOAD API db2LoadInfoIn Struct

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.