Skip to content

Instantly share code, notes, and snippets.

@henricavalcante
Created October 24, 2012 18:21
Show Gist options
  • Save henricavalcante/3947850 to your computer and use it in GitHub Desktop.
Save henricavalcante/3947850 to your computer and use it in GitHub Desktop.
SQL SERVER - Log manager - Gerenciamento de log
--DBCC SQLPERF (LOGSPACE)
USE database_name;
GO
ALTER DATABASE database_name SET RECOVERY SIMPLE;
GO
DBCC SHRINKFILE (database_log, 1);
GO
ALTER DATABASE database_name SET RECOVERY FULL;
GO
USE [master]
GO
ALTER DATABASE database_name MODIFY FILE ( NAME = N'database_log', SIZE = 1024000KB )
GO
ALTER DATABASE database_name MODIFY FILE ( NAME = N'database_log', MAXSIZE = UNLIMITED)
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment