Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using SQL Server Management Studio to generate scripts for all the objects in an existing database:

enter image description here

but the objects related to SQL Broker (messages, queues and services) are not generated.

I've fiddled with the advanced options but still can't get them out. Is there a way to do it?

share|improve this question
Is this SSMS 2008 or 2012? – JNK Apr 15 '13 at 20:34
@JNK Neither, that looks like 2005 to me. Giveaway is the lack of an Activity Monitor icon on the toolbar. But then, it may have been removed, but I doubt it. – RoKa Apr 15 '13 at 20:39
Sorry, I posted the wrong screenshot. It's SSMS 2008. – Farinha Apr 16 '13 at 8:08
up vote 4 down vote accepted

Even in Management Studio that ships with SQL Server 2012 (BTW please stop using SSMS 2005 to manage 2008+ instances), the Generate Scripts option will not offer Service Broker objects, whether you select "script all" or select individual objects. You'll need to use other methods - SMO, PowerShell, or right-clicking within the Service Broker node of Object Explorer and scripting items individually. You can speed this up a bit using Object Explorer Details (in the right-hand pane you can select multiple objects and script them), but this is still one operation per object type.

PS this was complained about years ago, but sadly, closed as Won't Fix.

share|improve this answer
Bummer! Thanks for the clarification. I was trying to avoid manual scripting or getting yet another tool, but I guess that's what has to be done. – Farinha Apr 16 '13 at 8:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.