I read BOL says this can be done online but will it generate blocks.
Is it done in small transactions?
Thanks
Paul
Can you point us to exactly where it stats that? A shrinkfile with or
without Emptyfile will lock the page or extent as it moves it from the back
of the file to the front or from file to file in the case of the empty file.
It should not hold that lock unless you wrapped it in your own transaction.
Andrew J. Kelly SQL MVP
"Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>I read BOL says this can be done online but will it generate blocks.
> Is it done in small transactions?
> Thanks
> Paul
>
|||Hi Andrew
As follows. If it does it page at a time I should be OK.
Thanks
Paul
DBCC SHRINKFILE
Shrinks the size of the specified data file or log file for the related
database
........
To remove any data that may be in a file, execute DBCC
SHRINKFILE('file_name', EMPTYFILE) before executing ALTER DATABASE.
The database being shrunk does not have to be in single-user mode; other
users can be working in the database when the file is shrunk. You do not
have to run SQL Server in single-user mode to shrink the system databases.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OeBukJYiFHA.500@.TK2MSFTNGP09.phx.gbl...
> Can you point us to exactly where it stats that? A shrinkfile with or
> without Emptyfile will lock the page or extent as it moves it from the
> back of the file to the front or from file to file in the case of the
> empty file. It should not hold that lock unless you wrapped it in your own
> transaction.
> --
> Andrew J. Kelly SQL MVP
>
> "Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
> news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>
No comments:
Post a Comment