DBCC LOGINFO('isosdb_30')
USE [master]
SELECT [name] ,[database_id] ,[log_reuse_wait] ,[log_reuse_wait_desc] FROM [sys].[databases]
USE[master]
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY SIMPLE --简单模式
GO
USE ISOSDB_30
GO
DBCC SHRINKFILE ('iSOSDB_LOG' , 11, TRUNCATEONLY)
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY FULL WITH NO_WAIT;
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY FULL --还原为完全模式
GO
USE ISOSDB_30
GO
SELECT file_id, name FROM sys.database_files;
GO
收缩出现问题时解决方案1
USE [master]
SELECT [name] ,[database_id] ,[log_reuse_wait] ,[log_reuse_wait_desc] FROM [sys].[databases]
USE[master]
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY SIMPLE --简单模式
GO
USE ISOSDB_30
GO
DBCC SHRINKFILE ('iSOSDB_LOG' , 11, TRUNCATEONLY)
GO
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY FULL WITH NO_WAIT;
GO
ALTER DATABASE ISOSDB_30 SET RECOVERY FULL --还原为完全模式
GO
USE ISOSDB_30
GO
SELECT file_id, name FROM sys.database_files;
GO
收缩出现问题时解决方案1
http://akawn.com/blog/2012/01/resolve-log_reuse_wait_desc-is-replication/