|Published (Last):||4 January 2011|
|PDF File Size:||16.21 Mb|
|ePub File Size:||1.86 Mb|
|Price:||Free* [*Free Regsitration Required]|
The primary data file cannot be made smaller than the size of the primary file in the model database. Data that is moved to shrink a file can be scattered to any available location in the file. This causes index fragmentation and can slow the performance of queries that search a range of the index.
To eliminate the fragmentation, consider rebuilding the indexes on the file after shrinking. Expand Databases and then right-click the database that you want to shrink. Point to Tasks, point to Shrink, and then click Files. Displays the name of the selected database. Select the file type for the file. The available choices are Data and Log files.
The default selection is Data. Selecting a different filegroup type changes the selections in the other fields accordingly. Select a filegroup from the list of Filegroups associated with the selected File type above. Selecting a different filegroup changes the selections in the other fields accordingly. Select a file from the list of available files of the selected filegroup and file type. Displays the full path to the currently selected file.
The path is not editable, but it can be copied to the clipboard. For data files, displays the current allocated space. Cause any unused space in the files to be released to the operating system and shrink the file to the last allocated extent, reducing the file size without moving any data. No attempt is made to relocate rows to unallocated pages. When this option is selected, the user must specify a target file size in the Shrink file to box.
Specifies the target file size for the shrink operation. The size cannot be less than the current allocated space or more than the total extents allocated to the file. Entering a value beyond the minimum or the maximum will revert to the min or the max once the focus is changed or when any of the buttons on the toolbar are clicked.
Migrate all data from the specified file. Select the file type and file name. Optionally, select the Release unused space check box. This reduces the file size without moving any data. Optionally, select the Reorganize files before releasing unused space check box. If this is selected, the Shrink file to value must be specified.
By default, the option is cleared. Selecting this option causes any unused space in the file to be released to the operating system and tries to relocate rows to unallocated pages. Optionally, enter the maximum percentage of free space to be left in the database file after the database has been shrunk. Permissible values are between 0 and This option is only available when Reorganize files before releasing unused space is enabled.
Optionally, select the Empty file by migrating the data to other files in the same filegroup check box. Selecting this option moves all data from the specified file to other files in the filegroup.
The empty file can then be deleted. Cliquez sur OK. Click OK. From the Standard bar, click New Query. Copy and paste the following example into the query window and click Execute.
Comment réduire la base de données tempdb dans SQL Server
Comment compresser un fichier Excel