473,726 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cursor load giving SQL0668 error



UDB Version 8.2 FP7 (r"DB2 v8.1.1.128", "s061108", "U810098", and
FixPak
"14".) 64 bit running on AIX 5.3.

We were getting the SQL0668 error below so we put the status sql into
the script to see the table state right before the cursor/load ran.
The table did not seem to be in a bad state. We switched this cursor/
load back to a regular export/load and the issue went away. We are
doing several cursor loads on some 52Million row tables after this
with no issues.

Does anyone have a clue as to why this was occurring?
select tabname,status, access_mode from syscat.tables where status !=
'N'

TABNAME
STATUS ACCESS_MODE
-----------------------------------------------------------------------------------------------------------------------------
--- ------ -----------
BNKACCTPRGVW
X F
BNKCUSTRECPRGVW
X F

2 record(s) selected.
values current timestamp

1
--------------------------
2007-10-16-19.29.51.268018

1 record(s) selected.
declare corprodinst cursor for select ((select
coalesce(max(CO RProdInstanceKy ), 0) from CORProdInstance ) +
t.CORProdInstan ceK
y), CORProductKy, productCode, updateDttm, updateUser, updateSystem,
versionStamp, COROrgKyFI from tmp_CORProdInst ance t
DB20000I The SQL command completed successfully.

values current timestamp

1
--------------------------
2007-10-16-19.29.51.271669

1 record(s) selected.
load from corprodinst of cursor INSERT INTO CORProdInstance
(CORProdInstanc eKy, CORProductKy, productHeldId, updateDttm, upda
teUser, updateSystem, versionStamp, COROrgKyFI)
SQL3501W The table space(s) in which the table resides will not be
placed in
backup pending state since forward recovery is disabled for the
database.

SQL0668N Operation not allowed for reason code "1" on table
"SDB3036.CORPRO DINSTANCE". SQLSTATE=57016

Oct 17 '07 #1
1 5334
Ultrak The DBA wrote:
>

UDB Version 8.2 FP7 (r"DB2 v8.1.1.128", "s061108", "U810098", and
FixPak
"14".) 64 bit running on AIX 5.3.

We were getting the SQL0668 error below so we put the status sql into
the script to see the table state right before the cursor/load ran.
The table did not seem to be in a bad state. We switched this cursor/
load back to a regular export/load and the issue went away. We are
doing several cursor loads on some 52Million row tables after this
with no issues.

Does anyone have a clue as to why this was occurring?
select tabname,status, access_mode from syscat.tables where status !=
'N'

TABNAME
STATUS ACCESS_MODE
-----------------------------------------------------------------------------------------------------------------------------
--- ------ -----------
BNKACCTPRGVW
X F
BNKCUSTRECPRGVW
X F

2 record(s) selected.
values current timestamp

1
--------------------------
2007-10-16-19.29.51.268018

1 record(s) selected.
declare corprodinst cursor for select ((select
coalesce(max(CO RProdInstanceKy ), 0) from CORProdInstance ) +
t.CORProdInstan ceK
y), CORProductKy, productCode, updateDttm, updateUser, updateSystem,
versionStamp, COROrgKyFI from tmp_CORProdInst ance t
DB20000I The SQL command completed successfully.

values current timestamp

1
--------------------------
2007-10-16-19.29.51.271669

1 record(s) selected.
load from corprodinst of cursor INSERT INTO CORProdInstance
(CORProdInstanc eKy, CORProductKy, productHeldId, updateDttm, upda
teUser, updateSystem, versionStamp, COROrgKyFI)
SQL3501W The table space(s) in which the table resides will not be
placed in
backup pending state since forward recovery is disabled for the
database.

SQL0668N Operation not allowed for reason code "1" on table
"SDB3036.CORPRO DINSTANCE". SQLSTATE=57016

I guess you run the LOAD twice without the necessary SET INTEGRITY statement
in between. The explanation for SQL0668 tells you what's wrong and how to
fix this:

$ db2 "? sql668"
SQL0668N Operation not allowed for reason code
"<reason-code>" on table "<table-name>".

Explanation:

Access to table "<table-name>" is restricted. The cause is based
on the following reason codes "<reason-code>":
1 The table is in the Set Integrity Pending No Access state.
The integrity of the table is not enforced and the content of the
table may be invalid. An operation on a parent table or an
underlying table that is not in the Set Integrity Pending No
Access state may also receive this error if a dependent table is
in the Set Integrity Pending No Access state.

[...]
User Response:
1 Execute the SET INTEGRITY statement with the IMMEDIATE CHECKED
option on table "<table-name>" to bring the table out of the
Set Integrity Pending No Access state. For a user
maintained materialized query table, execute the statement
with the IMMEDIATE UNCHECKED option instead of the
IMMEDIATE CHECKED option.

[...]

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Oct 17 '07 #2

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

Similar topics

2
1957
by: bissatch | last post by:
Hi, I have just recently installed Apache2 and PHP5 on my computer. Normally when I make a syntax mistake on my webspace it gives me an error message on the .php page when i load it and the line the error is on. When i load a page on my own computer through http://localhost it just stops outputing the code on the page where the error is and leaves the rest blank. Do i need to configure Apache or PHP to display errors? If so, how?
7
3781
by: jane | last post by:
I'm going to use cursor load to load 200GB data in my production database. My database has 2 partitions. but I cannot find more info in the manual about this cursor load. I'm concern about loading 200GB , this large amount of data, is there any limitation?
12
1690
by: prasi | last post by:
hi all, I have executed the following program, I was expecting some errors in the program but it didn't give any ERRORS!!!!!!!!!!!!!!!!!!!!!!!!!!! please can anybody explain me ? #include<stdio.h> int main() { char a=97; "hello everyone"+printf("value of a=%c\n",a);
1
1022
by: Kevin | last post by:
Hi, I have a web app running on my own machine, I copied all the files in the folder and transferred them all to our web server. When I try to run the app on the web server, I get an 'Could not load type' parser error. I 've looked through many articles and tried what the suggested but I still can't get the app working.
5
2131
by: washoetech | last post by:
Hello, I have tried to run my ASP.NET 2.0 application from IIS and I get a page not found error. When I debug from within Visual Studio.NET 2005 my application works fine. Any ideas? Thanks, washoetech
3
7195
by: db2udbgirl | last post by:
Env: DB2 UDB 8.2, AIX 5.3 While trying to load data (73 Million rows, Medium size table uses 4K tablespace) into a table using cursor it fails with "SQL0964C The transaction log for the database is full. SQLSTATE=57011" But I felt that Load utility wont log any acvitities on the database. Here it what I tried to do db2 "declare c1 cursor for select CAST(PARTITIONING_NBR AS CHAR(10)), VEH_IDENT_NBR, OPTN_CD, VIN_TYPE_CD,...
1
1788
by: bujjus173 | last post by:
Hi, I like to load data from one table in a database in a server into another table in another database residing in another server. I like to use cursor load. in that case. 1) Do i need to catalog the target database. 2) Can i do it online. Any suggestions. This might be simple. I am new to this. Please help me. Thank You
1
3543
by: b singh | last post by:
In iis 7 http:/site/x.aspx/pp%3f is giving runtime error Instaed of invalid virtual path. x.aspx is not existing in the server. What setting of IIS 7 is reuired so that it will give invalid virtual path instead of Runtime error
0
8890
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9402
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.