Question

reason code 3 plz advice

Asked by: bobby2929

i am trying to run a select count(*) from dim_order and its giving me reason code 3 error can u plz advise why and aht should i do to rectify it?
SQL0668N  Operation not allowed for reason code "3" on table
"DB2ADMIN.DIM_ORDER".  SQLSTATE=57016


 1 The table is in Check Pending 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 a check pending state may also receive this error  
if a dependent table is in a check pending state.  

 2 The table is in No Data Movement state. When in this state,    
operations that cause data movement are disallowed. Data movement
operations include REDISTRIBUTE, update of partitioning key,      
update of multi-dimensional clustering key and REORG TABLE.  

 3 The table is in Load Pending state. A previous LOAD attempt on
this table resulted in failure. No access to the table is allowed
until the LOAD operation is restarted or terminated.  

 4 The table is Read Only state. This state can occur during      
on-line LOAD processing (LOAD INSERT with the READ ACCESS option),
or after an on-line LOAD operation, but before all constraints    
have been validated in the newly appended portion of the table    
using the SET INTEGRITY statement. No update activity is allowed  
on this table.  

 5 The table is in Load In Progress state. The LOAD utility is    
currently operating on this table, no access is allowed until the
LOAD is finished.  

 6 Materialized query tables that reference a nickname cannot be  
refreshed in ESE.  

User Response:

 
 

 1 Execute the SET INTEGRITY statement with the IMMEDIATE CHECKED
option on table "<table-name>" to bring the table out of      the
Check Pending state. For a user maintained materialized      
query       table,   execute the statement with the IMMEDIATE    
UNCHECKED         option   instead of   the IMMEDIATE CHECKED    
option.  

 2 Execute REFRESH TABLE statement on the dependent immediate    
materialized query tables and staging tables of table            
"<table-name>". The contents of these dependent immediate    
materialized query tables and staging tables can be incrementally
maintained from the appended data of "<table-name>" through  
previous LOAD INSERT operations.  

 3 Restart or terminate the previously failed LOAD operation on  
this table by issuing LOAD with the RESTART or TERMINATE option  
respectively.  

 4 Issue the LOAD QUERY command to check whether the table is in  
the process of being loaded. If yes, wait until the LOAD utility  
has completed, or if necessary, restart or terminate previously  
failed LOAD operation. If LOAD is currently not in progress,      
issue the SET INTEGRITY command with the IMMEDIATE CHECKED option,
to validate constraints in the newly loaded portion of the        
table.  

 5 Wait until the current LOAD operation has finished. You can    
use the LOAD QUERY command to monitor the progress of load.  

 6 Define a materialized query table using the MAINTAIN BY USER  
option. Then, use an INSERT statement with a subquery to populate
the materialized query table.  

 sqlcode :  -668

 sqlstate :  57016



thanks
bobby

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-06-03 at 11:42:17ID21446253
Tags

sql0668n

,

reason

,

code

Topic

DB2 Database

Participating Experts
4
Points
125
Comments
8

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Materialized view not refreshing
    Hi all Oracle guys, I build a materalized view with refresh complete cause it is based on a complex view. However, the view does not refreshes, I tried a very simple statement CREATE MATERIALIZED VIEW MVW_BOM REFRESH COMPLETE START WITH TO_DATE('29-Oct-2004 04:25:00 PM...
  2. Partition advice please - only experienced partitioners plea…
    Looking for advice and help for setting up my PC with partitions. I am going to be formatting my PC soon and want to reconfig it cleanly and efficiently. The PC has 2 HD's 1 - 160GB 8MBcache, 7200RPM, IDE/ATA 2 - 80GB 2MBcache, 7200RPM, IDE/ATA Due to cable lengths in the ...
  3. advice on update
    PROD_KEY, PROD_CODE ,SUBSTITUTION_PROD_CODE, EFFDATE ENDDATE 1 AAAA - JUNE04 2 AAAA - JUNE07 3 ...
  4. problem with MATERIALIZED VIEW (snapshot)
    Hi, I've any problem with creating MATERIALIZED VIEW (snapshot) My table is ROOMS: SQL> DESC ROOMS Name Null? Type ----------------------------------------- -------- ---------------------------- LS_ID ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: db2inst1Posted on 2005-06-03 at 11:54:52ID: 14142356


All you have to do is

 Restart or terminate the previously failed LOAD operation on  
this table by issuing LOAD with the RESTART or TERMINATE option  
respectively.  

So the LOAD operation didn't complete, Just to confirm query the table you will get the error message recevied during the load operation.

LOAD QUERY TABLE dim_order

Now with the restart/terminate the load operation by the following command.

LOAD FROM filename of filetype RESTART into dim_order

LOAD FROM filename of filetype TERMINATE into dim_order

 

by: KdoPosted on 2005-06-03 at 12:00:49ID: 14142401


The error that you're getting is directly related to the Check Pending state.  (The other items may be an issue later.)

You can probably get past this error by turning off the RI.  In our database transformations, we turn RI off and on quite a bit by generating SQL statements from the system tables.  Replace the lower case items in the text below with names appropriate for your site and run the query.  It will generate ALTER TABLE statements that you can cut and paste into your SQL client.


SELECT 'ALTER TABLE name.' || TBNAME || ' ALTER FOREIGN KEY ' || RELNAME || ' NOT ENFORCED; ' AS COMMAND_REMOVE_INTEGRITY
FROM SYSIBM.SYSRELS WHERE TBNAME LIKE '%tablename%';


Kent

 

by: db2inst1Posted on 2005-06-03 at 12:04:36ID: 14142428

Bobby,

How did you get that explanation for the error?

I get only the following. May be coz i am on ver 7

 

db2 ? SQL0668N

 SQL0668N Operation not allowed when the underlying table (or a
          dependent table) is in the Check Pending state.

Explanation:  When a table is in a check pending state, there may
be one or more rows that violate constraints defined on the data.
This table cannot be used for the operation. An operation on a
parent table that is not in a check pending state may also
receive this error if a dependent table is in a check pending
state.

User Response:  Execute the SET INTEGRITY statement with the
IMMEDIATE CHECKED option and ensure that the data satisfies all
the constraints defined on the table or the table depending on
it.

sqlcode:  -668

sqlstate:  57016

 

by: KdoPosted on 2005-06-03 at 12:13:46ID: 14142505


Hi db2inst,

I think that he's got a lot of issues with his database.  We seem to be on the same page that he needs to get past the RI issue first.

I was thinking that the first step is to disable RI and see what happens.  This should get past this issue and onto the next.

 

by: ghp7000Posted on 2005-06-03 at 12:25:17ID: 14142591

LOL, looks like bobby has multiple command windows open and is losing track of which window is 'latest one'.
Bobby, here's my advice, close all command windows except one, perhaps two at the most, that way you won't lose track of which window is the last one you worked in.

 

by: ghp7000Posted on 2005-06-03 at 12:26:33ID: 14142599

Bu the way Bobby, any reason you did not close out your previous questions? Just wondering if the problems in those questions are solved or still pending

 

by: bobby2929Posted on 2005-06-03 at 15:11:53ID: 14143622

thts rite db2 my verion is 8 ,one thing more i was trying to read access plan for tables from where can i get good material for that as some tables really take long time to load :(

 

by: jmartin_vPosted on 2011-05-23 at 22:31:01ID: 35820928

Thanks all,

The table si now accesable..I tried using the LOAD FROM filename of filetype TERMINATE into dim_order

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...