![]() You can also check the DBCC SHRINKFILE completion progress by using the following command: SELECT percent_complete, estimated_completion_timeĪssuming all of your tables have been reindexed, then I find reducing the database in smaller chunks works better. Rebuilding Index operations takes advantage of multiple CPUs. However rebuilding indexes before running DBCC SHRINKFILE operations, shrinking file operations will take relatively less time. Is a single threaded operation and a single threaded operation does not take advantage of multiple CPUs and have no effect about how much RAM is available. How much time should be taken by this shrink operation? ![]() Remove the data file from the database. Create a data file and assume it contains data. For the purposes of this example, a data file is first created and it is assumed that the file contains data. The following example demonstrates the procedure for emptying a file so that it can be removed from the database. The file can be removed by using the ALTER DATABASE statement. EmptyFile assures you that no new data will be added to the file. In other words, EmptyFile will migrate the data from the specified file to other files in the same filegroup. Migrates all data from the specified file to other files in the same filegroup. The another option to resolve this issue which I like is emptying a file.If the size of the file is too large for your environment, then try to shrink the file in small chunks. ![]() Rebuild Indexes of a database before performing the shrink operation.Well you need to do the following things: When shrinking a data file is taking forever then what needs to be done at this point of time?
0 Comments
Leave a Reply. |