December 9, 2009 at 3:43 am
Dear all, if I do the shrinkfile command for a 100% filled datafile, what happens whether the procedure abort or if I stop manually? In msdn I can read, I have to drop the empty file. But in case of an abort or stop, the file is not empty. Do I need to restart the shrinkfile process, or can I use the datafile with a filling degree of 50% if the process was done with a part of 50%. Or is the file not useable for database process to add new pages to this file? I can't find any information about this case of error.
December 9, 2009 at 10:23 am
SHRINKFILE works in transactions of 32 pages - post by CSS which offers some good insight -
Tommy
Follow @sqlscribeDecember 16, 2009 at 2:35 am
Hi Tommy,
sry, but in the blog I can't find the info, what I have to do, if the task aborts...
December 16, 2009 at 6:58 am
mulle-78 (12/16/2009)
Hi Tommy,sry, but in the blog I can't find the info, what I have to do, if the task aborts...
In short, you can safely stop and restart an emptyfile operation; the file will remains online until it is removed.
Tommy
Follow @sqlscribeDecember 16, 2009 at 7:09 am
thx for response
and if I forget to delete a datafile with an aborted " DBCC SHRINKFILE (PTODATA03, EMPTYFILE)" command, the existing pages will be used by the DB, but no new pages will be created in this datafile?
The datafile is not usable for new pages, right? But an abort is then not very critical?
thx
December 16, 2009 at 7:17 am
mulle-78 (12/16/2009)
thx for responseand if I forget to delete a datafile with an aborted " DBCC SHRINKFILE (PTODATA03, EMPTYFILE)" command, the existing pages will be used by the DB, but no new pages will be created in this datafile?
The datafile is not usable for new pages, right? But an abort is then not very critical?
thx
NP - correct - per BOL (http://msdn.microsoft.com/en-us/library/ms189493.aspx):
EMPTYFILE
Migrates all data from the specified file to other files in the same filegroup. Because the Database Engine no longer allows data to be placed in the empty file, the file can be removed by using the ALTER DATABASE statement.
Tommy
Follow @sqlscribeDecember 16, 2009 at 7:28 am
thx, yes... this is what I read in msdn... but not how critical is an abort
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply