Open a Template
You can open a template from Template Explorer.
To open a template from Template Explorer
You can open templates from the Template Explorer.
To open Template Explorer, on the View menu, click Template Explorer.
In the list of template categories, expand the category that contains the template you want to open.
There are three ways to open the template:
Double-click the template to open it in a code editor window.
Right-click the template and select Open to open it in a code editor window.
Drag the template into a code editor window to add the template code to the contents of the editor window.
After the template is open, use the Replace Template Parameters dialog box to replace the template parameters with your values.
If opening a template launches a new editor window, the window will open with the credentials of the current active connection. For example, if you are focused on an instance of the Database Engine in Object Explorer when you open the CREATE DATABASE template, a new editor window will be opened using a connection to that instance. If there is no active connection, Management Studio will present a login dialog.