I got this from msdn (State ID 2400 just means that its an invalid cursor state error)
* In SQL Server Enterprise Manager, you may receive the "Invalid cursor state" error message when Microsoft® SQL Server™ runs out of resources while attempting to save selected tables or a database diagram. This error is returned because of insufficient space in your database or transaction log to complete the save process. To correct this problem, check to see if whether the database or the transaction log is full. If so, increase the size of the database to accommodate the change. Check other system resources or contact your system administrator.
any suggestion?
same problem on big batch job, (3'000'000 records to generate, hangs after 168'000) something with the size/full log could be correct but the SQL 2008 Database is in SIMPLE mode and with auto-increase size... Mybe the RAM? it runs on my computer- Dev environment (Win7 64 bits / SQL 2008R2 64 Bits / 4GB RAM).
Should I put some COMMIT (every 1000 records?) but if it hangs, where should I begin again ](*,) ?
:shock: it's complicated... it looks like the IF INSERT THEN; condition to avoid the raising of primary key violation error has no good effects with the INIT command, so I had to put a IF NOT GET(myPK) THEN "do the code"
Old code:
table.init
table.PK := value1;
table.Field1 := value2;
if table.insert then;
New code:
if NOT table2.get(value1) then begin
table.init
table.PK := value1;
table.Field1 := value2;
if table.insert then;
end;
Answers
* In SQL Server Enterprise Manager, you may receive the "Invalid cursor state" error message when Microsoft® SQL Server™ runs out of resources while attempting to save selected tables or a database diagram. This error is returned because of insufficient space in your database or transaction log to complete the save process. To correct this problem, check to see if whether the database or the transaction log is full. If so, increase the size of the database to accommodate the change. Check other system resources or contact your system administrator.
RIS Plus, LLC
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
the table was setup to be replicated.
Removed the replication, and it solved the problem
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
but our customer don´t use replication.
SQL-Server 2005 64-Bit
32 GB Ram
MSSQL Version
MSSQL 2005 9.00.4035.00
Data Access Components 2000.086.3959.00
(SRV_SP2_RTM.070216-1-1710)
Navision Version
4.0.3.26954 (4.0 SP3 with Hotfix KB 954672)
thank you for every / any hints
BTW: the servers are clustered!
same problem on big batch job, (3'000'000 records to generate, hangs after 168'000) something with the size/full log could be correct but the SQL 2008 Database is in SIMPLE mode and with auto-increase size... Mybe the RAM? it runs on my computer- Dev environment (Win7 64 bits / SQL 2008R2 64 Bits / 4GB RAM).
Should I put some COMMIT (every 1000 records?) but if it hangs, where should I begin again ](*,) ?
Any idea is welcome!
Regards
Chris
Old code:
table.init
table.PK := value1;
table.Field1 := value2;
if table.insert then;
New code:
if NOT table2.get(value1) then begin
table.init
table.PK := value1;
table.Field1 := value2;
if table.insert then;
end;
it works, my 3471530 records were imported! \:D/
thank you MS-support!