Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

shrink database file in sql server

USE SampleDataBase;
GO
-- Shrink the mdf file
DBCC SHRINKFILE(N'SampleDataBase', 0);
GO
-- Shrink the log.ldf file
DBCC SHRINKFILE(N'SampleDataBase_log', 0);
GO
Source by www.mssqltips.com #
 
PREVIOUS NEXT
Tagged: #shrink #database #file #sql #server
ADD COMMENT
Topic
Name
7+3 =