Error Details: The error message for BacPac DB restore is as follows:
Dynamics 365FO DB restore error Line 1 The permission ‘KILL DATABASE CONNECTION’ is not supported in this version of SQL Server. Alternatively, use the server level ‘ALTER ANY CONNECTION’ permission.
Step 1: Navigate to the folder where your BACPAC file is saved and change the file extension from .bacpac to .zip.
Step 2: Open the zip file and copy the model.xml file to a different location. Open the copied file in a text editor such as Notepad, VS Code, or Visual Studio. (Avoid editing the file directly in the zip folder or the original file).
Step 5: Change the file extension of the zip file back to .bacpac (reverse of Step 1).
Step 6: Go to the downloaded SQLPackage folder and execute the following command:
SqlPackage.exe /a:import /sf:J:\MSSQL_BACKUP\PreProdDB.bacpac /tsn:localhost /tdn:AxDB_PreProd2005 /p:CommandTimeout=1200 /TargetUser:"axdbadmin" /TargetPassword:"<DbPassword>" /TargetTrustServerCertificate:True /mfp:"ModelCopy.xml
DB import should be successful this time.
No comments:
Post a Comment
Thanks