1, database-contraction-log-can shrink by more than 90, but the shrinkage, the capacity is not reduced. Check the information may be the log is occupied, temporarily unable to contract;
2, select Log_reuse_wait_desc from sys.databases where name = ' HIS_CDC ' query come Out is replication, think of before the CDC opened, and later not, just disable the job, CD C Forgot to disable:
select * from sys.databases where is_cdc_enabled = 1
SELECT * from Sys.tables WHERE is_tracked_by_cdc=1
EXEC sys.sp_cdc_disable_table @source_schema = ' dbo ', @source_name = ' T1 ', @capture_instance = ' all ';
EXEC sys.sp_cdc_disable_db;
3, the final contraction, if not successful, it is recommended to detach the database, delete the log and then reattach the database.
This article is from the "net profit Small Yogoro" blog, please be sure to keep this source http://miawxm.blog.51cto.com/13260218/1962464
SQL Server database log shrinkage failure workaround