Issue "Failed to logon to Microsoft Dynamics AX" after restoring demo/ other network domain data into SQL
Here, We will discuss about the issue "Failed to logon to Microsoft Dynamics AX".
Generally when we install new AOS then "MicrosoftDynamicsAX" is our default database and after synchronization/compilation we can access our AOS instance. After completing this approach we need data to start practice or work.
So I would recommend to create new database (suppose "MsDyDemo") in your SSMS instead of overwriting over your default DB. What I mean to say, don't touch your default database (MicrosoftDynamicsAX). Now restore demo data or other network domain's data into your newly created database "MsDyDemo" and go to: Administrative tools/Microsoft Dynamics AX 2012 Server Configuration/Database connection (tab). Select "MsDyDemo" under Database name drop down and restart AOS services. Once AOS services is running then you need to access Ms Dy AX but you will get info message "Failed to logon to Microsoft Dynamics AX" in case your system domain and restored DB domain are different.
Here, for fixing this issue we need to change SID, Network domain and Alias from restored DB "MsDyDemo" so first select your default DB "MicrosoftDynamicsAX" and run SQL query
select * from USERINFO
execute this query and select user- "Admin". Copy SID, Network domain from Admin user and save in separate Note pad or Word document.
Now select and expand database "MsDyDemo", expand tables and select dbo.UserInfo. Right click on table dbo.UserInfo and select "Edit Top 200 Rows".
Select User- Admin and update SID, Network domain values from Note pad or Word document (the values which we copied from default DB) and give your current user account name under NetworkAlias. Save the changes and run AOS with admin credential. Once AX gets open then go to: Systemadministration/Common/Users/Users/Import other user accounts.
I hope I cleared the concept.
Happy DAXing.....