Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 truncate log file in sql 2005

Author  Topic 

binary
Starting Member

6 Posts

Posted - 2008-11-04 : 03:48:38
hello
i thought that when i switch from full to simple in sql 2005, the file log will be truncated, it seems not the case, i have the same size, is there any mistake

ALTER Database test SET RECOVERY FULL
GO
i backed up the database and the log
SELECT name,size from sys.database_files
test_Log 76544

i switch to the simple mode
ALTER DATABASE test SET RECOVERY simple
GO

SELECT name,size from sys.database_files
test_Log 76544

how i can verify that the log file is truncated??
tank you

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-04 : 09:20:36
you have to shrink log file with DBCC Shrinkfile after changing to simple recovery model.
Go to Top of Page
   

- Advertisement -