Recently the database transaction log on one of my Dynamics 365 for Finance and Operations development environments grew too large and when I tried doing a database synchronization operation it failed and gave me the following error:
This is because the drive where the SQL transaction log is stored is full. Since it is a development environment and we do not care about point in time restore, we can open SQL Server Management Studio (SSMS) and execute these commands to shrink the log:
ALTER DATABASE AxDB SET RECOVERY SIMPLE;
And then execute this:
USE AxDB; GO CHECKPOINT; GO CHECKPOINT; GO DBCC SHRINKFILE(AxDBCopy3_log, 1000); -- 1000 = 1GB GO
AxDBCopy3_log is the name of the log file in my case. If you don't know the name of your log file you can right click on the AxDB database in SSMS and click on properties. You will find the name of your log file under the files page: