[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Alter Database not allowed within multi-statement transaction

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Alter Database not allowed within multi-statement transaction.


Applies to: Microsoft SQL Server 2019.

Date created: December 20, 2019.
 

Problem Description.
 

Trying to set off the Accelerated Recovery Feature on a SQL Server 2019 database, I received the following error:


Msg 226, Level 16, State 6, Line 81
ALTER DATABASE statement not allowed within multi-statement transaction.

 



Cause.


I was able to find a transaction left open using DBCC OPENTRAN as shown below.

 



Solution.


First we made a successful commit of the transaction.





 

After that I was able to run successfully the ALTER DATABASE statement.

 

 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.