--Database log name Query
Use DBNAME
GO
SELECT file_id, name,* from Sys.database_files;
GO
-------------------------------------------------------------------------------------------------------
--sql SERVER 2005 Cleanup methods
Use [master]
BACKUP LOG DBNAME with no_log
Use APP
DBCC shrinkfile (' Dbname_log ', 100)
-------------------------------------------------------------------------------------------------------
--sql SERVER 2008 Cleanup methods
use [master];
GO
ALTER DATABASE DBNAME SET RECOVERY simple with no_wait;
GO
ALTER DATABASE DBNAME SET RECOVERY simple;--Simple Mode
GO
use [DBNAME];
GO
DBCC shrinkfile (N ' Dbname_log ', one, truncateonly);
GO
use [master];
GO
ALTER DATABASE DBNAME SET RECOVERY full with no_wait;
GO
ALTER DATABASE DBNAME SET RECOVERY full; --Revert to full mode
GO
-------------------------------------------------------------------------------------------------------
SQL Server (2005/2008) Log Cleanup method