Reputation: 1
I have a database where the MDF size is 10GB and the LDF size is 47GB.
I changed recovery model to simple and full but it didn't change.
I have a job for full backup (once per day) and log backup (every 15 mins).
How do I decrease the size of the log file LDF file?
Upvotes: 0
Views: 245
Reputation: 1
my soloution was that : EXEC sys.sp_cdc_disable_db
because in " SELECT * FROM SYS.DATABASES " COLUMN cdc was enable and that maked log_reuse_wait_desc to REPLICATION and increased log file
Upvotes: 0
Reputation: 8819
You should be able to use DBCC SHRINKFILE
to shrink the transaction log file. Let's say the following query:
select name from MyUserDatabase.sys.database_files;
Returns:
name
--------------------------------
MyUserDatabase
MyUserDatabase_log
You can shrink the transaction log file to its smallest size (which includes whatever data is still residing in it) with:
dbcc shrinkfile (MyUserDatabase_log, 1);
REF: DBCC SHRINKFILE (Transact-SQL) - Examples
Upvotes: 1