I'm running SQL Server 2019 and I need to do manage my backups and logs better.
My main database (mdf) is only 9GB however the log (ldf) is 792GB. I've created back ups of these using SSMS > Tasks > Back up... I was expecting after a back up of the database the logs would reset. As this did not happen against googles advice I tried to shrink the log file, nothing happened.
I've tried setting the max size of the log file to something less, however it won't allow this as the log file is already too big. This is a dev server and very shortly I will be switching this to prod. And so don't currently need historical back ups, but will do once live.
In the meantime I've had to delete other databases and log files to free up space. I've put mdf and ldf on different partitions.
EDIT: I was in Full Recover model however I have now switched this to SIMPLE. I will want point in time in the future but for now this will do. I took a backup however in simple recovery model only full and differential backup types are available, I can not now back up the log. I did both options available, hoping this would reduce the size of the log, it did not.
Question: Now I have a backup, can I just delete the log file and will SQL server create a new one. I can just repeat this process, when the disk fills up?