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
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...
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..
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..
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..
Hi ,
Happy New Year !!!
Hope this will help you .
1.aeypka.blogspot.com/.../restore-ax-database-in-different-domain.html
Regards,
Amith Prasanna
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.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,963 Most Valuable Professional
nmaenpaa 101,156