Couple of weeks back i have downloaded contoso demo data for AX2012 R2, however when i try to load them into my SQL server R2, i am not able to do so. I read PDF load contoso demo data test, but the initial steps are not mentioned in detail. and i have not imported contoso data before on any of the AX versions, could some one help me on this please.
When i try to import demo data , i see 2 backup files for MicrosoftDynamicsAX application data both are .bak files.
Also there are 2 backup files for model_data(MicrosoftDynamicsAX_model).
When i try to restore i get below error.
Can anyone give me step by step process to restore the DB/model files on SQL server 2008 R2
Answer
U need to de-attach ur both MicrosoftDynamicsAX & MicrosoftDynamicsAX_model db. Browse to physical file path of same, move both files to different directory.
Now come back to SQL, right click Databases under DB server say restore files and file groups. Browse to ur bak file, select same. In To database field just type MicrosoftDynamicsAX (in case of restoring MicrosoftDynamicsAX bak file). It will do the restore then u need to 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'