This question already has an answer here:
I am new bee for SQL Server dba. I need some suggestion to shrink the database log file.
I have tried and found some solution to shrink the file. But i think this is not opted solution for this.
ALTER DATABASE nologtest2 SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (nologtest2_log, 1); GO -- Reset the database recovery model. ALTER DATABASE nologtest2 SET RECOVERY FULL;
I am not sure I can do this in production.
Backup log nologtest2 to disk='C:\MAS\nologtest32_log.trn' DBCC SHRINKFILE (nologtest2_log, 1);
We can took some transaction log backup and then we can shrink the database. But i believe it will break the lsn chain. Then we may face some issue in logshipping environment.
I need some very opted solution for reduce the database log file issues.
I am not very familiar with being a SQL Server dba. If i am ask anything wrong or understandingly please correct me.