Home about IT Motivation Course Sales Project About Me

Monday, March 29, 2010

shrink database Ms SQL Server

usually used for reduce log file size at Ms. SQL

below steps script for reduce NORTHWIND database from 80GB become to 40GB:
(1) . backup the Log
BACKUP LOG NORTHWIND WITH NO_LOG
(2). cek logical name log
sp_helpdb NORTHWIND
(3). shrink the logical log become to 1024kb
DBCC SHRINKFILE (NORTHWIND_Log,1)

No comments: