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

by | Oct 9, 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.

0 Comments

Submit a Comment

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

Upcoming Events

april

08apr10:00 am10:30 amLicensing Preparedness for Dynamics 365 Customer Engagement

08apr12:00 pm1:00 pmMaking Project Information Management (PIM) a Priority

08apr2:00 pm2:30 pmFeatures in the Spring Release of Dynamics 365 Customer Engagement Users Can Take Advantage of Immediately

09apr11:00 am12:00 pmConfab With Stoneridge - Livestream - Portals

13apr11:30 am12:30 pmStoneridge Connect Online Keynote: Business Transformations Throughout History

14apr8:00 am5:00 pmStoneridge Connect Online - Day 1

15apr8:00 am5:00 pmStoneridge Connect Online - Day 2

15apr1:15 pm5:00 pmWhat’s New for Developers in Dynamics 365 Finance and Supply Chain Management – Online Workshop

16apr8:00 am5:00 pmStoneridge Connect Online - Day 3

22apr11:00 am12:00 pmPower BI and Reporting with Dynamics 365 Business Central

22apr2:00 pm2:30 pmNew Features for Power Apps Users

23apr11:00 am12:00 pmConfab With Stoneridge - Livestream - Internet of Things (IoT)

29apr10:00 am11:00 amStreamlining Customer Service and Enabling Your Sales Team with a Self-Service Portal

29apr12:00 pm12:30 pmUpdates to the Dynamics 365 Customer Engagement User Experience - What Technical Resources Need to Know

may

06may12:00 pm12:30 pmPower Apps Telemetry and AI Builder - Power Platform Updates

06may2:00 pm2:30 pmImprove Customer Experience with a Mobile Workforce Management Solution

07may11:00 am12:00 pmConfab With Stoneridge - Livestream - Manufacturing

13may12:00 pm1:00 pm3 Simple Sets Your Business Can Take to Embrace the Future of B2B E-Commerce

21may11:00 am12:00 pmEnterprise Asset Management and Manufacturing

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