SQL Server Management Studio is a powerful tool to manage SQL Server databases. Let’s discuss its two very common properties which can make our daily life easy.
- Why every time, a new query window is open with MASTER database.
On open a new query window, It opens it with MASTER database in use, because on creation of a new user, SQL Server sets default database as MASTER. You change it by opening properties window for your user and then change default database value to your desired one.
Now opening a new query window, your own database will be selected by default.
- On opening SQL Server Management Studio, I need a new query window automatically.
SQL Server Management Studio gives you five options to change its startup behavior. You can select one of these options by moving your mouse to TOOLS. Options in top menu.
Open Object Explorer
Using this option, only Object Explorer will be opened on startup and will ask you to login to an instance
Open new query window
This option will help you to start SSMS with a new query window only.
Open Object Explorer and new query window
This option is the most common one, when you need both Object Explorer and Query Window
Open Object Explorer and Activity Monitor
This option will open Activity Monitor with Object Explorer
Open empty environment
Option, which is never used (at least I never used it). As it will just open SQL Server Management Studio, No query window, No object explore, just main menu with tool bars.
Aasim Abdullah is working as SQL Server DBA with CureMD (www.curemd.com) based in NY, USA. He has been working with SQL Server since 2007 (Version 2005) and has used it in many projects as a developer, administrator, database designer. Aasim's primary interest is SQL Server performance tuning. If he finds the time, he like to sketch faces with graphite pencils.