dbTalk Databases Forums  

can SQL be setup to use no locking at all ?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss can SQL be setup to use no locking at all ? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Antonio Lopez Arredondo
 
Posts: n/a

Default can SQL be setup to use no locking at all ? - 05-08-2004 , 07:56 AM






hi all !!!

I have a DTS package that it is failing with a "timeout expired" message
when reading from SQL Server.

I suspect about locking problems when some data combination happens, because
the same package runs fine for most of the data sets I run it with, but with
some ones fails.

So the question is: can SQL Server be setup to not use locks at all ?

I know that doing so will not introduce any problems neither in the DTS
package nor in the applications using the database.

thanks again,
ant.




Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: can SQL be setup to use no locking at all ? - 05-08-2004 , 09:42 AM






If you are just running selects you can use the NOLOCK hint or set the
isolation level to READ UNCOMMITTED and it will not take out any locks. But
it won't honor any either. That means you can get dirty reads. So if the
data your reading is not mostly static or the values are important you have
to use this option with extreme caution. But a Select only takes out shared
locks anyway which are compatible with other shared locks. If your getting
blocked then that means someone is changing the data your trying to read. I
would find out why the other process is holding the locks for an extended
period first.

--
Andrew J. Kelly SQL MVP


"Antonio Lopez Arredondo" <adog (AT) someplace (DOT) com> wrote

Quote:
hi all !!!

I have a DTS package that it is failing with a "timeout expired" message
when reading from SQL Server.

I suspect about locking problems when some data combination happens,
because
the same package runs fine for most of the data sets I run it with, but
with
some ones fails.

So the question is: can SQL Server be setup to not use locks at all ?

I know that doing so will not introduce any problems neither in the DTS
package nor in the applications using the database.

thanks again,
ant.






Reply With Quote
  #3  
Old   
Isak Dinesen
 
Posts: n/a

Default Re: can SQL be setup to use no locking at all ? - 05-11-2004 , 06:59 AM



This is most likely lock escalation. Under the covers, when SQL Server
issues too many locks on a given table it simply replaces the more granular
locks with a table lock. This is standard fare with most RDBMSes, so you
should always consider this when designing a bulk load.

"Andrew J. Kelly" <sqlmvpnoooospam (AT) shadhawk (DOT) com> wrote

Quote:
If you are just running selects you can use the NOLOCK hint or set the
isolation level to READ UNCOMMITTED and it will not take out any locks.
But
it won't honor any either. That means you can get dirty reads. So if the
data your reading is not mostly static or the values are important you
have
to use this option with extreme caution. But a Select only takes out
shared
locks anyway which are compatible with other shared locks. If your
getting
blocked then that means someone is changing the data your trying to read.
I
would find out why the other process is holding the locks for an extended
period first.

--
Andrew J. Kelly SQL MVP


"Antonio Lopez Arredondo" <adog (AT) someplace (DOT) com> wrote in message
news:ejIsZOPNEHA.740 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
hi all !!!

I have a DTS package that it is failing with a "timeout expired" message
when reading from SQL Server.

I suspect about locking problems when some data combination happens,
because
the same package runs fine for most of the data sets I run it with, but
with
some ones fails.

So the question is: can SQL Server be setup to not use locks at all ?

I know that doing so will not introduce any problems neither in the DTS
package nor in the applications using the database.

thanks again,
ant.








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.