Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 file size growth

Author  Topic 

arunsqladmin
Yak Posting Veteran

74 Posts

Posted - 2008-03-03 : 02:36:02
i have a database which has a log file size of 10 Mb. it goes into single user mode automatically . i tried to increase the size of file size of log file from 10 mb to 50 mb... but i want to make it only 20 mb ... i am unable to change since it gives a message .cannot decrease the size of the file .. is there another way to decrease the size of log file .....

CShaw
Yak Posting Veteran

65 Posts

Posted - 2008-03-03 : 17:08:31
Try DBCC ShrinkFile

You have to give it a file ID and the size you want to shrink it to. This is from Books on line. Search for DBCC Shrinkfile statement.

DBCC SHRINKFILE
(
{ 'file_name' | file_id }
{ [ , EMPTYFILE ]
| [ [ , target_size ] [ , { NOTRUNCATE | TRUNCATEONLY } ] ]
}
)
[ WITH NO_INFOMSGS ]




Chris Shaw
www.SQLonCall.com
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-03-03 : 17:48:41
50 MB seems very small for the log file. You are probably better off just leaving it alone.


CODO ERGO SUM
Go to Top of Page
   

- Advertisement -