Friday, March 4, 2011

Restore Ax Environment(Ldf,Mdf) to Unavailable Domain

Problem :
If u restore the Axapta Backup to unavailable Domain , Then U find following error

Even the domain administrators do not gain access.
User in Ax are link to the domain controller for which the system is installed. The users are ‘imported’ into Ax, resulting in the user actually be able to startup an Ax client, logging into Ax and performing actions for which the user has been granted access in Ax. 
This information, which user in which domain is allowed to perform which action is part of the Ax database. This includes any trusted domains, for example in case of a traditional perimeter network. 
But what if you restore an Ax database that was part of another domain? Even if you are the domain administrator, you will get the ‘You are not a recognized user of Microsoft Dynamics Ax. Contact your system administrator for help.’ message.  
The reason for this error is that the system only recognizes users from the old domain. This can be solved to updating the data directly using the database manager. In case of MS SQL server:
- Go to the Ax database. You can determine which database instance and database is used by checking the AOS configuration. 
- Find the dbo.USERINFO table
- Open this table and find the record with ID value ‘Admin’. This user has in a normal scenario all rights, but may differ per installation. You can also use SQL to update the record, what ever makes you happy. 
- Update the following fields to reflect the current domain credentials. Bottom two lines can be ignored in this screenshot, the top line has the ID ‘Admin’ in this example:
- SID – The Security Identifier of the account specified in the networkdomain and networkalias. See section ‘Get your SID’.
- NETWORKDOMAIN – you current login domain
- NETWORKALIAS – your current windows login name
- You might want to make sure the field ‘ENABLED’ has the value 1. Otherwise the user is disabled, and you will still not be able to login. 
- Save the record
- Open Ax
- Create your own users / import from the Domain. 

Get your SID
Create a file with the extension .VBS. Copy the following info:
strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
Set objAccount = objWMIService.Get("Win32_UserAccount.Name='<user>',Domain='<domain>'") 
Wscript.Echo objAccount.SID
Replace <user> with your user name, and <domain> with the domain. This script can be run from any computer in the domain, it does not have to be the domain controller.  A popup will appear with your SID:


  1. abe jeetu yrrr mujhe All data base copy krna hai with out .DAT format to kya SQL server folder se direct LDF and MDF ko dopy krna theek rhega.......?