|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Shink log
In 2-3 days of work my transaction my transaction logs grows up to 500 Mb
(is it normal?). So I do the following: 1) BACKUP LOG Mydatabase WITH TRUNCATE_ONLY 2) Using SQLManager I shink the log (truncate free space) and returns to 500 Kb. My questions: a) Is there any way to do this with only one command? b) And what about scheduling it? Will affect users operations? (I mean: doing a truncate interferes with client applications?) Thanks! Hi
http://www.karaszi.com/SQLServer/info_dont_shrink.asp Show quoteHide quote "Gaspar" <nore***@no.com> wrote in message news:%23Sh%23Q%23nIGHA.2912@tk2msftngp13.phx.gbl... > In 2-3 days of work my transaction my transaction logs grows up to 500 Mb > (is it normal?). > So I do the following: > 1) BACKUP LOG Mydatabase WITH TRUNCATE_ONLY > 2) Using SQLManager I shink the log (truncate free space) and returns to > 500 Kb. > > My questions: > a) Is there any way to do this with only one command? > b) And what about scheduling it? Will affect users operations? (I mean: > doing a truncate interferes with client applications?) > > Thanks! > Are you performing regular transaction log backups? If no, set the database to simple recovery mode.
There are downsides to regularly shrinking database files: http://www.karaszi.com/SQLServer/info_dont_shrink.asp -- Show quoteHide quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ Blog: http://solidqualitylearning.com/blogs/tibor/ "Gaspar" <nore***@no.com> wrote in message news:%23Sh%23Q%23nIGHA.2912@tk2msftngp13.phx.gbl... > In 2-3 days of work my transaction my transaction logs grows up to 500 Mb (is it normal?). > So I do the following: > 1) BACKUP LOG Mydatabase WITH TRUNCATE_ONLY > 2) Using SQLManager I shink the log (truncate free space) and returns to 500 Kb. > > My questions: > a) Is there any way to do this with only one command? > b) And what about scheduling it? Will affect users operations? (I mean: doing a truncate > interferes with client applications?) > > Thanks! >
Other interesting topics
Seeking Recommendation Confirmation
No process is on the other end of the pipe SQL 2k5 Restoring SQL server from log files SQL Server 2000 Editions details Production debugging of SQL Server 2005 without VS 2005? Add a user via a script Link Server problem DBCC CheckDB and CheckAlloc Copying database to same machine? Displaying Failed job in SQL Server 2005 Management Studio |
|||||||||||||||||||||||