BACKUP LOG cannot be performed because there is no current database backup in SQL Server 2017

BACKUP LOG cannot be performed because there is no current database backup

In this post, we will solve “BACKUP LOG cannot be performed because there is no current database backup” that we have faced when we tried to take a transaction log backup in SQL server 2017.

BACKUP LOG cannot be performed because there is no current database backup SSMS1

Applies To

  • SQL Server 2019.
  • SQL Server 2017.
  • SQL Server 2016.
  • SQL Server 2014.
  • SQL Server 2012.

Transaction Log Backup Failed

In SQL Server 2017, I tried to take a Transaction log Backup using Management Studio by doing the mentioned steps below:

  • Right-click on the database name.
  • Select Tasks > Backup.
Back up Steps.png
  • Select “Transaction Log” as the backup type.
  • Select “Disk” as the destination.
  • Click on “Add…” to add a backup file and type “C:\SharePoint_Config.Bak” and click “OK”.
  • Click “OK” again to create the backup.
BackUp log from SSMS

I got the this error.

When I clicked OK. I got the this error.

BACKUP LOG cannot be performed because there is no current database backup

BACKUP LOG cannot be performed because there is no current database backup 2017
BACKUP LOG cannot be performed because there is no current database backup

Also, I have tried to use BACKUP LOG statement in T-SQL as below

BACKUP LOG SharePoint_Config TO DISK = 'C:\SharePoint_Config_log.bak' 
GO

But unfortunately, I still getting the same error

BACKUP LOG cannot be performed because there is no current database backup

Why we got “BACKUP LOG cannot be performed because there is no current database backup” in SQL Server?

Before performing a Transaction log Backup, you should first be aware of the following:

  • As a mandatory pre-request, you must perform a database full backup before performing a transaction log backup.
  • Log Backup is working with Full or bulk-logged recovery models. it’s not working with a simple recovery model.
  • You may need to perform a full/differential database restore when you perform a restore for the transaction log backup.

For more details, about transaction log file, and transaction log backup. Please check How to Create Transaction LOG BACKUP Maintenance Plan in SQL Server

Note: You may also encounter “BACKUP LOG cannot be performed because there is no current database backup” error when you try to restore a database from an older version (SQL Server 2014) to a newer version (SQL Server 2016). in the below solution section, we will show how to solve this issue in that case!

Solving “BACKUP LOG cannot be performed because there is no current database backup”

To be able to perform a transaction log backup and avoid this error, you must first perform a full database backup as the following:

Perform Full Database Backup in SQL Server using T-SQL

In this example, we will perform a bundle action to take a full database backup then take a transaction log backup at once.

BACKUP DATABASE [SharePoint_Config] TO DISK = N'C:\SharePoint_Config.bak'
GO
BACKUP LOG [SharePoint_Config] TO DISK = N'C:\SharePoint_Config_log.bak'
GO

Perform Full Database Backup in SQL Server using SSMS

  • Right-click on the database name.
  • Select Tasks > Backup.
Back up Steps.png
  • Select “Transaction Log” as the backup type.
  • Select “Disk” as the destination.
  • Click on “Add…” to add a backup file and type “C:\SharePoint_Config.Bak” and click “OK”.
  • Click “OK” again to create the backup.
full back up database.png

Great, the database full backup has been taken successfully, let’s go to perform a transaction log backup now

Take a transaction Log Backup using SSMS

  • Right-click on the database name.
  • Select Tasks > Backup.
Back up Steps.png
  • Select “Transaction Log” as the backup type.
  • Select “Disk” as the destination.
  • Click on “Add…” to add a backup file and type “C:\SharePoint_Config_log.bak” and click “OK.”
  • Click “OK” again to create the backup.
BackUp log from SSMS

Restore a database from an older SQL Server version to a new version

You may also get this error “BACKUP LOG cannot be performed because there is no current database backup” if, you are trying to perform a database restore from an older SQL Server version to a new SQL Server version.

Actually, this issue occurs if you first have created an empty database with the same name, then you have tried to restore your backup. In this case, to be able to restore the database backup to a newer version, you have two options:

  1. Delete the newly empty created database and try to restore the backup from the Device.
  2. or leave it and just make sure to do the following:
    • In “Restore Database” Dialog, in the “Options” tab.
      • Check “Overwrite the existing database (With Replace)”
      • Uncheck “Take a tail-log before restore”.
Restore a database from an older SQL Server version to a new version

Conclusion

In conclusion, we have learned before performing a transaction log backup we must first take a full database backup to avoid this error “BACKUP LOG cannot be performed because there is no current database backup”.

You might also like to read

Leave a Comment

Your email address will not be published. Required fields are marked *

Share to Microsoft Teams