|
Posted by adi on 10/11/05 23:50
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]
|