Shrink Log File In Sql Server 2008
To Know About DataBase Size
sp_helpdb "dbname"
GO
--Then Execute this query
ALTER DATABASE "dbname"
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (dblogfilename,1);
GO
-- To Know About Dblogfilename
SELECT file_id, name
FROM sys.database_files;
GO
DBCC SHRINKFILE (1, TRUNCATEONLY);
To Know About DataBase Size
sp_helpdb "dbname"
GO
--Then Execute this query
ALTER DATABASE "dbname"
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (dblogfilename,1);
GO
-- To Know About Dblogfilename
SELECT file_id, name
FROM sys.database_files;
GO
DBCC SHRINKFILE (1, TRUNCATEONLY);