Friday, May 10, 2019

Restore AX database backup in same instance with different name


We have a daily AX production database backup up plan. One day we faced a problem in the production. Some of the records are deleted. So, we planned to analyse with latest backup.

We got the below error message, when we try to restore the recent backup file with different database name.

Error message:

“The backup set holds a backup of a database other than the existing 'Test3' database.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3154)”

Solution:


Steps:

  1. Move the production database into offline mode. The database name is MicrosoftDynamicsAX.
  2. Copy and paste the mdf and ldf files in different location
  3. Move the production database into online mode
  4. Delete the MicrosoftDynamicsAX database
  5. Restore the recent database backup file with different database name (MicrosoftDynamicsAX_Backup), mention the different filename for mdf and ldf files and check the “Overwrite the existing database” option as per the post https://blog.sqlauthority.com/2013/11/23/sql-server-fix-error-3154-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing-database-ssms/
  6. Once restored successfully, we can attach the production database MicrosoftDynamicsAX
  7. This is only for the initial time, after that we can restore the database into MicrosoftDynamicsAX_Backup database anytime.

No comments :

Post a Comment