March 27, 2012 at 8:36 am
Hi,
I want modify the exising log file size for one SQL DB.
I have tried this command to minimide the exising log file size but geing below error :
USE [master] GO ALTER DATABASE [DatabaseName] MODIFY FILE ( NAME = N'DATABASENAME_Log', SIZE = 5024KB , FILEGROWTH = 0) GO
Error Msg: MODIFY FILE failed. Specified size is less than current size
......
If I try with GUI it's not effesting
1.Launch Microsoft SQL Server Management Studio
2.Locate your database and right-click on it. Select Properties.
3.Click on Files section
4.Locate the LOG FILE line.
5.Change the Initial Size to: 500
6.Locate the Autogrowth section and click on the ellipse (...)
7.Uncheck "Enable Autogrowth". Click OK.
8.Click OK to make the change
Sugest me to resolve this please.
Thanks in Advance,
Kishna
March 27, 2012 at 8:40 am
ALTER DATABASE ... ALTER FILE can only be used to grow the file. To make the file smaller, use DBCC ShrinkFile.
p.s. Don't disable autogrow unless you're absolutely certain the file will never need to grow.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply