BrentOzarULTD / SQL-Server-First-Responder-Kit

sp_Blitz, sp_BlitzCache, sp_BlitzFirst, sp_BlitzIndex, and other SQL Server scripts for health checks and performance tuning.
http://FirstResponderKit.org
Other
3.26k stars 981 forks source link

sp_DatabaseRestore: Add param to enable service broker on restore #3532

Closed lowlydba closed 1 day ago

lowlydba commented 3 weeks ago

Is your feature request related to a problem? Please describe. I'd like to be able to, via parameter, restore using sp_DatabaseRestore and include the functionality of ENABLE_BROKER (docs) so that existing service brokers in the restored database are enabled.

ENABLE_BROKER Specifies that Service Broker message delivery is enabled at the end of the restore so that messages can be sent immediately. By default Service Broker message delivery is disabled during a restore. The database retains the existing Service Broker identifier.

Describe the solution you'd like Something like @EnableBroker to achieve the above.

Describe alternatives you've considered I can do it as a separate statement myself, but that could be said about most of this proc's functionality 🙃

Are you ready to build the code for the feature? Sure, very easy implementation for this.

BrentOzar commented 1 week ago

Makes sense! Go for it. Thanks!

BrentOzar commented 1 day ago

Thanks for the PR! Looks good, makes sense, merging into the dev branch. I'm doing a July release a little early to get a couple of fixes into the Consultant Toolkit, and this will be in there.