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!

lock error

Status
Not open for further replies.

mkey

Programmer
Joined
Oct 3, 2001
Messages
288
Location
CA
Hi all,
When I tryed to bcp in I'm getting this error in dos prompt. Its seems at first it runs okay at the begining then it gives me a lock error:
"Server has run out of locks"
How can I over come this error?
Thankyou,
mkey
 

Which version of SQL Server are you running? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
sorry! Sql server 7!
 
HI,
When I checked the sp_configure my lock is set to:
name minimum maximum config_value run_value
locks 5000 2147483647 0 0

Is it advisable to change this? If so how?
Thank you for your help. I greatly appreciate it.
mkey
 

No. 0 indicates dynamic handling of locks by SQL Server. What is the memory situation? The FAQ indicates this error really means there is not enough memory to allocate all the locks needed. Is the memory dynamically allocated also?

I've not tried this under these circumstances but it may be helpful to use the -b option with the bcp utility. This option can be used to set a batch size. SQL will process the number of records in each batch and commit batch transactions rather than trying to treat the entire input file as one batch. For example, you would use -b 5000 to process 5000 records in each batch. Adjust this number to your need. You should have a good backup before using this option. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top