SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 wait for locks to be released to do truncate
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

influent
Constraint Violating Yak Guru

USA
361 Posts

Posted - 05/16/2012 :  13:18:26  Show Profile  Reply with Quote
I have a table used for reporting that gets rebuilt every half hour, a process which only takes 10 seconds. All my reports use SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED but still get hung if the rebuild occurs while they are using that table. Is there a hint I can use in the rebuild script to tell it to wait until there are zero locks of any kind on the table before it truncates and inserts? Or does that not matter because using READ UNCOMMITTED will not even put shared locks on the table?

Sorry if this has been answered in other posts and my searching skills are poor.

Edited by - influent on 05/16/2012 13:23:07

namman
Constraint Violating Yak Guru

USA
258 Posts

Posted - 05/16/2012 :  21:40:05  Show Profile  Reply with Quote
Post SQL statements that you use to truncate, insert and select data
Go to Top of Page

ivycool
Starting Member

USA
3 Posts

Posted - 05/25/2012 :  00:06:18  Show Profile  Reply with Quote
Sorry if this has been answered in other posts and my searching skills are poor.
unspammed
Bree Vandicamp
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000