I recently got following email from one of the readers. It is about Backup Log file.
Even thought my database is in full recovery mode when I try to take log backup I am getting following error.
BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.Smo)
How to fix it?
[Name and email removed as requested]
Solution / Fix:
This error can happen when you have never taken a full backup of your database and you try to attempt to take backup of the log only. Take full backup once and attempt to take log backup. If the name of your database MyTestDB follows procedure as following.
BACKUP DATABASE [MyTestDB] TO DISK = N'C:\MyTestDB.bak' GO BACKUP LOG [MyTestDB] TO DISK = N'C:\MyTestDB.bak' GO
Please note that this is a very common issue which we see when a user have just changed their recovery model from Simple Recovery Model to Full Recovery Model. It is recommended to take full backup whenever you change your recovery model to avoid any unpleasant situation. Remember, it is important that your backup can be restored in your system so always try to restore your backup on your development server.
Reference: Pinal Dave (https://blog.sqlauthority.com)