Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to move AX to a different Domain Server?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hi,

I ref it

https://dynamicsessentials.net/2015/04/14/how-to-move-your-ax-2012-deployment-to-a-different-domain/

but, i can have 2000 later users in my domain.

Backup the MicrosoftDynamicsAX and MicrosoftDynamicsAX_model database.

Restore the backup database in my other domain(different domian) server.

so,In SQL Server USERINFO, I want to change the users SID from old-domain to new-domian.

I want use T-SQL to solve it.

so,I ref it.

https://sqlserver-help.com/tag/convert-sid/

but,the result is incorrect.

for ex)

query:

select  dbo.fn_SIDToString(SUSER_SID('contoso\axaif'))

⇒Result:

S-1-5-21-3503383935-5084141-3467774935-1126

query:

C:\Windows\system32>wmic useraccount where (name='axaif' and domain='contoso') get name,sid

⇒Result:

Name   SID
axaif  S-1-5-21-3503383935-2353917331-3467774935-1126

I want the T-SQL script...help.

*This post is locked for comments

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,391 Super User 2024 Season 2 on at
    RE: How to move AX to a different Domain Server?

    Hi Jiayi,

    I don't have the time to create a script and then provide detailed instructions.

    In fact you have to loop the UserInfoTable. Then change the domain in the NetworkDomain field.

    You can get the correct SID by using the next statement:

    AxaptaUserManager  axaptaUserManager = new AxaptaUserManager();

    userInfo.SID = axaptaUserManager..getUserSis(userinfo.NetworkAlias, userinfo.NetworkDomain);

    I do hope you are able to create a script. Otherwise check if someone else in your neighborhood has some AX development skills. Or ask again here...

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to move AX to a different Domain Server?

    Hi,André Arnaud de Calavon

    Happy new year..

    I will try create AX Job.

    Can you give me step-by-step instructions?

    Thank you very much..

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to move AX to a different Domain Server?

    hi,Denis Macchinetti

    Happy new year!

    thanks csv to insert AX database USERINFO table PS srcipt.

    I backup contoso domain AX Database,then restore into fabrikam domain SQL Server.

    So user data already exists.Not re-import AD user csv to USERINFO tabel.

    The USERINFO table SID colum value is contoso SID, not fabrikam SID.

    The fabrikam AD users and contoso AD users as same.

    EX) contoso.com has axuser@contoso.com

    EX) fabrikam.com has axuser@fabrikam.com

    [axuser] has exists both domain.But there is no trust relationship.

    So I want update USERINFO table SID colum value to fabrikam domain SID..

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to move AX to a different Domain Server?

    hi,Amith Prasanna

    I tried it.Thanks..

    This url is update userinfo T-sql.Is not convert Hex to string SID T-SQL.

    use t-sql

    select suser_sid('fabrikam\axuser')

    ⇒get the user SID HEX..is not String SID..

  • Suggested answer
    A.Prasanna Profile Picture
    A.Prasanna 8,163 on at
    RE: How to move AX to a different Domain Server?

    Hi ,

    Happy New Year !!!

    Hope this will help you .

    1.aeypka.blogspot.com/.../restore-ax-database-in-different-domain.html

    Regards,

    Amith Prasanna

  • Suggested answer
    Denis Macchinetti Profile Picture
    Denis Macchinetti 16,444 on at
    RE: How to move AX to a different Domain Server?

    Hi Jiayi

    I remember that in the old Microsoft Dynamics AX Virtual Machine there was a script that update the SID according to the UserInfo table.

    However, if you want you can go through my blog sinedax.blogspot.it/.../ax-2012-create-ax-users-from-csv-file.html where you can find a Powershell script, that I created in order import Users into AX.

    You can modify as you prefer in order to read the UserInfo Table and update the SID.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,391 Super User 2024 Season 2 on at
    RE: How to move AX to a different Domain Server?

    Hi Jiayi,

    Happy new year!

    Unfortunately, I don't know much about SQL scripts in relation with SID.

    An alternative would be creating a job in AX2012 to update the user information. I assume the system administrator has access to AX2012 on the new domain.

    Create a job which changes for all users, except the system administrator (or current user), the Network alias field. Clear the SID field. When you use the update() command for saving the changes, AX should update the correct SID automatically.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans