← All errors

SQLCODE -7008

SQL7008 Object not valid for operation

IBM message text
&1 in &2 not valid for operation.
SQLCODE
-7008
SQLSTATE
55019

Most common cause

The most common cause is a table that is not journaled used under commitment control: reason code 3 in the message. ACS Run SQL Scripts and many JDBC clients start with commitment control on.

Other causes

  • The file has no members (reason 1), or was saved with storage freed (reason 2).
  • Debug with UPDPROD(*NO) on a production library (reasons 4, 5 and 6).
  • A view built on a file in QTEMP or a program-described file (reason 7).

How to fix it

For reason 3 journal the file with STRJRNPF, or run with isolation *NONE (COMMIT(*NONE), or WITH NC on the statement). Tables created in a schema made with CREATE SCHEMA are journaled automatically. For other reasons the message gives the fix.

Related errors

Text and codes from IBM documentation for 7.6. Checked on .