Wednesday, 14 October 2015

AX 2012: Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics

 Issue: When i try to do full db sych i get following error:

"Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics"


Resolution:

Run below script on MicrosoftDyanmicsAX transaction db (not model db).

DECLARE @NetworkDomain nvarchar(300);
DECLARE @NetworkAlias nvarchar(300);
DECLARE @SID nvarchar(124);
DECLARE @InitialPartition BIGINT;

SELECT @InitialPartition=Recid FROM PARTITIONS WHERE PARTITIONKEY=N'Initial'

SELECT @NetworkAlias=NETWORKALIAS,@NetworkDomain=NETWORKDOMAIN,@SID=SID
FROM USERINFO
WHERE PARTITION=@InitialPartition AND ID = N'Admin'

UPDATE USERINFO
SET
NETWORKDOMAIN=@NetworkDomain,
NETWORKALIAS=@NetworkAlias,
SID=@SID

WHERE PARTITION != @InitialPartition AND ID = N'Admin'

No comments:

Post a Comment