sql server 2005 shrink database or files

Click, oK and youre done.
GO, dBCC shrinkfile(yourdb_log, 200 - unit is set in MBs.
Consider that when you shrink a database you are taking away the free space that a database may someday grow right back into - effectively wasting your time and incurring the performance hit of a shrink operation only to convert australian dollars to rupees see the DB grow again.
Were you able to make use of that disk space you freed up only temporarily?Now, once you have regular log backups running, it should be ea sports cricket 2002 full version for pc reasonable to shrink the log file to something more reasonable than whatever it's blown up to now.With Instant File Initialization available in SQL Server 2005 and beyond for data files, the cost of growths is lower - but I still prefer to have a proper initial application - and I'm far less scared of white space in a database than.To face with this issue, in this tutorial, you can apply either of following methods.But the right answer may be to look at the right version for your needs.Declare @path nvarchar(255) N'backup_sharelogtestdb convert(char(8 getdate 112) replace(convert(char(8 getdate 108 '.trn backup LOG foo TO disk @path with init, compression; Note that backup_share should be on a different machine that represents a different underlying storage device.Shrink the log file to.By using this method, you can shrink the log to the desired size, ex: 1MB.Paul Randal also explains why multiple log files can bite you later.Apr 1, 2011 Hoan Huynh.Sqlcmd Storage Synchronization System Objects Tables Third Party Apps Tools Transaction Logs Troubleshooting Tutorials.



Let's say that comes to 200 MB, and you want any subsequent autogrowth events to be 50 MB, then you can adjust the log file size this way: USE master; GO, alter database Test1 modify file (name yourdb_log, size 200MB, filegrowth 50MB GO, note that.
The main idea of this method is it will delete the big log file and create a new log file with the minimum imtoo dvd ripper platinum 5.0 50 crack size.
But the bigger question in my mind when reading this question about shrinking the data file (or even the log file) is why?Presumably your database is in full recovery mode.In some case, the, microsoft SQL Server Database Transaction Log (.LDF) file becomes very big even ton.Please don't stop here; while much of the advice you see out there about shrinking log files is inherently bad and even potentially disastrous, there are some people who care more about data integrity than freeing up disk space.And when the transaction log has grown out of control, it often needs to be shrunk back, but care should be taken to prevent future situations of a log growing out of control.A blog post by Paul Randal explaining why t-log maintenance is important and why you shouldn't shrink your data files, either.Tutorials, dBA, dev, bI, career, categories, webcasts.This looks tempting because, hey, SQL Server will let me do it in certain scenarios, and look at all the space it frees!And what bad things happen when you try?Detach the database, delete the log file, and re-attach.