Murach’s SQL Server 2022
Chapter 2: How to use Management Studio
© 2023, Mike Murach & Associates, Inc.
Management tasks using Management Studio:
Start or stop an instance of SQL Server Express
Enable remote connections to a database
Navigate through database objects
Create database diagrams
View column definitions for tables
View/modify data in tables
Modify column definitions
Running SQL queries:
Use Management Studio to run, open, and save SQL queries.
Utilizing SQL Server documentation for information lookup.
Client Tool Functions:
Management Studio
SQL Server Configuration Manager
Azure Data Studio
Authentication Methods:
Distinction between Windows authentication and SQL Server authentication for database connection.
Key Tools:
SQL Server Configuration Manager
SQL Server Management Studio
Azure Data Studio
Overview of services in SQL Server Configuration Manager
Services Displayed:
SQL Server (SQLEXPRESS): Stopped/Runnings
SQL Server Agent (SQLEXPRESS): Stopped
SQL Server Browser: Stopped
Configuration Statuses:
State: Running
Start Mode: Automatic
Protocols for SQLEXPRESS:
Shared Memory: Enabled
Named Pipes: Disabled
TCP/IP: Selected for enabling
Connection Parameters:
Server type: Database Engine
Server name: localhost\SQLEXPRESS
Authentication: Windows Authentication
User name & Password fields
Connection Parameters:
Server type: Database Engine
Server name: localhost\SQLEXPRESS
Authentication: SQL Server Authentication
Login & Password fields
Features of SQL Server Management Studio and Object Explorer:
Quick Launch (Ctrl+Q)
Navigate through Databases, Tables, Views, External Resources, etc.
Execute new queries
Overview of objects in Object Explorer
Visual management of AP database and its entities via Management Studio
Display of items like Vendors, Invoices, and their relations in graphical form.
Vendors Table Structure:
Column Names, Data Types, Allow Nulls
Examples:
VendorID: int (PK)
VendorName: varchar(50)
DefaultTermsID: int (FK)
Displaying key attributes of Vendor details.
Row Modifications:
Active management of rows displayed in grid format
Example entries of terms managing payment due days.
Viewing Data:
Right-click on the table and choose Select Top 1000 Rows
Modifying Data:
Right-click and select Edit Top 200 Rows for grid-based editing
Commit changes by moving to another row; Press Esc to roll back changes.
Query Editor Window:
SQL statement composition process
Example SQL statement structure for data retrieval using SELECT
Using the Query Editor:
Create queries in a new Query Editor window, inputting SQL statements
Utilize IntelliSense for completion, execute using F5 or toolbar button.
Common Error Indicators:
Invalid column name examples and debugging through error messages.
Frequent Errors When Executing Queries:
Forgetting to select the correct database
Misspelling table or column names
Omitting necessary syntax elements like quotation marks.
Query Management:
Open and save SQL queries through the Open File dialog
Display of files based on structure and organization for convenience.
Saving and Opening Queries:
Save using toolbar or shortcut Ctrl+S
Open using toolbar or Ctrl+O.
Documentation Overview:
Link to syntax and features of the SELECT statement in SQL Server.
Description of SQL components and logical processing order.