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

SQL1477N Table "<table-name>" cannot be accessed

P: n/a
Hello,

I get the following error when I try to insert data into a table.
"SQL1477N Table "<table-name>" cannot be accessed. "

The table was created with NOT LOGGED INITIALLY
The import is done by a program written in C and using embedded SQL.
It starts with ALTER TABLE myTable ACTIVATE NOT LOGGED INITIALLY WITH
EMPTY TABLE.
Then I prepare the statement and the inserts are done within a loop
using question marks and a host structure:
EXEC SQL EXECUTE <prepared statementUSING :db_rec;
After all inserts I do a commit.

This worked fine for many months. But suddenly I get the error -1477
always for the same record. (before the commit)
I thought this depends on an irregular record in the data file but
if I create the table without NOT LOGGED INITIALLY it works.
If I insert the critical record manually it also works.

I dropped and re-created the table several times.
We use DB2 Version: v7.1.0.98 on Linux 9.0 (i586) - Kernel
2.4.21-303-smp (1)

Maybe it is not a DB2 problem, but a C memory problem.

Thanks for any hint

Stefan

db2diag.log:
String Title:Redo/undo of nonrecoverable operation.
Table object is being marked not available. PID:11306 Node:000
Table(3:775)=DB2INST1.TESTDAT1_NEW

String Title:Table is not available: SQLCODE -1477. PID:11306 Node:000
Table(3;775)=DB2INST1.TESTDAT1_NEW
Feb 20 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.