If this is the first time you have run SSMS, I recommend setting up the startup options so that the environment is set up the way you want it.

Similar documents
Microsoft Office Outlook 2007: Intermediate Course 01 Customizing Outlook

SQL Server. Management Studio. Chapter 3. In This Chapter. Management Studio. c Introduction to SQL Server

BDM Hyperion Workspace Basics

To complete this project, you will need the following folder:

Creating a Custom Report

1. Move your mouse to the location you wish text to appear in the document. 2. Click the mouse. The insertion point appears.

SECTION 4 USING QUERIES. What will I learn in this section?

DbSchema Forms and Reports Tutorial

Organize Mail into Folders

The following instructions cover how to edit an existing report in IBM Cognos Analytics.

DbSchema Forms and Reports Tutorial

BRIEFCASES & TASKS ZIMBRA. Briefcase can be used to share and manage documents. Documents can be shared, edited, and created using Briefcases.

Creating a Crosstab Query in Design View

Join Queries in Cognos Analytics Reporting

The Collections Workbench can be used to view and manage accounts. Click anywhere to continue. Copyright 2012 Pulse Systems, Inc.

Solution Explorer Copy Items in a Solution Files That Manage Solutions and Projects Solutions (SQL Server Management Studio) Associate a Query with a

Exercise 1: Assigning Responsibilities to Delegates (This was called Proxy in GroupWise)

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Outlook 2011 EXPLORE THE OUTLOOK USER INTERFACE. Microsoft. Basic Tasks

Manage and Generate Reports

GroupWise 7 WebAccess Introduction

Outlook - an Introduction to Version 2003 Table of Contents

Microsoft Access 2010

Microsoft Office 2010: Introductory Q&As Access Chapter 2

Chapter 10. Database Applications The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Microsoft Access 2013

Microsoft Access 2013

Report on Configurable Fields in Business Intelligence

Visual Studio.NET. Although it is possible to program.net using only the command OVERVIEW OF VISUAL STUDIO.NET

Outlook Web App (Exchange 2010) User Guide Computer Training Solutions Version Revision Date

9.4 Authentication Server

Outlook 2003 Tips, Tricks for Managing Your

OpenForms360 Validation User Guide Notable Solutions Inc.

Lab: Relational Universe Create Predefined Filters

PRODUCTIVITY TIPS USING OUTLOOK Washtenaw Community College

CSC 330 Object-Oriented

Setting up the EDGE System in Outlook for Mac 2011

Microsoft Access 2013

Dynamic Projects in SAS Enterprise Guide How to Create and Use Parameters

Sending, Composing and Addressing a New Message:

Student Manual. Cognos Analytics

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

EL-CID Quick Reference Version 6.0

OSR Composer 3.7 User Guide. Updated:

Dive Into Visual C# 2008 Express

Chapter11 practice file folder. For more information, see Download the practice files in this book s Introduction.

Exporting distribution lists from Thunderbird to Outlook

About the To-Do Bar in Outlook 2007

ImageNow Interact for ESRI ArcGIS Server Installation and Setup Guide

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

Configuring Zones and Zone Sets

Copyright 2012 Pulse Systems, Inc. Page 1 of 46

Introduction. Opening and Closing Databases. Access 2010 Managing Databases and Objects. Video: Working with Databases in Access 2010

Creating databases using SQL Server Management Studio Express

Doc. Version 1.0 Updated:

Enterprise Architect. User Guide Series. Testing. Author: Sparx Systems. Date: 26/07/2018. Version: 1.0 CREATED WITH

Customizing FrontPage

Kendo UI. Builder by Progress : What's New

Enterprise Architect. User Guide Series. Testing. Author: Sparx Systems Date: 15/07/2016 Version: 1.0 CREATED WITH

MAS 90/200 Intelligence Tips and Tricks Booklet Vol. 1

Enterprise Architect. User Guide Series. Testing. Author: Sparx Systems. Date: 10/05/2018. Version: 1.0 CREATED WITH

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment.

ms-help://ms.technet.2004apr.1033/win2ksrv/tnoffline/prodtechnol/win2ksrv/howto/grpolwt.htm

Getting started 7. Setting properties 23

LEARNING ABOUT TAXES WITH INTUIT PROFILE: 2016 TY Chapter 8 Exploring ProFile cont d

SAS Studio: A New Way to Program in SAS

SQL Server Express Installation Guide

Enterprise Architect. User Guide Series. Testing

Outlook Calendar

Creating Reports in Access 2007 Table of Contents GUIDE TO DESIGNING REPORTS... 3 DECIDE HOW TO LAY OUT YOUR REPORT... 3 MAKE A SKETCH OF YOUR

Quick Start Guide for Lotus Notes 8.5.1

Excel The primary replacement for menus and toolbars in Office Excel 2007 is the Ribbon. Designed for easy browsing, the

Sharing the Calendar

SlickEdit Gadgets. SlickEdit Gadgets

Quick Tips & Tricks. Important You must use SEMICOLONS ( ie; ) to separate address when sending mail to multiple users

2015 TECHNOLOGY SESSION: ADVANCING YOUR OUTLOOK 2013 SKILLS

Microsoft Windows 7 - Illustrated Unit A: Introducing Windows 7

