How to delete a log file in sql server




















Turn to Tasks - Shrink , and then click Files. Generally, log file will be shrunk after you click OK now. But if you want to set it in more detailed, options below can be selected. If this is selected, the Shrink file to value must be specified. By default, the option is cleared. Option 3: Enter the maximum percentage of free space to be left in the database file after the database has been shrunk. The value can be between 0 and This option is only available when Reorganize files before releasing unused space is enabled.

But if we prepare to delete data, the primary data file cannot be made smaller than the size of the primary file in the model database. Option 4: Select the Empty file by migrating the data to other files in the same filegroup check box.

Expand Databases , right-click it from which to delete the file, and then click Properties. Select the Files page. In the Database files grid, select the file to delete and then click Remove. Copy and paste the following example into the query window and click Execute.

This example removes the file test1dat4. But command can work fast. We are a team with over 10 years of database management and BI experience.

Your email address will not be published. If we do not delete these temporary secondary log files over time, log file count will increase.

We select the Log option from the File type section as shown below. We choose the file we want to shrink from the file name. In this way we are able to transfer the data in the log file to the other log files. Author: dbtut We are a team with over 10 years of database management and BI experience. Share Facebook Twitter LinkedIn. Leave a Reply Cancel reply Your email address will not be published.



0コメント

  • 1000 / 1000