SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Read Uncommitted, locks, and transactions


Read Uncommitted, locks, and transactions

Author
Message
Andre Guerreiro
Andre Guerreiro
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3377 Visits: 1515
Straightforward question and highly detailed explanations!

Thank you.

Best regards,

Andre Guerreiro Neto

Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
princa
princa
Say Hey Kid
Say Hey Kid (711 reputation)Say Hey Kid (711 reputation)Say Hey Kid (711 reputation)Say Hey Kid (711 reputation)Say Hey Kid (711 reputation)Say Hey Kid (711 reputation)Say Hey Kid (711 reputation)Say Hey Kid (711 reputation)

Group: General Forum Members
Points: 711 Visits: 198
Good question, it's actually the same scenario I am facing right now!!!
But I still have some questions:
#1 - I am using a partitioned view to union two tables, one is original table, one is backup table. So every time I will need to backup original table to backup table, and use partitioned view to union them then will return the same result as i query only original table.
#2 - Then I will delete from original table and then insert all new data. While I am performing this step, eventhough I use with (nolock) on my partitioned view with select statement, it will still be locked until the insert process is done, the same behavior like Truncate.

Am I doing something wrong here?
Evil Kraig F
Evil Kraig F
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39375 Visits: 7660
princa (5/7/2012)
Good question, it's actually the same scenario I am facing right now!!!
But I still have some questions:
#1 - I am using a partitioned view to union two tables, one is original table, one is backup table. So every time I will need to backup original table to backup table, and use partitioned view to union them then will return the same result as i query only original table.
#2 - Then I will delete from original table and then insert all new data. While I am performing this step, eventhough I use with (nolock) on my partitioned view with select statement, it will still be locked until the insert process is done, the same behavior like Truncate.

Am I doing something wrong here?


Whats the wait_type on the spid doing the select? I'd have to reconstruct the scenario to confirm. Also, what version is the server?


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
kapil_kk
kapil_kk
SSCrazy Eights
SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)

Group: General Forum Members
Points: 8395 Visits: 2777
just a wild guess n get +1 for that Smile

_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search