Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 wait for locks to be released to do truncate

Author  Topic 

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2012-05-16 : 13:18:26
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.

namman
Constraint Violating Yak Guru

285 Posts

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

ivycool
Starting Member

3 Posts

Posted - 2012-05-25 : 00:06:18
Sorry if this has been answered in other posts and my searching skills are poor.
unspammed
Bree Vandicamp
Go to Top of Page
   

- Advertisement -