Sie sind auf Seite 1von 47

Module 1:

SQL Server Overview

Vidya Vrat Agarwal. | MCT, MCSD

Module 1: SQL Server Overview Vidya Vrat Agarwal . | MCT, MCSD
Module 1: SQL Server Overview Vidya Vrat Agarwal . | MCT, MCSD

What Is SQL Server

ResultsResults Results

TransactTransact--SQLSQL Transact-SQL

Client

SQL Server

Relational Database Management System

Results Transact Transact - - SQL SQL Transact-SQL Client SQL Server Relational Database Management System
Results Transact Transact - - SQL SQL Transact-SQL Client SQL Server Relational Database Management System
Results Transact Transact - - SQL SQL Transact-SQL Client SQL Server Relational Database Management System

Integrating SQL Server with Operating Systems

Windows 2000 Windows NT Windows Me, 98, and 95 Third Party Browsers Internet Internet Client
Windows 2000
Windows NT
Windows Me,
98, and 95
Third Party
Browsers
Internet Internet
Client
Server
Windows 2000
Windows NT
Windows Me
Windows 98
Windows CE

SQL Server Platforms

SQL Server Platforms

SQL Server Integration with Microsoft BackOffice

InternetInternet Microsoft Windows NT Server SQL Server Microsoft Microsoft Systems Management Server Exchange
InternetInternet
Microsoft Windows NT Server
SQL Server
Microsoft
Microsoft Systems
Management Server
Exchange
Server
IBM Host
Microsoft
SNA Server
Data and
Applications

SQL Server Integration with Microsoft BackOffice

SQL Server Integration with Microsoft BackOffice

SQL Server Services

MSSQLServer

Data Management

Transaction and Query Processing

Data Integrity

SQLServerAgent

Jobs

Alerts

Operators

Microsoft Distributed Transaction Coordinator

Distributed Transactions Management

Microsoft Search

Full-Text Catalogs

Full-Text Indexes

Server

 Distributed Transactions Management Microsoft Search  Full-Text Catalogs  Full-Text Indexes Server

SQL Server Software

SQL Server Enterprise Manager Snap-in for Microsoft Management Console

SQL Server Administration Tools and Wizards

SQL Server Command Prompt Management Tools

SQL Server Help and SQL Server Books Online

Microsoft SQL Server OLAP Services

Microsoft English Query Support

SQL Server Enterprise Manager

SQL Server provides an administrative client, SQL Server Enterprise Manager, which is a Microsoft Management Console (MMC) snap-in.

MMC is a shared user interface for BackOffice server management. This shared console provides a convenient and consistent environment for administration tools.

SQL Server Administration Tools and Wizards

Graphical Tool

Purpose

SQL Server Client Configuration

Utility used to manage the client configuration for communication components

SQL Server Performance Monitor

File used to integrate SQL Server with Windows NT Performance Monitor, providing the latest activity and performance statistics

SQL Server Query Analyzer

Graphical query tool used to analyze the plan of a query, view statistics information, and manage multiple queries in different windows Simultaneously

SQL Server Profiler

Utility used to capture a continuous record of server activity and provide auditing capability

SQL Server Command Prompt Management Tools

SQL Server command prompt management tools allow enter Transact-SQL statements and execute script files.

Utility

Descpiption

osql

Utility that uses Open Database Connectivity (ODBC) to communicate with SQL Server— primarily used to execute batch files containing one or more SQL statements

bcp

Batch utility used to import and export data to and from SQL Server— copies data to or from a data file in a user-specified format

SQL Server Help and SQL Server Books Online

SQL Server offers different types of Help to assist you. The following table describes each type of Help that SQL Server provides.

SQL Server documentation set - SQL Server Books Online (BOL) provides online access to SQL Server documentation.

Microsoft SQL Server OLAP Services

Microsoft SQL Server OLAP Services allows summary data to be stored in a variety of formats and locations, including SQL Server and Oracle databases.

Storing summary data increases query performance and reduces the load on the data warehouse. Summary data is often generated to satisfy the commonly executed queries in the data warehouse.

Microsoft English Query Support

Using the Microsoft English Query environment, developers can turn their relational databases into English Query applications.

This environment allows end users to pose questions in English instead of writing complex Transact-SQL statements.

For example, users can simply ask the question,

What are the total sales for Region 5?

SQL Server Architecture

Communication

Application Development

Administration

Communication

Client

Server

Application Application

Database Database Interface Interface

SQL SQL Server Server

Open Open Data Data Services Services

Network Network Library Library

Network Network Library Library

TabularTabular DataData StreamStream
TabularTabular DataData StreamStream
Services Network Network Library Library Network Network Library Library TabularTabular DataData StreamStream
Services Network Network Library Library Network Network Library Library TabularTabular DataData StreamStream

Application Development

ADO

RDO

ADO RDO OLE DB ODBC Other Other Data Data Relational Relational Sources Sources Databases Databases
ADO RDO OLE DB ODBC Other Other Data Data Relational Relational Sources Sources Databases Databases

OLE DB

ODBC

Other Other Data Data Relational Relational Sources Sources Databases Databases
Other Other Data Data
Relational Relational
Sources Sources
Databases Databases
ADO RDO OLE DB ODBC Other Other Data Data Relational Relational Sources Sources Databases Databases

Types of Databases

mastermaster

System Databases

