Replication fails with the error SQL0913

Technote (FAQ)


Question

Replication fails with the error SQL0913 if the mirror database is associated with a DB2 for AS/400 source database. The full text of the error message may be "SQL0913N Unsuccessful execution caused by deadlock or timeout. Reason code "<schema_name>.<table_name>". SQLSTATE=57033" or
"[SQL0913] Row or object <table_name> in <schema_name> type *FILE in use."

Cause

The problem occurs because the Sync Server tries to acquire a lock on a table that is locked by another application. The application may have a lock on the table even though it committed or rolled back the transaction in which it acquired the lock. The Technote at the following URL describes this behavior in more detail:

http://www-1.ibm.com/support/docview.wss?rs=0&q1=db2+and+iseries+and+os%2f400&q2=waitfile&uid=nas14c7e1e2f94136bdd86256c6200577243&loc=en_US&cs=utf-8&cc=us&lang=en:


Answer

Increase the lock wait time of your source tables as follows:


1. Connect to the AS/400 database.
2. Execute "select system_table_schema, system_table_name, table_name from systables."
3. Connect to the AS/400 machine.
4. Enter "call qcmd."
5. For each source table listed in the output from step 2, enter
"CHGPF FILE(system_table_schema/system_table_name) WAITFILE(x) WAITRCD(y)"
where x is the time to wait in seconds for a table lock and y is the time to wait in seconds for a row lock. For example,
"CHGPF FILE(schema1/table1) WAITFILE(3600) WAITRCD(3600)."


Related information

SQL0913 Cause

Cross Reference information
Segment Product Component Platform Version Edition
Information Management DB2 UDB for iSeries DB2 for OS/400 Base

Document information


More support for:

DB2 Everyplace
Troubleshooting - Sync Server

Software version:

8.1.4

Operating system(s):

Platform Independent

Software edition:

Enterprise Edition, Express Edition

Reference #:

1190797

Modified date:

2009-10-25

Translate my page

Content navigation