{"id":41,"date":"2015-09-01T06:25:04","date_gmt":"2015-09-01T06:25:04","guid":{"rendered":"http:\/\/www.exploreax.com\/blog\/?p=41"},"modified":"2015-10-08T06:33:24","modified_gmt":"2015-10-08T06:33:24","slug":"ax-database-restore-scripts-list","status":"publish","type":"post","link":"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/01\/ax-database-restore-scripts-list\/","title":{"rendered":"AX Database Restore Scripts (List)"},"content":{"rendered":"<p><a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/sqlserver-11.png\"><br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-382\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/sqlserver-11.png\" alt=\"sqlserver (1)\" width=\"150\" height=\"92\" \/><\/a>A \u00a0common task in the administration of a\u00a0Dynamics AX installation is restoring databases from a live application to a development environment or quality assurance (QA) environment. However when doing so one needs to be very careful to re-configure the database\u00a0so that it behaves correctly in its new context. For example you would need to re-configure your SSRS servers to point to the correct DEV\/QA SSRS instance. Many of these changes can be done via the front-end, but it is very useful to script these in SQL so that nothing is missed and alot of effort is saved.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright wp-image-380 size-full\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/microsoft-dynamics-ax-icon.png\" alt=\"microsoft-dynamics-ax-icon\" width=\"128\" height=\"128\" \/>The following post aims to list as many of the potential data items that need to be changed when doing a DB restore. I will in the following days be posting the relevant SQL alongside the front-end equivalent and ultimately a full DB restore script that you can use when doing such a restore. Some\u00a0of these may need to be adapted for your specific configurations and you may need to add your own based on customization etc.<\/p>\n<h2><strong>Infrastructure setups<\/strong><\/h2>\n<ul>\n<li><strong>SSRS Servers<\/strong> &#8211; Re-point or recreate your SSRS (SQL Server Reporting services) instances <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/02\/ax-db-restore-scripts-1-ssrs-servers\/\">(View Details)<\/a><\/li>\n<li><strong>SSAS Servers<\/strong> &#8211; Re-point or recreate your SSAS (SQL Server Analysis services) instances <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/03\/ax-db-restore-scripts-2-ssas-servers\/\">(View Details)<\/a><\/li>\n<li><strong>Configure AX AOSs\u00a0and batch AOSs<\/strong> &#8211; Live environments may typically have multiple AOS&#8217; and batch servers. Cleaning up and reconfiguring these references will assist in getting new batch jobs and SSRS setups up and running. <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/04\/ax-db-restore-scripts-3-configure-ax-servers-and-batch-servers\/\">(View Details)<\/a><\/li>\n<li><strong>Batch Jobs\/Batch Groups\u00a0<\/strong><a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/08\/ax-db-restore-scripts-4-reconfigure-batch-jobs\/\">(View Details)<\/a>\n<ul>\n<li>Reconfigure batch jobs and batch groups to use the new server configurations as soon as the AOS is started up (e.g. Workflow processing)<\/li>\n<li>Disable certain critical batch jobs &#8211; This is especially important if there are batch jobs that should NOT run in a DEV\/QA environment. E.G. Automatic placement of orders etc&#8230; These jobs should typically never be run outside of live so we want to disable them before the AOS even starts up.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Service\u00a0accounts<\/strong> &#8211;<em> (Optional)<\/em> Reset your AX service accounts (workflow execution and business connector proxy) if live and DEV\/QA\u00a0differ. <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/10\/ax-db-restore-scripts-5-configure-service-accounts-and-help-server\/\">(View Details)<\/a><\/li>\n<li><strong>Help server<\/strong> &#8211; <em>(Optional)<\/em> Re-point your help server URL if necessary if live and DEV\/QA\u00a0differ. <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/10\/ax-db-restore-scripts-5-configure-service-accounts-and-help-server\/\">(View Details)<\/a><\/li>\n<li><strong>Reset outgoing email server<\/strong> &#8211;<em> (Optional)<\/em> if live and DEV\/QA\u00a0differ. <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/11\/ax-db-restore-scripts-6-smtp-server-and-dmf-folder\/\">(View Details)<\/a><\/li>\n<li><strong>Reset Data Migration Framework&#8217;s shared folder<\/strong> <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/11\/ax-db-restore-scripts-6-smtp-server-and-dmf-folder\/\">(View Details)<\/a><\/li>\n<li>Enterprise portal websites &#8211; Re-point your enterprise portal website urls to the DEV\/QA instances.<\/li>\n<\/ul>\n<h2><strong>Data safe guards (Optional)<\/strong><\/h2>\n<ul>\n<li><strong>Reset all email templates<\/strong> to have a sender name and address that clearly shows that they originate from a DEV\/QA system. <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/16\/ax-db-restore-scripts-7-setting-email-templates-and-user-email-addresses\/\">(View Details)<\/a><\/li>\n<li><strong>Reset Customer\/Vendor\/User email addresses<\/strong> &#8211; We may not want to inadvertently send out mails to clients, vendors or users while performing tests. These may include alert or workflow emails. <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/16\/ax-db-restore-scripts-7-setting-email-templates-and-user-email-addresses\/\">(View Details)<\/a><\/li>\n<li><strong>Disable users<\/strong> &#8211; You may require that only certain users have access to DEV\/QA databases for testing, scripting the disabling of\u00a0the users in bulk\u00a0will help prevent the wrong people from accessing the environment and save you having to do this manually.\u00a0<a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/10\/08\/ax-db-restore-scripts-8-disable-users\/\">(View Details)<\/a><\/li>\n<li><strong>Clean up sensitive data if needed<\/strong> &#8211; E.G. Bank accounts, credit cards etc.<\/li>\n<li><strong>Set user status bar options<\/strong> &#8211; It is sometimes useful to set your users status bar options in DEV\/QA so that you can easily identify critical bits of information relating to their sessions. <a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2014\/08\/04\/setting-status-bar-options-in-code-and-sql\/\">(View Details)<\/a><\/li>\n<\/ul>\n<h2><strong>Clean Ups<\/strong><\/h2>\n<ul>\n<li>Clean up SYSServerSessions<\/li>\n<li>Clean up SYSClientSessions<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A \u00a0common task in the administration of a\u00a0Dynamics AX installation is restoring databases from a live application to a development environment or quality assurance (QA) environment. However when doing so one needs to be very careful to re-configure the database\u00a0so that it behaves correctly in its new context. For example you would need to re-configure&hellip;<a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/01\/ax-database-restore-scripts-list\/\">Read more <span class=\"screen-reader-text\">AX Database Restore Scripts (List)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,5,45,61,4],"tags":[101,102],"_links":{"self":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/41"}],"collection":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":17,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"predecessor-version":[{"id":461,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/41\/revisions\/461"}],"wp:attachment":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}