After fresh installation on VM, we usually restored the database back of Production or QA server . And this technique usually applied in multi development environment. But yesterday I got this error when I tried to restore Dynamics AX database on my newly created Dynamics Ax 2012 VM.
BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.Smo)
As per Sql Authority Website, it was backup creation issue, But surprisingly it was rights issue. I was trying to restored database from User who has not db owner or rights on the database. I switched the User and make my user as db owner, And then try to restored it. It works for me.
If this solution is not working then Please do the following.
• Stop the AOS service.
• Open BDS and delete the Dynamics Ax database.
• Restored the Dynamics Ax database from Back files
• Gave the db owner rights to service user on Dynamics Ax databases. Service user means that the user which Dynamics Ax service is running.
• Get the Current user SID by running following command in Powershell (Run as administrator).
$AdObj = New-Object System.Security.Principal.NTAccount(“administrator”)
$strSID = $AdObj.Translate([System.Security.Principal.SecurityIdentifier])
• Update the statement in database table
update userinfo set
networkdomain = ‘dynamicworlds.com’,
networkalias = ‘administrator’,
SID = ‘S-1-5-21-3030200632-4028267746-237368394-500’
where ID = ‘Admin’