terça-feira, 4 de agosto de 2015

SRINK LOG TRANSACTION FILE OF YOUR DATABASE

USE AdventureWorks2012;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE AdventureWorks2012
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (AdventureWorks2012_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE AdventureWorks2012
SET RECOVERY FULL;
GO

I used the script above to create a JOB. It worked perfectly.
Há!

Nenhum comentário:

Postar um comentário