pellus
2nd September 2008, 12:09
Hello, I am importing a company and get problems on the big tables. When I check the "create rows before index" it goes quite fast, all is read in but it fails during the index build process. When I UN-check the "create rows before index" it goes very very slow and it still fails before all is in.

Any advice is appreciated.

The event viewer gives me

Case 1, "create rows before index" checked
==================================

Message 1
------------
Env erpln6b (d:\LN\erpln6b)
Prog bdbpost file bdb_bdbpost.c # 1091
Keyword
Username lhmiage type S language 2
Process 0x208c
ProcessSet lhmiage@LHFIHELLNDB1:8332
Lasterror 2 (The system cannot find the file specified.)
Errno 0
bdberrno 0
Message tfgld482311: completed (10487560 rows)

Message 2, 15 minutes later
-----------------------------
Env erpln6b (d:\LN\erpln6b)
Prog dbserver_dll file \MSQL\msql_error.c # 523
Keyword MSQL Messages
Username lhmiage type S language 2
Process 0x208c
ProcessSet lhmiage@LHFIHELLNDB1.lh.int:8332
Lasterror 0
Errno 0
bdberrno 0
Message
dbs_errno = 522, Error 522 occurred:
Error sqlcode 0 (sqlstate: 08S01, Return code: -1, diagRecNum: 1) during SQLExecDirect.
[Microsoft][ODBC SQL Server Driver]Communication link failure
Flushed at \MSQL\msql_error.c : #527.

and Message 3 immediately then
--------------------------------
Env erpln6b (d:\LN\erpln6b)
Prog dbserver_dll file \MSQL\msql_error.c # 523
Keyword MSQL Messages
Username lhmiage type S language 2
Process 0x208c
ProcessSet lhmiage@LHFIHELLNDB1.lh.int:8332
Lasterror 0
Errno 0
bdberrno 0
Message
dbs_errno = 522, Error 522 occurred:
Error sqlcode 0 (sqlstate: 08S01, Return code: -1, diagRecNum: 1) during SQLEndTran(ROLLBACK).
[Microsoft][ODBC SQL Server Driver]Communication link failure
Flushed at \MSQL\msql_error.c : #527.


In the bdbpost-log the message is:
----------------------------------
Adding indexes ...Can not create index 9999 (error 522)


Case 2, "create rows before index" UN-checked
==================================

When I uncheck the "create rows before index" it goes very slow, but it fails anyway. Near the end but seemingly before all is read in. What I get in the event viewer is

Env erpln6b (d:\LN\erpln6b)
Prog bdbpost file bdb_bdbpost.c # 1070
Keyword
Username lhmiage type S language 2
Process 0x1f18
ProcessSet lhmiage@LHFIHELLNDB1:7960
Lasterror 0
Errno 0
bdberrno 113 (Table is locked)
Message tfgld482311: Error for lock 113

And in the bdbpost-log, I get the messsage

Can't re-lock table (error 113)

MarioS
3rd September 2008, 11:47
Hello Pellus,

the error 113 in case 2 is caused because there is a lock on the table, probably from your first import (case 1).
You should:
1) Reboot the box
2) Move the dump file ttfgld482311.S plus other big files like tfgld498 into a different directory
3) Import the main dump with "Rows before indices" checked
4) Import tfgld482/big files with "Rows before indices" unchecked

Regards,

mario

pellus
5th September 2008, 00:43
Yes, I have evrything in now. After 9 days. I couldn't reboot since it was a production server but basically I took the big ones with 'rows before index ' UNchecked and the other with this yes/no checked. I also guessed that this 113 was maybe to not appear the next time, and luckily it didn't.

Strange though that the later method took more time (this was expected) but for most of the big tables it took like double the time but for tfgld482 (not significantly bigger than the other big ones) it took 2 hours to read with 'rows before index' (all lines in and then indexing (which failed) running for just 15 minutes), but it took 3 days (!!!) when using the other method.