Thursday, August 1, 2013

Restore Ax 2012 demo data

After restoring the demo data in SQL 2008 R2, run the below script:

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'

No comments:

Post a Comment