0

Suppose I have a Transaction running, at the same time I want to execute some set of SQL Queries (SELECT) in another connection.

I can do this using SET LOCKTIMEOUT, but for this I have to give a timeout value. In my case it varies, so I can't use a fixed millisecond.

I also don't want to retry the set of Queries when I get a LockTimeOut Error.

Is there any in-built feature in SQL Server 2008/2012 ?

Sreekumar P
  • 5,900
  • 11
  • 57
  • 82
  • Can you explain in more detail what you're trying to do? Do you want queries to time out after a certain amount of time? Or do you want to submit queries to SQL Server asynchronously? – Pondlife Apr 02 '13 at 21:31
  • Basically I don't want to make a timeout for my Queries, ie the the SQL Queries should wait until the LOCK is removed from Tables, even it is HOURS – Sreekumar P Apr 03 '13 at 09:33
  • 1
    The query timeout is set by the client application, e.g. [this question](http://stackoverflow.com/questions/1354271/timeout-setting-for-sql-server) shows how to do it in .NET. Setting it to zero [means that the client will wait forever](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx). – Pondlife Apr 03 '13 at 12:52

0 Answers0