LOCK_TIMEOUT And NOWAIT

Apr 30, 2008

Hi,

I need to perform insert operation where a large number of records are to be inserted in a table. I do not want the users to wait for a long time while another user is performing the insertion operation. As i searched here n there, i found that lock_timeout helps me to perform the job. But the query works fine at times and at times it doesnot. I have also tried using nowait but the result is the same. Sometimes it wait for the lock to be removed, then after the previous user is done it performs the insertion operation and sometimes it gives the error message: "Msg 1222, Level 16, State 56, Line 1 Lock request time out period exceeded."

Is there any other way out??


Thank you in advance.

View 4 Replies


ADVERTISEMENT

How To Set The LOCK_TIMEOUT

Dec 18, 1998

View 2 Replies View Related

Lock_timeout

Jun 25, 2004

Hello there,

Is there any way to set a default lock time out for the server with out using the sentence SET LOCK_TIMEOUT 20 ???

Could you explain me step by step ?

Thanks !

View 6 Replies View Related

SET LOCK_TIMEOUT Problem

Mar 18, 2005

Hello,

I recently try to use the SET LOCK_TIMEOUT (SET LOCK_TIMEOUT = 9000) method to minimize SQL Server blocking during heavy trafic.

I have to put it in every Stored Proc because there is no way to tell SQL Server to handle a constant variable for this, default is -1 -> no timeout ! (wich may cause blocking)

Ok that may work but i got a strange issue with this rocking tip... sometimes it doesn't retrieve the RecordCount for my recordset... !!!

I'm using ASP and SQL server, i open an ado connection then if i call a stored proc wich and use SET LOCK_TIMEOUT sometimes it will return that :

oRS.RecordCount return -1... glups !

Any help concerning this issue appreciated...

View 2 Replies View Related

Advanced SQL Injection - Shutdown With Nowait Question

Jun 13, 2005

Hello:I am doing this small experiment on SQL Injection, and appearantly, I was asked to do the shutdown thing, which I have read about, but don't have a single idea how how to start.Well, basically, I am still confused about a few things:1. Do I need to create a stored procedure first, before I start hacking (shutting down the SQL Server)? Or can I just use a normal User Table?2. I understand that the clause "shutdown with nowait" only allows the sysadmin and serveradmin to do so, so is there anyway a hacker makes himself a sysadmin or serveradmin?3. And I read that only with the login user: "sa", you can perform that action. But in my company, its sql login is not "sa", it's something else, so can I do anything about it?Well, that's all for now. So, actually, I have a project that first requires the user to login and must provide password. (Since I am doing experiment on SQL Injection, thus, it is vunerable). It connects to the sql server to match if the user name entered exists on the table.I hope this information is enough to help anyone to help me hahahahaha.... crossed my finger, though.Thanks in advance.

View 8 Replies View Related

RAISERROR WITH NOWAIT Vs RAISERROR + RETURN

Dec 19, 2006

I would like to know if there was any semantic differences between the two following statements?

RAISERROR('Invalid argument.',11,1);
RETURN;

or simply

RAISERROR('Invalid argument.',11,1) WITH NOWAIT;

It seems that both statements interrupt the current transaction.

Does anyone has an idea on the subject?

Thanks in advance,
Joannes

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved