MS SQL Server
  Home arrow MS SQL Server arrow Page 2 - SQL Server 2005 Introduction to SQL Server...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MS SQL SERVER

SQL Server 2005 Introduction to SQL Server Management Studio
By: MSDN Virtual Labs
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 17
    2006-01-12

    Table of Contents:
  • SQL Server 2005 Introduction to SQL Server Management Studio
  • Exercise 1: Exploring the Environment
  • Exercise 2: Attaching a Database
  • Exercise 3: Exploring an Existing Database
  • Exercise 4: Creating a New Database
  • Exercise 5: Setting up Database Access

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    SQL Server 2005 Introduction to SQL Server Management Studio - Exercise 1: Exploring the Environment


    (Page 2 of 6 )

    Scenario

    In this exercise, you will become familiar with the new SQL Server 2005 administration tool, called SQL Server Management Studio.

    SQL Server Management Studio is a new tool built for SQL Server 2005. It combines the functionality of the Enterprise Manager snap-in and the Query Analyzer. Although this is the main tool for administering one or more SQL Servers, you can also use the SQL Server Management Studio for executing queries and scripts, and for managing SQL Server projects.

    The SQL Server Management Studio tool is based on the Microsoft Development Environment used in Visual Studio 2005 to create applications. If you are not already familiar with Visual Studio 2005, using the SQL Server Management Studio tool will help you learn to use the new Microsoft Development Environment for Visual Studio 2005.

              TASKS                            DETAILED STEPS

    1. Open SQL Server Management Studio and connect to your server.

        1. Click in the virtual machine window.
        2. Press Right-ALT + DEL.
        3. Logon as Administrator with a password of pass@word1.
        4. From the Windows task bar, select Start | All Programs | Microsoft SQL Server 2005 | SQL Server Management Studio.
        5. When the Connect to Server dialog box opens, verify that SQL Server is selected as the Server type, verify that Server name is same name as the host machine or set it to localhost, and verify that Windows Authentication is selected as the authentication method.
        6. Click the Options button to display additional connection options.
        7. Click the Connection Properties tab.

          Note that the following options are available:
          • You can configure the network protocol to use for this connection, which might be different than the protocol you use for other connections.
          • You can configure a connection timeout, which controls how long to wait for the connection to be made.
          • You can configure an execution timeout to specify how long to wait for response from a query.
        8. Examine the options available on the Registered Servers tab.

          Note that you can export your server registration information, or import registration information from another server. This facility can be valuable for large organizations with many SQL Server administrators who all want to have the same servers registered.
        9. Click Options again to hide the additional options tabs.
        10. Click Connect.

          Note the various areas of the SQL Server Management Studio:

          The lower left pane is the Object Explorer, which appears as a tree view on the left side of SQL Server 2000 Enterprise Manager. Above that is the Registered Servers pane, containing a list of servers to which Management Studio can connect.

          The right side of the SQL Server Management Studio contains the tools for managing projects. On the top right is the Solution Explorer. Below that is the Properties Window. If the Solution Explorer is not visible, you can choose to display it by selecting View | Solution Explorer. If the Properties window is not visible, you can also enable that window from the View menu, or by right-clicking on any object in the Solution Explorer window and choosing Properties Window. At the moment, the Solution Explorer is blank because no solution is currently loaded.

          The location of all of these windows and browsers can be changed, and you can remove the ones you don’t want or need. You can undock and move windows by double-clicking on the window’s title bar. You can reset the window layout by select Window | Reset Window Layout.

          If you close any of the windows, you can restore them from the View menu.
    2. Use TSQL to execute a stored procedure.

        1. Click the leftmost button (New Query) on the standard toolbar, and then select New SQL Server Query to open a  SQL Query Window. When asked to connect to the server , click Connect.
        2. The query window appears in the center portion of the SQL Server Management Studio, and is tabbed with the Start Page. All additional query windows will be tabbed as well.
        3. In the query window, enter the following code: 

          EXEC sp_who
        4. Press F5 or click the Execute button on the toolbar to execute the query.

          You can disconnect from SQL Server without closing the query window by using the Query | Connection | Disconnect menu option. Alternatively, you can add a Disconnect or Disconnect All button to the toolbar. Right-click on the toolbar and choose Customize. Go to the Commands tab and select Query in the leftmost list box. You can then drag any command from the rightmost list onto an existing toolbar.

          Click Close to dismiss this dialog box.

    3. Open and use a script file from a project.

    The scripts you’ll need to run for the remainder of this lab have all been written for you.

    1. Click File | Open | Project/Solution.
    2. Select C:\SQL Labs\Lab Projects\Administration Lab\Administration Lab.ssmssln.
    3. Click Open. If the system prompts you to save changes as you load the solution, select No.
    4. You should see the Administration Lab solution in the Solution Explorer window on right side of the Management Studio. There are five projects, one for each of the five exercises in this lab. Under Exercise 1, expand the Queries folder, and double-click the script called ServerProperties.sql.

      USE master

      SELECT SERVERPROPERTY('ServerName')
      SELECT SERVERPROPERTY('Edition')
      SELECT SERVERPROPERTY('ProductVersion')
      SELECT SERVERPROPERTY('ProductLevel')

    5. To execute the batch, press F5 or click the Execute button on the toolbar. If prompted, reconfirm your server name and authentication mode in the Connect to SQL Server dialog box.

      Note the edition and version number of the SQL Server you are connected to. You may have to scroll down to see all of the results.

    More MS SQL Server Articles
    More By MSDN Virtual Labs


       · We hope you found this article from MSDN Virtual Labs to be enjoyable and...
       · Where are the projects for the SQL labs?Select C:\SQL Labs\Lab...
       · Access Virtual Labs online at microsoft.com -> Learning -> Virtual Labs on MSDN
     

    MS SQL SERVER ARTICLES

    - Completing the Introduction to Transact-SQL
    - A Brief Introduction to Transact-SQL
    - Lookups and Blocking Bad Data
    - Field Validation Rules for Blocking Bad Data
    - Using Masks to Block Bad Data
    - Blocking Bad Data
    - Using @@ROWCOUNT and TABLE Variables for Dat...
    - How to Use Variables, IF and CASE in Databas...
    - Creating Important Aspects of Notification S...
    - Working wth Variables in Database Interactio...
    - Delving Deeper into Notification Services
    - Notification Services
    - Building a Multi-table Report with SQL 2005 ...
    - A Secure Way of Building Connection Strings
    - Transferring a Database Using the SSIS Desig...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway