You are here: Re: Bulk Insert Data in Millions - Lock Issue « MsSQL Server « IT news, forums, messages
Re: Bulk Insert Data in Millions - Lock Issue

Posted by Tom on 10/12/05 00:09

Hi,

Adding in smaller chunks doesn't solve the problem. Adding small chunk is
the same as adding big chunk. Size doesn't matter.

Looks like you are out of option.

How about adding the records one by one in the middle of the night instead?


"adi" <Adityanad@gmail.com> wrote in message
news:1129063850.247250.54770@g49g2000cwa.googlegroups.com...
> Hi all,
> Hope there is a quick fix for this:
>
>
> I am inserting data from one table to another on the same DB. The
> insert is pretty simple as in:
>
> insert into datatable(field1, field2, field3)
> select a1, a2, a3 from temptable...
>
>
> This inserts about 4 millions rows in one go. And since I had the
> 'cannot obtain lock resources' problem, several methods were suggested
> by some web sites:
> 1) one to split the insert into smaller chunks (I have no idea how I
> can spit a insert to insert only n records at a time..)
>
>
> 2)to use waitfor - which I did but did not fix the error.
>
>
> 3)use bulk insert (in t-sql) - I dont know how to do this?
>
>
> As I see I am simply trying to move data from one table to another
> (ofcourse lots of data) in SQL Server 2000 and I dont see one simple
> solution to the locking problem.
>
>
> any ideas on how best I can do this will save my day!
>
>
> thanks all.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация