D365 F&O -The permission 'KILL DATABASE CONNECTION' is not supported in this version of SQL Server.

D365 F&O -The permission 'KILL DATABASE CONNECTION' is not supported in this version of SQL Server. Alternatively, use the server level 'ALTER ANY CONNECTION' permission. Error SQL72045: Script execution error. The executed s...

 Error message : Receive the following error while importing a bacpac to a Dev environment

 

Error SQL72014: Framework Microsoft SqlClient Data Provider: Msg 4630, Level 16, State 1, 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.

Error SQL72045: Script execution error.  The executed script:

GRANT KILL DATABASE CONNECTION TO [ms_db_configreader];

 

 

Steps to resolve the issue:

Step 1: 

Rename the BACPAC file to .zip

Go to the folder where you have saved your BACPAC file and rename the BACPAC file with a .zip extension

image

 

image

 

Press "Yes" to convert the .bacpac file to zip file.

image

 

Step 2 : Open zip file ,  

 

image

 

 Step 3: Copy the model.xml file into the different location

image

 

Step 4: Open it in notepad editor.

image

 Step 5.  Delete the entire Element tag which contains " Grant.KillDatabaseConnection " 

image

 

 Step 6. After deletion of the element type mentioned in Step 5. it look like below.

image

 

Step 8: Download the latest SqlPackage file from the below link:

 

https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver16

image

 

Step 9:  Rename the the file modelCopy.xml  and paste it in the SqlPackage folder.

image

 

Step 10: Rename the zipfile to bacpac file  (reverting back the changes from step 1)

image

 

image

 

Step 11: Login to command prompt as administrator. 

 

Step 12:  Navigate to the downloaded SQLPackage folder and run the below command.

image

 SqlPackage.exe /a:import /sf:"J:\MSSQL_BACKUP\AxDB.bacpac" /tsn:localhost /tdn:AXDB_New /p:CommandTimeout=1200 /TargetTrustServerCertificate:True /mfp:"ModelCopy.xml" 

This will resolve your issue of Importing the Bacpac file into D365 F&O Tier 1 environments

 

 

 

 

 

 


This was originally posted here.

 

posted @ 2025-09-10 14:02  tushadongjing  阅读(5)  评论(0)    收藏  举报