SQL Server Management Studio Tutorial
SQL Server Management Studio is an application included with SQL Server 2005 and 2008. The software is an interface between the database engine and the programmer or administrator. The tool is used to create queries and view common settings on your SQL Server. It's also used to create databases for use with any internal applications. Some common properties and uses are beneficial for any SQL Server administrator.
Instructions
-
-
1
Click the Windows Start button and select "All Programs." Click "SQL Server" and then click the "SQL Server Management Studio" icon to start the application. The software prompts you for a user name and password to access the database. Use a current user name or use "sa," which is the system administrator for SQL Server.
-
2
Right-click the database name and select "Properties." A window opens that lists all the properties for the database server such as the size, file locations on the server hard drive, and how the database is started each time the server boots. You can restart the database engine in this window, which is used to troubleshoot some issues if the database freezes or stops responding to your applications.
-
-
3
Click the database icon on the left side of your window and then click the "New Query" button. This opens a console window where you can program your queries. For example, type the following into the query window:
select * from customer
Replace "customer" with the name of a database table. Press the "F5" key to run the query. At the bottom of the screen, a grid of all the records in the table is displayed. This is how you view records in the database using the application.
-
4
Click the "Tables" icon underneath the database name. This displays a list of all your tables in the database. Right-click one of the tables and select "Modify." A new window opens with all the fields configured in the table. To add a field, enter a value in one of the blank rows. You can also right-click a row and select "Delete" to remove it from the table. However, this is not recommended. Click the "Save" button to save your table changes.
-
5
Right-click the "Security" icon under your SQL Server icon and select "New" and then "Login." A template is displayed with the information required to add a user login to the server. This is done when you want to allow someone to connect to the server to query the tables and use the stored procedures. Enter a login and password and click the "OK" button. Assign the user's database access. For instance, if you have several databases programmed on the server, check the box next to the database for which the user will have query access.
-
1
References
- Photo Credit database on paper image by .shock from Fotolia.com