modelmodel
modelmodel
tempdbtempdb
tempdbtempdb
msdbmsdb
msdbmsdb
master System Databases modelmodel tempdbtempdb msdbmsdb pubspubs northwindnorthwind user1user1 User Databases
master System Databases modelmodel tempdbtempdb msdbmsdb pubspubs northwindnorthwind user1user1 User Databases
master System Databases modelmodel tempdbtempdb msdbmsdb pubspubs northwindnorthwind user1user1 User Databases
master System Databases modelmodel tempdbtempdb msdbmsdb pubspubs northwindnorthwind user1user1 User Databases
pubspubs
pubspubs
northwindnorthwind
northwindnorthwind
user1user1
user1user1

User Databases

distributiondistribution

msdbmsdb pubspubs northwindnorthwind user1user1 User Databases distribution distribution
msdbmsdb pubspubs northwindnorthwind user1user1 User Databases distribution distribution
msdbmsdb pubspubs northwindnorthwind user1user1 User Databases distribution distribution

System Databases

master Controls the user databases and operation of SQL Server as a whole by keeping track of such information as user accounts, configurable environment variables, and system error messages.

model Provides a template or prototype for new user databases

tempdb Provides a storage area for temporary tables and other temporary working storage needs

msdb Supports SQL Server Agent and provides a storage area for scheduling information and job history

Database Objects

ClusteredClustered IndexIndex Anderson Anderson Barr FKFK EmpNumEmpNum LastNameLastName FirstNameFirstName
ClusteredClustered IndexIndex
Anderson
Anderson
Barr
FKFK
EmpNumEmpNum
LastNameLastName
FirstNameFirstName
CtryCodeCtryCode
ExtensionExtension
LastModLastMod
integer
longstring
varchar(20)
char(2)
char(6)
longstring
10191
Labrie
Angela
FR
x19891
\HR\KarlD
10192
Labrie
Eva
FR
x19433
\HR\KarlD
10202
Martin
Jose
SP
x21467
\HR\AmyL
FROM employee
x#####

Referring to SQL Server Objects

Fully Qualified Names server.database.owner.object

Partially Specified Names

Server defaults to local server

Database defaults to current database

Owner defaults to the user name in the database

defaults to local server  Database defaults to current database  Owner defaults to the user

Fully Qualified Names

The complete name of a SQL Server object includes four identifiers: the server name, database name, owner name, and object name in the following format:

server.database.owner.object

An object name that specifies all four parts is known as a fully qualified name. Each object created in SQL Server must have a unique, fully qualified name.

For example, you can have two tables named orders in the same database as long as they belong to different owners. Also, column names must be unique within a table or view.

Partially Specified Names

When referencing an object, do not always have to specify the server, database, and owner. Intermediate identifiers can be omitted as long as their position is indicated by periods. The valid formats of object names are as follows:

server.database.owner.object server.database object server owner.object server object database.owner.object database object owner.object object

System Tables

Store Information (Metadata) About the System and Database Objects

Database Catalog Stores Metadata About a Specific Database

System Catalog Stores Metadata About the Entire System and All Other Databases

Metadata Retrieval

System Stored Procedures

 System Stored Procedures  System Functions  Information Schema Views

System Functions

 System Stored Procedures  System Functions  Information Schema Views

Information Schema Views

 System Stored Procedures  System Functions  Information Schema Views

Designing an Application for SQL Server

Designing an Application for SQL Server Intelligent Intelligent Server Server (2 (2 - - Tier) Tier)

IntelligentIntelligent

ServerServer (2(2--Tier)Tier)

Intelligent Server Server (2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 -
Intelligent Server Server (2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 -

IntelligentIntelligent

ClientClient (2(2--Tier)Tier)

(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)
(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)
(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)
(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)

NN--TierTier

(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)
(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)
(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)

InternetInternet

(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)
(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)
(2 (2 - - Tier) Tier) Intelligent Intelligent Client Client (2 (2 - - Tier) Tier)

Implementing a SQL Server Database

Designing the Database

Creating the Database and Database Objects

Testing and Tuning the Application and Database

Planning Deployment

Administering the Application After Deployment

Administering a SQL Server Database

Installing SQL Server

Establish network security

Configure SQL Server

Building Databases

Managing Ongoing Activities

Import and export data

Back up and restore the database and log

Monitor and tune the database

Check Your Understanding.

Check Your Understanding.

Q.1. What is SQL Server ? How many versions Microsoft has released and what is the code name for SQL 7.0.

Q.2. Name the Supported Platforms available on which Server components can run.

Q.3. What is Back – Office ?

Name the Server Components available having support with SQL Server.

Q.4. What is SQL Server Enterprise manager.?

Q.5. What is SQL Server Query Analyzer.?

Q.6. Name the Command prompt management tools supported by SQL Server.?

Q.7. What is the Name given by Microsoft for the Microsoft Documentation Set.?

Q.8. What is Microsoft English Query.?

Q.9. What are the Type of Databases available in SQL Server.?

Q.10. Name the System Databases available in SQL Server.? and What is the Function of each database.

Q.11. What is the purpose of User Databases available with SQL Server by default.

Q.12. What is Metadata.?

Q.13. What is the Difference between Database Catalog and System catalog.?

Q.14. What is the Full Form of the Following.?

1- TDS

8- SQL

2- DTC

9- OLAP

3- ADO

10- RDO

4- OLE DB

11- ODBC

5- API

12- ASP

6- UDA

13- MMC

7- SNA

14. SMS

Q.15. What are Fully Qualified and Partially Specified Domain name ?.

Q.16. What is the Code Name of Microsoft SQL Server 7.0 and what it meant for.?

Q.17. Who has worked with the first Hand Maintained Database and when?

Thank You.

Thank You.

Thank You.