Posts

Showing posts with the label Synchronization

Job to update sync log table

static client void updateNotSynced2(Args _args) {    SysVersionControlSynchronizeLog         syncLog;    SysVersionControlSynchronizeBatchNum    lastNum;    boolean                                 entered = false;    //find last batch num    select firstOnly BatchNum from syncLog    order by syncLog.BatchNum desc;    lastNum = syncLog.BatchNum;    setPrefix('Numbers to process:');    //classes    ttsBegin;    while select forUpdate syncLog        where syncLog.Processed == NoYes::No &&              syncLog.ItemPath  like '*Classes*'    {        syncLog.BatchNum = lastNum + 1;        syncLog.update();        entered = true;    }    ttsCommit;    if (entered)    {        lastNum++;        entered = false;        info(strFmt('Batch number for classes is: %1', lastNum));    }    //forms    ttsBegin;    while select forUpdate syncLog        where syncLog.Processed == NoYes::No &&          

Unable to login to AX after DB sync

update the partition for admin user to be run when you get the below error after db sync Failed to create a session, confirm that the user has proper privileges to log on to Microsoft Dynamics DECLARE @NetworkDomain nvarchar(255); DECLARE @NetworkAlias nvarchar(80); 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' --check number of partitions SELECT * FROM dbo.PARTITIONS