How to apply database backup from LCS to your D365FO DevBox environment?
Do you want to update your devBox with the latest data from another environment? In this article, we are going to talk about how to apply a database back-up (.bak file) from LCS to your D365FO DevBox environment.
- Log in to your DevBox where you want to apply the DB back up
- Sign in to LCS https://lcs.dynamics.com
- Select the project that has the DB back-up you want to apply
- Click on the burger icon and choose Asset Library
- Click on "Database backup" then choose the database backup you want to download and click on it.
- The download will start for the backup file of type (.bak)
- I saved this file in my devBox in J drive, under a new folder called LCS backup
- Before proceeding, It's better to close Visual studio and stop the following services: DMF, Batch, Management reporter and SQL reporting services.
- Open "Microsoft SQL server management studio" and click connect
- Expand the "databases" node in object explorer, and choose AxDB
- Before applying the new DB backup, we can take a backup of the existing DB just in case. You can do that by right clicking on AxDB, selecting "Tasks" then "Back up"
- Click "Ok" (As you can see in the image below, Destination is Disk and the path to save the original DB backup is in J drive which you can change as you wish)
- Once the backup is finished, you'll get this message
- Now you can apply the new backup file (.bak) that you downloaded from LCS and restore it directly on AxDB.
Right click on AxDB and click Tasks - restore - Database- Under "Source" choose Device, then click on the three dots next to it
- Click on Add
- Choose the .bak file you download from LCS, then click Ok
- Click Ok
- As you can see, all fields are now filled, you can now click on options in the left pane
- In options, mark the following two fields as true: "Overwrite the existing database (With replace) and "close existing connections to destination database". Then click Ok.
- Under "Source" choose Device, then click on the three dots next to it
- You'll get a message now that the DB is restored successfully
- Open visual studio and synchronize the database
- After the sync finishes, you can now navigate to the tables to check if the data you want is now appearing
Comments
Post a Comment