microsoft / DacFx

DacFx, SqlPackage, and other SQL development libraries enable declarative database development and database portability across SQL versions and environments. Share feedback here on dacpacs, bacpacs, and SQL projects.
https://aka.ms/sqlpackage-ref
MIT License
314 stars 19 forks source link

ENABLE_BROKER was disabled by publish dacpac #338

Open ch0mik opened 1 year ago

ch0mik commented 1 year ago

I have on DB set ENABLE_BROKER = true when i publish the DacPac, the DB has set ENABLE_BROKER to false

How to set via DacPac (DacFX) the DB option ENABLE_BROKER to True ?

my project based on Microsoft.Build.Sql 0.1.12-preview and Azure DataStudio 1.45.1

Regards Pawel

ch0mik commented 1 year ago

i put on the PostInstall Script on EOF the

use [master]
alter database [myDB] set single_user with rollback immediate
ALTER DATABASE [myDB] SET  ENABLE_BROKER WITH NO_WAIT
alter database [myDB] set multi_user with rollback immediate

and works