Skip to content

Instantly share code, notes, and snippets.

@uygary
Created August 29, 2018 16:55
Show Gist options
  • Select an option

  • Save uygary/956fc4267f4df48b2c295a3fd428e649 to your computer and use it in GitHub Desktop.

Select an option

Save uygary/956fc4267f4df48b2c295a3fd428e649 to your computer and use it in GitHub Desktop.
After a half-ass migration, we forgot to turn on service broker, and this little puppy was what we used to diagnose the prooblem and fix it.
use FooBar;
go
select sq.* from sys.service_queues as sq
select tq.* from sys.transmission_queue as tq
alter database FooBar set restricted_user with rollback immediate
alter database FooBar set enable_broker
alter database FooBar set multi_user with rollback immediate
--open master key decryption by password ********
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment