The Easy Way to Refresh Your Dynamics GP Test Company – Part 2

by | Updated October 11, 2019 | Dynamics GP

In our last session on the Easy Way to Refresh Your Dynamics GP Test Company – Part 1, we created a backup job to refresh our test company.  In this session, we will work on the restore portion of the SQL job we are creating.

1) Go to the server where SQL Server is installed and your Dynamics GP databases are located.

2) Open SQL server management studio and login as SA or a system administrator of SQL Server.

3) Right-click on the test database you will be restoring the copy of your live company database to.

4) Select tasks>>Restore>Database…

5) In the Restore Database window select

  • Device
  • Now click the ellipse and then the Add button to navigate to the backup you created in the previous session.
  • Then click OK twice to accept the backup you selected.

6) Once you have selected the backup file it is important to be sure the Destination Database remains the database you wish to restore to. Some versions of SSMS will change this destination back to the live database which could cause data corruption when the job is run.

  • Now select the Files option in the left pane and expand the “Restore As” file path. Make sure the database file names are of the GP TEST company database you wish to restore to and NOT the live db file name.  You may have to check the box  “Relocate all files to folder” if the files are not in the default location or you may have to manually path to the correct location if necessary.

  • Now select the Options folder on the right pane.
    1. Check the Overwrite the existing database (With Replace) checkbox
    2. Mark the Close existing connections to the destination database. (may not be available in older versions of SSMS)

7) Review all settings noted above one more time and then select the Script drop-down and then “New Query Editor Window” option. Once “New Query Editor Window” option is selected, you can click cancel on the Restore Database window.

8) You should now go to the new query editor window and select all the SQL code that was created. Then right-click the selected code and then click copy.

9) Open the SQL Agent job you created from our last session.

  • Go to SQL Server Agent expand jobs and Select the job. In this case, I called it “Back Up Database – Two and restore to Test”. Double click the job to open it or right-click and select properties
  • In the left pane select Steps and then at the bottom of the window select new.
  • When the New Job Step window opens select General on the left and then name the job on the right pane. In this case, I called it Restore Live Database on to Test Database.
  • Under “Database” select the destination database. (this would only have an effect if the job step did not name the working database)
  • Right-click in the command window and paste the SQL code you previously copied.

  • Now select “Advanced” from the left window and “On success action” from the right pane.
  • Select “Go To Next Step” and click ok.
  • Click OK one more time to close job and ignore any warning messages.

In our next session, we will finish the SQL job by adding the script to activate the new test company. Check out our previous blog on building the job.

Related Posts

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

june

02jun2:00 pm2:30 pmBusiness Intelligence for Batch Manufacturers

16jun10:00 am10:30 amHow AP automation can speed up month-end close in D365 Finance

17jun11:00 am12:00 pmConfab Live with Stoneridge – Real Time Marketing Strategies for Success

23jun10:00 am10:30 amThe Modern Manufacturer: Cost Accounting in D365

30jun10:00 am10:30 amAP Automation Checklist for a 2022 Rebound

30jun2:00 pm2:30 pmAchieving Success: How Technology Is Helping Nonprofits Thrive

july

01jul11:00 am12:00 pmConfab Live with Stoneridge – Dataverse Virtual Entities

14jul12:00 pm12:30 pmBeyond Reporting - What Business Intelligence Can Do For Your Agribusiness

14jul2:00 pm3:00 pmMastering the Production Floor

15jul11:00 am12:00 pmConfab Live with Stoneridge – Integration Strategies for End User Success

21jul10:00 am10:30 amThe Modern Manufacturer: Manufacturing Software in the Real World

21jul12:00 pm1:00 pmIs it Worth it to Upgrade to Dynamics 365 Finance and Supply Chain Management? - Everything AX Users Need to Consider

28jul2:00 pm2:30 pmConsiderations for Successful Testing Plans for Major Releases of Dynamics 365 Finance and Supply Chain Management

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X