You need to back up your transaction log (ldf file) and then run a shrink. Transaction log backups need to be done in the same way that you back up the database (mdf file). If you do not, then the behavior you are observing will happen.
Example of a command to back up the transaction logs:
BACKUP LOG [Mobius] TO DISK = N'G:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\log.trn' WITH NOFORMAT, NOINIT, NAME = N'Mobius-Log de Transações Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
The same can be done through the interface:
Onedetail:Transactionlogbackupscanbebackedupandaccessedonline.
Ifyoudonotneedtransactionlogging,changeRecoveryMode(orrecoverymode)toSimple.Inthisscenario,logswillnotbegeneratedsoyoudonothavetobackup.
Note, however, that it all depends on the type of bank you are dealing with. Example: It is recommended that an ERP software bank have active transaction logging. One possible scenario would be a full day-to-day backup and hourly transaction backup.
Already a simpler application bank, you can only have full backup without the need for transaction logs.
The advantage of logs made every hour (for example) is the ability to restore a backup up to a certain time. In this case, simply restore the full backup and restore the hourly backups of the transaction logs to the desired time on top of it.