JUNE 2016 PRIMAVERA P6 8x, CONTRACT MANAGEMENT 14x AND UNIFIER 16x CREATING DASHBOARD REPORTS IN ORACLE BI PUBLISHER

Horizon Launcher Configuration Guide

Reading Lists in Minerva Quick guide

Windows 10: FAQs. The Start Menu. Cortana

Navigation Bar Icons

Perform a Server Move for Junxure

Office 365 Employee San Jac Outlook 2010

TSM Studio Server and TSM Studio Operational Reporting

SQL Server 2005: Reporting Services

Banner Documentation Bookshelf

What s New in Cognos. Cognos Analytics Participant s Guide

Using SQL Developer. Oracle University and Egabi Solutions use only

ICS Tutorials: Basic Operations

Linking documents to workflows from worklow connect

Sage Estimating (SQL) v17.12

POS Designer Utility

Explore the OWA user interface

Getting Started with Access

MicroStrategy Desktop

To complete this database, you will need the following file:

Introduction to Microsoft Access

Administration. Training Guide. Infinite Visions Enterprise Edition phone toll free fax

More Skills 11 Capture a Screen with the Snipping Tool

Transcription:

Page 1 of 5 Working with SQL Server Management Studio SQL Server Management Studio (SSMS) is the client tool you use to both develop T-SQL code and manage SQL Server. The purpose of this section is not to provide a complete guide to working with SSMS, but rather just to help you get started writing and executing T-SQL code against SQL Server. To start working with SSMS: 1. Start SSMS from the Microsoft SQL Server program group. If this is the first time you have run SSMS, I recommend setting up the startup options so that the environment is set up the way you want it. If a Connect To Server dialog box appears, click Cancel for now. 2. Choose the menu item Tools Options to open the Options dialog box. Under Environment General, set the At Startup option to Open Object Explorer and New Query. This choice tells SSMS that whenever it starts it should open the Object Explorer and a new query window. Object Explorer is the tool you use to manage SQL Server and graphically inspect object definitions, and a query window is where you develop and execute T-SQL code against SQL Server. Feel free to navigate the tree to explore the options that you can set, but few of them are likely to mean much at this point. After you gain some experience with SSMS, you will find many of the options more meaningful and will likely want to change some of them. 3. When you're done exploring the Options dialog box click OK to confirm your choices. 4. Close SSMS and start it again to verify that it actually opens the Object Explorer and a new query window. You should see the Connect To Server dialog box as shown in Figure A-12. Figure A-12. The Connect To Server dialog box 5. In this dialog box, you specify the details of the SQL Server instance you want to connect to: 5-1. Type the name of the instance you want to connect to in the Server Name box. 5-2. Make sure Windows Authentication is chosen in the Authentication box. 5-3. Click Connect. SSMS should start as shown in Figure A-13.

Page 2 of 5 Figure A-13. SSMS started The Object Explorer window appears on the left, and the query window appears to the right of Object Explorer. Although the focus of this book is developing T-SQL code and not SQL Server management, I urge you to explore the Object Explorer by navigating the tree and by right-clicking the various nodes. You will find Object Explorer a very convenient tool to graphically inspect your databases and database objects as shown in Figure A-14. Figure A-14. Object Explorer Note that you can drag items from the Object Explorer to the query window.

Page 3 of 5 Tip If you drag the Columns folder of a table from the Object Explorer to the query window, SQL Server will list all table columns separated by commas. In the query window you develop and execute T-SQL code. The code you run is executed against the database you are connected to. You can choose the database you want to connect to from the Available Databases combo box as shown in Figure A-15. Figure A-15. The Available Databases combo box 6. Make sure you are currently connected to the TSQLFundamentals2008 sample database. Note that at any point you can change the instance you are connected to by right-clicking an empty area in the query window and then choosing Connection Change Connection. 7. You are now ready to start developing T-SQL code. Type the following code in the query window: SELECT orderid, orderdate FROM Sales.Orders; 8. Press F5 to execute the code. Alternatively, you can click Execute (the icon with the red exclamation point; not the green arrow, which starts the debugger). You will get the output of the code in the Results pane as shown in Figure A-16. Figure A-16. Executing your first query

Page 4 of 5 You can control the target of the results from the Query Results To menu item or by clicking the corresponding icons in the SQL Editor toolbar. You have the following options: Results To Grid (default), Results To Text, and Results To File. Note that if some of the code is highlighted, as shown in Figure A-17, when you execute the code, SQL Server executes only the selected part. SQL Server executes all code in the script only if no code is highlighted. Figure A-17. Executing only selected code Tip

Page 5 of 5 If you press and hold the Alt button before you start highlighting code, you can highlight a rectangle block that doesn't necessarily start at the beginning of the lines of code for purposes of copying or executing, as shown in Figure A-18. Figure A-18. Highlighting a rectangle block Finally, before I leave you to your own explorations, I'd like to remind you that all of the source code of the book is available for download from the book's Web site. The previous section in this appendix, "Downloading Source Code and Installing the Sample Database," provides the details. Assuming you downloaded the source code and extracted the compressed files to a local folder, you can open the script file you want to work with from the menu item File Open File or the Open File icon on the Standard toolbar. Alternatively, you can double-click the script file's name in Windows Explorer to open the script file within SSMS.