赞
踩
-
- USE[master]
- ALTER DATABASE TJ_MES SET RECOVERY SIMPLE WITH NO_WAIT
- ALTER DATABASE TJ_MES SET RECOVERY SIMPLE --简单模式
-
- USE TJ_MES
- DBCC SHRINKFILE (N'TJ_MES_log' , 1, TRUNCATEONLY) --设置压缩后的日志大小为200M,可以自行指定
-
- USE[master]
- ALTER DATABASE TJ_MES SET RECOVERY FULL WITH NO_WAIT
- ALTER DATABASE TJ_MES SET RECOVERY FULL --还原为完全模式
-
- --查询数据库日志大小
- SELECT
- DB_NAME(database_id) AS DatabaseName,
- type_desc AS FileType,
- size * 8 / 1024 AS SizeMB,
- growth * 8 / 1024 AS GrowthMB
- FROM sys.master_files
- where type_desc='LOG' and DB_NAME(database_id)='TJ_MES'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。