Subject Re: Error accessing file ""
Author agarzotto
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 12:12 PM 23/03/2004 +0000, you wrote:
> >We are trying to migrate from Interbase 6.0.1 to Firebird 1.5 on
SuSE
> >linux 8.1.
> >
> >When trying to restore the backup (about 4.5 GB), we get the
following
> >error:
> >
> >...
> >gbak: restoring privilege for user *****
> >gbak: creating indexes
> >gbak: restoring index RDB$PRIMARY77
> >gbak: restoring index RDB$PRIMARY73
> >gbak: restoring index RDB$PRIMARY65
> >gbak: restoring index RDB$72
> >gbak: restoring index RDB$PRIMARY62
> >gbak: cannot commit index RDB$PRIMARY61
> >gbak: ERROR: I/O error for file ""
> >gbak: ERROR: Error while trying to open file
> >gbak: ERROR: Permission denied
> >gbak: ERROR: action cancelled by trigger (3) to preserve data
> >integrity
> >gbak: ERROR: Cannot deactivate primary index
> >gbak: Exiting before completion due to errors
> >
> >It seems that a file with name "" is being accessed (which of
course
> >does not exist). The problem is reproducable and always happens at
the
> >same spot during backup. Strange thing: restoring on a different
> >system with the same environment (or so it seems) does work! We did
> >the restore on that other system and then moved the DB. It works,
but
> >while using the DB, we occasionally also get the above error during
> >queries.
>
> Is this an index on an external table?
> /hb

RDB$PRIMARY61 is the primary key of a table:

SQL> show table chunk_data;
ID INTEGER Not Null
CHUNK_MD5 VARCHAR(40) Not Null
DATA BLOB segment 4096, subtype UNKNOWN Not
Null
CONSTRAINT INTEG_177:
Primary key (ID)
SQL> show index chunk_data;
IDX_CHUNK_CODE INDEX ON CHUNK_DATA(CHUNK_MD5)
RDB$PRIMARY61 UNIQUE INDEX ON CHUNK_DATA(ID)

I am not sure what you mean by "external table". All data for the
database is in one single .gdb file.

By logging SQL statements (automatically generated by the application)
that cause an error, I found the following select:

SELECT DISTINCT ARTICLE.ID FROM ARTICLE, MODIFY_INFO WHERE
(MODIFY_INFO.ENTITY_TYPE='1' OR (MODIFY_INFO.ENTITY_TYPE='14')) AND
(ARTICLE.FL_GROUP_ID='198') AND (MODIFY_INFO.MINFO_TYPE='2') AND
(ARTICLE.ART_HIDDEN=0) AND ARTICLE.ID=MODIFY_INFO.ENTITY_ID;

I can enter it manually in isql and reproduce the problem that way.

The "chunk_data" table is not visited by this statement so I somehow
doubt that it is related to RDB$PRIMARY61 directly. However, if I
remove the "DISTINCT" from the above statement, it works. I wonder if
it has something to do with sorting...

Thanks for your help!

Andreas Garzotto