Archive for September 29th, 2010

Restoring AX Database From One Environment to Another

Wednesday, September 29th, 2010

When you restore a database from a production environment to a test / dev environment, you should run these scripts to ensure that your database is synchronized with the Application environment and proper object server.

Here are some samples scripts you should run:

Select * from BatchServerGroup
–Update BatchServerGroup set SERVERID = ’01@NewAOS’ where SERVERID = ’02@OldAOS’

Select * from BATCHSERVERCONFIG
–Update BATCHSERVERCONFIG set SERVERID = ’01@NewAOS’ where SERVERID = ’02@OldAOS’

Select * from SYSCLUSTERCONFIG

select * from SYSSERVERCONFIG
–Update SYSSERVERCONFIG set SERVERID = ’01@NewAOS’ where SERVERID = ’02@OldAOS’

Select * from SYSSERVERSESSIONS
–Update SYSSERVERSESSIONS Set AOSID = ’01@NewAOS’, Instance_Name = ’01′ where AOSID = ’02@OldAOS’

Select * from Batch
–Update BATCH set SERVERID = ’01@NewAOS’ where SERVERID = ’02@OldAOS’

select * from SYSCLIENTSESSIONS
–delete SYSCLIENTSESSIONS

Beside these, you should also check the Dynamics database for Enterprise Portal, Analytical Server BI setup and reporting server configuration. This could be done through SQL Server access or trough AX Administration setup.

Here is the list of Forms, tables and Columns which you should check.

List of forms in the Dynamics Databases that holders server specific information

Form Name Table Name Column for Server / URL
Reporting Servers, SRSServersForm SRSServers SERVERID
SERVERURL
REPORTMANAGERURL
BIOlapAdministration BIANALYSISSERVER
BICONFIGURATION
SERVERNAME
CONNECTIONSTRING
EPWebSiteParameters
Some values stored as a GUID which ties to WSS databases
EPWEBSITEPARAMETERS
EPGLOBALPARAMETERS
INTERNALURL
SITEID
EXTERNALURL

HOMEPAGESITEID
DEVELOPMENTSITEID

You should also visit this page for further information regarding different scenarios you could need when restoring a Backup of a Microsoft Dynamics AX SQL Database to another Domain or Environment.