Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Size Error ?

Status
Not open for further replies.

VBXL

Programmer
Joined
Jul 10, 2001
Messages
198
Location
GB
Hi

When i import a 60mb into a table then run a cursor through the imported table to insert the data into other tables, it will only do a small % of the file

but if I do the same with a 30mb file it works ok.

Does anybody know what the problem could be ????


Cheers
 
My first guess would be you are running out of room in tempdb. My first question would be are you sure you need a cursor to do the inserts?
 
It is hard to determine the cause with so little info. There are the questions I would ask if confronted with the problem.

Do you get an error message? If so, what is it?

Have you examined the SQL error log for messages?

Which version of SQL Server are you running?

How much disk space is available on the drive containing the SQL database files?

How are you doing the import - DTS, BCP, BULK INSERT, or other method? Are you sure all of the data is imported? Is the process failing on import or on the later inserts?

Does the insert procedure run immediately after the import?

Is there any backup of the transaction log between the import and the insert procedure? This would remove committed transactions and may allow the process to run to completion.

You may need to break the inserts into smaller transactions to enable the process to run to completion. Begin a transaction, insert 10000 rows, commit the transaction. Repeat this process until all records have been processed. Terry L. Broadbent
Programming and Computing Resources
 
Does using a "commit transaction" slow down the system ???
 
When doing large updates, I find that commiting several smaller batches improves performance over one large batch. The main reason for this is that the log file for the database(s) being updated doesn't grow as large. Terry L. Broadbent
Programming and Computing Resources
 
After examining the imports, it does not import files over 10mb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top