Solved

What kind of lock does SQL Server 2008 R2 acquires when doing DBCC SHRINKDATABASE?

Posted on 2012-03-30
2
441 Views
Last Modified: 2012-04-14
What kind of lock does SQL Server 2008 R2 acquires when doing DBCC SHRINKDATABASE?  Thanks.
0
Comment
Question by:thomaszhwang
2 Comments
 
LVL 8

Accepted Solution

by:
dmarinenko earned 500 total points
ID: 37789329
Table Locking, the same as if Tablock was used.  By the way, shrinking a 2008 database is normally not recommended,
http://msdn.microsoft.com/en-us/library/ms188796.aspx

One reason it isn't recommended
http://www.mssqltips.com/sqlservertip/2055/issues-with-running-dbcc-shrinkfile-on-your-sql-server-data-files/
0
 

Author Closing Comment

by:thomaszhwang
ID: 37847505
Thanks.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS - How do I get a year value to display based on the current month? 8 42
SQL Error - Query 6 26
Help in Bulk Insert 9 35
SQL - Update field defined as Text 6 17
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question