ALTER DATABASE DB_NAME SET AUTO_SHRINK ONTo set the database to truncate the logs after a backup, enter this command into a query window:
EXEC sp_dboption 'DB_NAME ', 'trunc. LOG ON chkpt.', 'TRUE'To manually shrink a database with free space:
DBCC SHRINKDATABASE (DB_NAME)To manually truncate the logs, enter this command into the query window:
BACKUP LOG DB_NAME WITH TRUNCATE_ONLY
0 comments:
Post a Comment