27.05.2020, 19:11 | #1 |
Участник
|
Rahul Sharma: Dynamics 365 finance database import export operations - bacpac - SqlPackage.exe
Источник: http://feedproxy.google.com/~r/Rahul...rt-export.html
============== Applies to:
Sometimes we want to export sandbox database and/or import the exported sql bacpac file to a non-sandbox environment. For example; export the database backup from gold environment and import it into UAT or conversion environment etc. How to import or export a SQL bacpac file from Dynamics 365 Below are some of the steps and commands to accomplish the same. Export the database Backup sandbox database to LCS Asset Library On sandbox environments, application uses Azure SQL Database. You can use LifeCycle Services (LCS) to export the copy of a sandbox UAT environment and the process will save it into the asset library. Backup non-sandbox database to LCS Asset Library On non-sandbox environments, application uses local SQL Server. You can use command prompt to export database backup as a bacpac file. Create a copy of database You should create a copy of the database by using backup and restore options from Microsoft SQL Server Management Studio (SSMS) or using below t-sql commands that will generate a new database. We create copy of the database so that we can work on it instead of the actual source database, as we will be deleting database users from this database before creating the bacpac file. Prepare the database Run the following script against the newly created database "AxDB_CopyForExport". Export the database as bacpac file Open a Command Prompt window, and run the following commands. Once you have the bacpac file, upload it to LCS Asset Library section. Import the database Restore to sandbox environment You can restore the bacpac file from the LCS using database movement options. Restore to non-sandbox environment You can use the below command to import the bacpac file as a new a database. We will not overwrite the existing database but will import it as a new database AxDb_fromUAT. Update the database You need to run the below script to add the database users back that we deleted earlier while exporting. Turn on change tracking Use the new database To switch database, from old to the new database, first stop the following services:
That's all for database export/import for today. If you like the story, please support by sharing and posting your comments / feedback / queries. Join me on facebook | twitter | linkedin !!! Источник: http://feedproxy.google.com/~r/Rahul...rt-export.html |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|