Using the SQL Server 2008 Management Studio
The SQL Server Management Studio is a component of SQL Server 2008 that runs on workstation computers and lets you manage any or all of the SQL Server instances on your network. You run it by choosing SQL Server Management Studio from the Start menu on a workstation computer. The Management Studio begins by displaying a Connect to Server dialog box. You can use this dialog box to connect to any SQL Server instance on your network.
To connect to a SQL Server instance, specify the instance name and your logon credentials, and then click Connect. After you have connected, the Management Studio displays the screen.
The following sections explain how to perform some of the most common SQL Server chores, such as creating databases and tables, viewing database data, and so on.
Creating Database
To create a new database, follow these steps:
- Right-click the Databases node in the Navigation pane (on the left side
of the Management Studio window) and choose New Database from the menu that appears.
This brings up the New Database dialog box. - Type a name for the new database in the Database Name field.
- Enter the domain username for the user who is responsible for the database in the Owner field.
You can leave this set to the default if you want yourself to be listed as the owner. - If you want, change the settings for the database and log files.
You can change the following settings:
- Initial Size: This refers to the amount of disk space initially allocated to the files. The defaults are a ridiculously small 2MB for the database and 1MB for the log files. Unless your databases are going to be extremely small, you should probably increase these defaults.
- Autogrowth: This setting sets the incremental amount by which the database grows when it exceeds the allocated capacity. Again, you'll probably want to change these amounts for any but the smallest databases.
- Path: This points the way to the folder where the files are stored. By default, the files are created under the Program Files folder on the server's C: drive. You may want to change this setting to a more appropriate location.
- File Name: You can change this setting if you want to use a filename that's different from the database name.
- Click OK.
SQL Server grinds and whirs for a few moments while it creates the new database. When it's finished, the database appears under the Databases node.
The new database is ready to use. Of course, the database won't be very useful until you define some tables.