How to specify template parameter values in SQL Server Management Studio

When using templates in SQL Server Management studio (for example using a template to create new stored procedure), there is always a bunch of parameters for which you need to specify values. You can always go manually through the whole template script and set parameter values, but there is an easier way.

Press Shift+Ctrl+M and parameter value editor will open up. Enter values for each parameter in the list and you are done.



How to specify MS SQL Server port to connect to

If you are connecting to a SQL Server instance that is not listening for connections on default port (1433), you need to specify the port that the server is listening to.

To specify a port, use a comma separator after the server name / IP address –,5001,5001\MyInstance

First example above will connect to default instance on port 5001, and second example will connect to named instance on port 5001.