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

By Tim Gable | October 9, 2019

The easy way to refresh your dynamics gp test company – part 2

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

Recommended Reading:

Manage U.S. Use Tax on Purchase Orders in Dynamics 365 Finance and Operations

  Managing sales tax requirements on your business purchase can be complicated, but Dynamics 365 Finance and Operations can help […]

Read the Article
5.19.22 Dynamics CRM

How to Write a Great Support Ticket in the Stoneridge Support Portal

Submitting a support ticket through the Stoneridge Support Portal is a quick and effective way to get assistance for any […]

Read the Article

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X