1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu System Administration for Microsoft® SQL Server™ 7.0 doc

472 636 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề System Administration for Microsoft SQL Server 7.0
Tác giả Lori Oviatt, Margo Crandall, Homer Christensen, Xandria Eykel, Cheryl Hoople, Marilyn McGill, Karal Dehmer, Dan Basica, Adam Shapiro, Stacey Dickinson, Carl Rabeler, Kimberly Jackson, Tina Tsiakalis, Wendy Cleary, Nikki McCormick, Arlo Emerson, Tammy Stockton, Kathy Ford, Bo Galford, Rick Terek, Elaine Stovall, Heidi Tucker, Robert Stewart
Người hướng dẫn Wendy Cleary
Trường học Microsoft Corporation
Chuyên ngành System Administration
Thể loại Workbook
Năm xuất bản 1998
Thành phố Redmond
Định dạng
Số trang 472
Dung lượng 1,74 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Course Outline ?Module 1: SQL Server Overview ?Module 2: Installing and Configuring SQL Server ?Module 3: Managing Security ?Module 4: Managing Database Files ?Module 5: Backing Up Datab

Trang 2

Information in this document is subject to change without notice The names of companies, products, people, characters, and/or data mentioned herein are fictitious and are in no way intended

to represent any real individual, company, product, or event, unless otherwise noted Complying with all applicable copyright laws is the responsibility of the user No part of this document may

be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation If, however, your only means of access is electronic, permission to print one copy is hereby granted

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property

? ? 1998 Microsoft Corporation All rights reserved

Microsoft, ActiveX, BackOffice, MS-DOS, Outlook, PowerPoint, Visual Basic, Visual C++, Visual Studio, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A and/or other countries

The names of companies, products, people, characters, and/or data mentioned herein are fictitious and are in no way intended to represent any real individual, company, product, or event, unless otherwise noted

Other product and company names mentioned herein may be the trademarks of their respective owners

Project Leads: Lori Oviatt, Margo Crandall Instructional Designers:Homer Christensen (Working Knowledge), Xandria Eykel (S&T OnSite), Cheryl Hoople (Write Stuff), Marilyn McGill

Lead Program Manager: Karal Dehmer Program Managers: Dan Basica, Adam Shapiro, Stacey Dickinson (Solutions View),

Carl Rabeler (Shadow Mountain Computers)

Graphic Artist: Kimberly Jackson Editing Manager: Tina Tsiakalis Editor: Wendy Cleary (S&T OnSite) Online Program Manager: Nikki McCormick Online Support: Arlo Emerson (MacTemps), Tammy Stockton (Write Stuff) Compact Disc Testing: ST Labs

Production Support: Kathy Ford (S&T OnSite) Manaufacturing Manager: Bo Galford Manufacturing Support: Rick Terek (S&T OnSite) Lead Product Manager, Development Services: Elaine Stovall Lead Product Manager: Heidi Tucker

Group Product Manager: Robert Stewart

Course Number: 832B Part Number: X03-91260 Released: 12/98

Trang 3

Contents

Introduction

Introductions 3

Course Materials 4

Prerequisites 5

Course Outline 6

Microsoft Certified Professional Program 8

Facilities 10

Module 1: SQL Server Overview Overview 13

What Is SQL Server 14

SQL Server Platforms 16

SQL Server Integration with Windows NT 17

SQL Server Integration with Microsoft BackOffice 18

SQL Server Services 19

SQL Server Software 20

SQL Server Architecture 22

Communication 23

Application Development 24

Administration 26

SQL Server Security 28

Login Authentication 29

Database User Accounts and Roles 30

Permission Validation 32

SQL Server Databases 33

Types of Databases 34

Database Objects 35

Referring to SQL Server Objects 36

System Tables 38

Metadata Retrieval 39

Working with SQL Server 41

Designing an Application for SQL Server 42

Implementing a SQL Server Database 44

Administering a SQL Server Database 45

Lab 1.1: SQL Server Overview 46

Review 47

Module 2: Installing and Configuring SQL Server Overview 51

Minimum Hardware and Software Requirements 52

SQL Server 7.0 Editions 53

SQL Server Installation Options 54

Licensing Mode 55

Installation Path 56

Character Set 57

Sort Order 59

Unicode Collation 61

Network Support 62

Trang 4

SQL Server Services Logon Account 64

Running SQL Server Setup 66

Unattended Installation 68

Verifying the Installation 70

Reviewing Installation Results 71

Starting SQL Server Services 72

Connecting to SQL Server 74

Preparing to Use SQL Server 75

Configuring SQL Server Enterprise Manager 76

Configuring SQL Server 78

Troubleshooting 79

Recommended Practices 81

Lab 2.1: Installing and Configuring SQL Server 82

Review 83

Module 3: Managing Security Overview 87

Implementing an Authentication Mode 88

Authentication Processing 89

Choosing an Authentication Mode 91

Steps in Implementing an Authentication Mode 92

Creating Login Accounts 93

Demonstration: Setting Up Login Accounts 95

Lab 3.1: Managing Security 96

Assigning Login Accounts to Users and Roles 97

Assigning Login Accounts to User Accounts 98

Assigning Login Accounts to Roles 100

Fixed Server Roles 101

Fixed Database Roles 102

User-defined Database Roles 104

Assigning Permissions to Users and Roles 106

Types of Permissions 107

Granting, Denying, and Revoking Permissions 109

Granting Permissions to Allow Access 110

Denying Permissions to Prevent Access 112

Revoking Granted and Denied Permissions 114

Planning Security 116

Demonstration: Assigning Login Accounts to User Accounts and Roles 118

Lab 3.2: Managing Permissions 119

Managing Application Security 120

Managing Security with Views and Stored Procedures 121

Managing Client Application Security with Application Roles 123

Creating Application Roles 124

Activating Application Roles 125

Recommended Practices 127

Lab 3.3: Managing Application Security 128

Review 129

Trang 5

Module 4: Managing Database Files

Overview 133

Introduction to Databases 134

How Data Is Stored 135

Multimedia Presentation: Transactions 136

How the Transaction Log Works 137

Creating Databases 138

Setting Database Options 140

Modifying Databases 142

Managing Data and Log File Growth 143

Expanding a Transaction Log 145

Shrinking a Database or File 147

Dropping a Database 149

Managing Databases on Multiple Disks 151

Leveraging the Windows NT Server Fault Tolerance 152

Creating Filegroups 154

Capacity Planning 156

Determining the Size of model Database and System Tables 157

Estimating the Amount of Data in Tables 158

Performance Considerations 159

Recommended Practices 160

Lab 4.1: Managing Database Files 161

Review 162

Module 5: Backing Up Databases Overview 167

Preventing Data Loss 168

SQL Server Backup 170

Performing and Storing Backups 171

When to Back Up Databases 172

Backing Up System Databases 173

Backing Up User Databases 175

Activities That Are Restricted During Backup 177

Performing Backups 178

Creating Permanent Backup Files 179

Creating Temporary Backup Files 181

Using Multiple Backup Files to Store Backups 183

Using the BACKUP Statement 185

Backing Up to a Tape Device 187

Specifying Tape Options 188

Types of Backup Methods 190

Performing a Full Database Backup 191

Performing a Differential Backup 193

Performing a Transaction Log Backup 195

Using the NO_TRUNCATE Option 196

Clearing the Transaction Log 197

Performing a Database File or Filegroup Backup 199

Trang 6

Restrictions on Backing Up Database Files or Filegroups 201

Demonstration: Using SQL Server Enterprise Manager to Perform Backups 202

Planning a Backup Strategy 203

Full Database Backup Strategy 204

Full Database and Transaction Log Backup Strategy 207

Differential Backup Strategy 209

Database File or Filegroup Backup Strategy 211

Performance Considerations 213

Recommended Practices 214

Lab 5.1: Backing Up Databases 215

Review 216

Module 6: Restoring Databases Overview 221

SQL Server Recovery Process 222

SQL Server Activities During the Restore Process 223

Preparing to Restore a Database 225

Verifying Backups 226

Performing Specific Tasks Before Restoring Backups 228

Restoring Backups 229

Using the RESTORE Statement 230

Initiating the Recovery Process 231

Specifying Restore Options 232

Restoring Databases from Different Backup Types 233

Restoring from a Full Database Backup 234

Restoring from a Differential Backup 236

Restoring a Transaction Log Backup 237

Specifying a Point in Time 239

Restoring from a File or Filegroup Backup 241

Using a Standby SQL Server 243

Setting Up a Standby SQL Server 244

Using the Standby SQL Server as a Read-Only Server 246

Using the STANDBY Option 248

Replacing a Production Server with a Standby SQL Server 250

Restoring Damaged System Databases 252

Recommended Practices 254

Lab 6.1: Restoring Databases 255

Review 256

Module 7: Automating Administrative Tasks Overview 261

Reasons to Automate 262

Introduction to SQL Server Automation 263

Multimedia Presentation: Automating SQL Server Administration 264

Writing Events to the Application Log 265

Preparing to Automate 266

Configuring Mail 268

Automating Routine Maintenance Tasks 270

Creating Jobs 271

Trang 7

Verifying Permissions 272

Defining Job Steps 274

Determining Action Flow Logic for Each Job Step 276

Scheduling Jobs 277

Creating Operators to Notify 278

Reviewing and Configuring Job History 280

Lab 7.1: Creating Jobs and Operators 282

Creating Alerts 283

Using Alerts to Respond to Potential Problems 284

Creating Alerts to Respond to SQL Server Errors 285

Creating Alerts on a User-defined Error 287

Responding to Performance Condition Alerts 289

Assigning a Fail-Safe Operator 290

Troubleshooting SQL Server Automation 291

Troubleshooting Alerts 293

Lab 7.2: Creating Alerts 295

Automating Multiserver Jobs 296

Defining Multiserver Jobs 298

Demonstration: Creating a Master Job 299

Publishing SQL Server Data on the Web 300

Creating a Web Page 301

Formatting the Web Page 303

Generating the Web Page 304

Managing Web Assistant Jobs 306

Recommended Practices 308

Lab 7.3: Publishing SQL Server Data on the Web 309

Review 310

Module 8: Transferring Data Overview 305

Introduction to Importing and Exporting Data 306

Why to Import and Export Data 307

Why to Transform Data 308

Tools for Importing and Exporting Data in SQL Server 310

Introduction to Data Transformation Services 312

DTS Overview 313

DTS Process 314

DTS Tools 315

Transforming Data with DTS 317

Creating a DTS Package 318

Transforming and Mapping Data 320

Defining Transformation Tasks 322

Defining Workflows 323

Defining Data Lineage 325

Executing and Scheduling a DTS Package 326

Demonstration: Defining a DTS Package 327

Recommended Practices 328

Lab 8.1: Transferring Data 329

Review 330

Trang 8

Module 9: Monitoring and Maintaining SQL Server

Overview 335

Why Monitor SQL Server 336

Reasons to Monitor SQL Server 337

Factors That Affect Performance 338

Detecting Performance Bottlenecks 340

Tools for Monitoring SQL Server 342

Common Monitoring Tasks 343

Using the Microsoft Event Viewer 345

Using SQL Server Performance Monitor 346

Using Current Activity in SQL Server Enterprise Manager 349

Using Transact-SQL to Monitor SQL Server 351

Using SQL Server Profiler 354

Generating a Query History 356

Demonstration: Using SQL Server Profiler 358

Using SQL Server Query Analyzer 359

Creating a Maintenance Plan for SQL Server 360

Developing a Database Maintenance Plan 361

Automating the Database Maintenance Plan Tasks 363

Recommended Practices 365

Lab 9.1: Monitoring SQL Server 366

Review 367

Module 10: Introducing Replication Overview 367

Introduction to Distributed Data 368

The Need for Distributed Data 369

Considerations for Distributing Data 370

Methods to Distribute Data 371

Introduction to SQL Server Replication 373

The Publisher-Subscriber Metaphor 374

Publications and Articles 375

Filtering Data 376

Subscriptions 377

SQL Server Replication Agents 378

SQL Server Replication Types 379

Overview of the Replication Types 380

Multimedia Presentation: SQL Server Replication 382

Considerations for Using Merge Replication 383

Physical Replication Models 385

Overview of the Replication Models 386

Combining Replication Models and Types 387

Central Publisher/Remote Distributor Example 388

Central Subscriber/Multiple Publishers Example 389

Multiple Publishers/Multiple Subscribers Example 390

Recommended Practices 391

Review 392

Trang 9

Module 11: Planning and Setting Up Replication

Overview 395

Planning Replication 396

Design Considerations 397

Determining a Replication Solution 399

Data Definition Issues 400

Configuring Network Security Access 402

Preparing the Servers 403

Setting Up a Distributor 404

Configuring a Distributor 406

Setting Up a Publisher 408

Setting Up a Subscriber 409

Publishing 410

Creating Publications 411

Publishing Considerations 413

Initial Synchronization 414

Subscribing 416

Setting Up Push and Pull Subscriptions 417

Using the Immediate Updating Subscribers Option 418

Performance Considerations 420

Recommended Practices 421

Demonstration: Implementing Replication 422

Lab 11.1: Implementing Replication 423

Review 424

Module 12: Managing Replication Overview 431

Monitoring and Troubleshooting Replication 432

Using SQL Server Replication Monitor 433

Maintaining Replication 434

Using Replication Scripts 436

Monitoring SQL Server Replication Performance 437

Viewing Replication Agent Histories 439

Troubleshooting Replication 440

Replicating in Heterogeneous Environments 442

Replicating Data with ODBC 443

Publishing Data to Heterogeneous Subscribers 444

Replicating from Heterogeneous Databases 445

Publishing on the Internet 446

Recommended Practices 447

Lab 12.1: Maintaining Replication 448

Review 449

Appendix A: Database Schemas

Trang 10

THIS PAGE INTENTIONALLY LEFT BLANK

Trang 11

Introduction

Trang 12

This page left intentionally blank

Trang 13

establish credibility, meet

students, and set student

expectations for the course

Lead-in

Good morning Welcome to

System Administration for

Ask students to introduce

themselves, addressing the

bulleted items on the slide

Delivery Tip

As students introduce

themselves, use a white

board or flip chart to

record their expectations

of the course

Trang 14

The following materials are included with your kit:

?? Name card Write your name on both sides of the name card

?? Student workbook The student workbook contains the material covered

in the course

?? Lab manual The lab manual contains the hands-on lab exercises used

during class

?? Student Materials compact disc The Student Materials compact disc

contains the Web page that provides students with links to resources pertaining to this course, including additional readings, review and lab answers, lab files, multimedia presentations, and course-related Web sites

To open the Student Materials Web page, insert the Student Materials compact disc into the CD-ROM drive, and then in the root directory of the compact disc, double-click Default.htm

?? Course evaluation At the conclusion of this course, please complete the

course evaluation to provide feedback on the instructor, course, and software product Your comments will help us improve future courses

To provide additional comments on course materials, send e-mail to

mstrain@microsoft.com Be sure to type Course 832Bin the subject line

To provide additional comments or inquire about the Microsoft Certified Professional program, send e-mail to mcp@msprograms.com.

everything you need for

this course You will find

the following materials at

your desk

Describe the contents of

the student workbook and

the Student Materials

compact disc

Have students write their

names on both sides of the

name card

Tell students that a

course evaluation must

be completed at the end

of the course

Tell students where they

can send comments

Delivery Tip

Demonstrate how to

open the Student Materials

Web page provided on

the Student Materials

compact disc

Note

Trang 15

Prerequisites

?The Supporting Microsoft Windows NT Server 4.0

Course or Equivalent Knowledge

?An Understanding of Basic Relational Database Concepts

?Knowledge of Basic Transact-SQL Syntax (SELECT, UPDATE, and INSERT Statements)

?Familiarity with the Role of the Database Administrator

To complete this course successfully, you must have the following background:

?? Course 922, Supporting Microsoft Windows NT 4.0 Core Technologies, or

equivalent knowledge Equivalent knowledge includes the ability to:

?? Share and access network resources

?? Configure Microsoft® Windows NT® disk mirroring and striping with parity

?? Describe the difference between a domain and a workgroup (this is important in order to understand how security is administered)

?? Change network and international settings (default language and default date) with the Control Panel

?? View and interpret data from the Windows NT application log

?? View and interpret data from Windows NT Performance Monitor

?? Use the User Manager for Domains to set up Windows NT user accounts

?? Edit the registry

?? An understanding of basic relational database concepts, including:

?? Logical and physical database design

?? Data integrity

?? Relationships between tables and columns (primary and foreign keys, one-to-one, one-to-many, many-to-many)

?? How data is stored in tables (rows and columns)

?? Knowledge of basic Transact-SQL syntax (SELECT, UPDATE, and INSERT statements)

?? Familiarity with the role of the database administrator

Slide Objective

To explain the prerequisites

for this course

Lead-in

The following prerequisite

knowledge is needed for

this course

Trang 16

Course Outline

?Module 1: SQL Server Overview

?Module 2: Installing and Configuring SQL Server

?Module 3: Managing Security

?Module 4: Managing Database Files

?Module 5: Backing Up Databases

?Module 6: Restoring Databases

Module 1, “SQL Server Overview,” provides a high-level overview of Microsoft SQL Server™ version 7.0 platforms, architecture, and components At the end of this module, you will be able to describe the elements of SQL Server and the environments in which it can operate

Module 2, “Installing and Configuring SQL Server,” reviews the hardware and software requirements of SQL Server and the installation options At the end of this module, you will be able to run SQL Server Setup, verify the installation, and configure SQL Server

Module 3, “Managing Security,” introduces you to the subject of security It describes how to set up an authentication mode for a server and how to assign logins and permissions to users and roles At the end of this module, you will be able to describe how to plan security, manage security with views and stored procedures, and use application roles to manage application security

Module 4, “Managing Database Files,” discusses creating, dropping, and modifying databases It also discusses transaction logs and how to create database objects, such as user-defined data types, tables, and columns At the end of this module, you will be able to create and manage files, filegroups, databases, tables, and transaction logs

Module 5, “Backing Up Databases,” provides you with the fundamentals of backing up databases, performing different SQL Server backup methods, and determining a backup strategy At the end of this module, you will be able to create backup files and perform full database, differential, transaction log, and database file or filegroup backups

Module 6, “Restoring Databases,” discusses how to restore databases, transaction logs, files or filegroups, and damaged system databases At the end

of this module, you will be able to restore databases, transaction logs, and files

or filegroups, as well as recover data from a media failure

Slide Objective

To provide an overview of

each module and what

students will learn

As you describe each

module, acknowledge any

information that will meet

the student expectations

that you recorded earlier

Trang 17

Course Outline (continued)

?Module 7: Automating Administrative Tasks

?Module 8: Transferring Data

?Module 9: Monitoring and Maintaining SQL Server

?Module 10: Introducing Replication

?Module 11: Planning and Setting Up Replication

?Module 12: Managing Replication

Module 7, “Automating Administrative Tasks,” discusses how to automate administrative tasks using SQL Server Agent At the end of this module, you will be able to use e-mail to notify operators and create jobs

Module 8, “Transferring Data,” describes the process of transferring data into and out of SQL Server At the end of this module, you will be able to use Data Transformation Services (DTS) to import, export, and transform schema and data and to transfer SQL Server databases

Module 9, “Monitoring and Maintaining SQL Server” discusses methods used

to monitor and maintain SQL Server activity to determine performance issues

At the end of this module, you will be able to use various SQL Server monitoring tools, analyze queries, and examine server activity

Module 10, “Introducing Replication,” describes how SQL Server replication distributes data, the various types of replication, and models for implementing replication At the end of this module, you will be able to describe the basic concepts of replication and how to implement it in various business environments

Module 11, “Planning and Setting Up Replication,” describes the steps and choices in planning and configuring replication At the end of this module, you will be able to implement replication

Module 12, “Managing Replication,” describes how to monitor and troubleshoot replication using various SQL Server tools, how to generate replication scripts to facilitate recovery, and how to replicate in heterogeneous environments At the end of this module, you will be able to monitor and troubleshoot replication, replicate to heterogeneous databases, and publish on the Internet

Trang 18

Microsoft Certified Professional Program

MCSD 2 Core Exams 2 Core Exams 1 Elective Exam 1 Elective Exam

MCP + Site Building 2 Core Exams 2 Core Exams MCP + Internet

MCP + Internet 3 Core Exams 3 Core Exams

MCP

MCP 1 Core Exam 1 Core Exam

MCT

MCT Instructional Skills Course Preparedness

Technical Skill Qualification

Instructional Skills Course Preparedness Technical Skill Qualification

The Microsoft Certified Professional program provides the best method to prove your command of current Microsoft products and technologies The following table describes each certification in more detail

Microsoft Certified Systems

Engineer

(MCSE)

MCSEs are qualified to effectively plan, implement, maintain, and support information systems in a wide range of computing environments with Windows NT Server and Microsoft BackOffice®

Microsoft Certified Solution

Developer

(MCSD)

MCSDs are qualified to build Web-based, distributed, and commerce applications by u sing Microsoft products such as Microsoft SQL Server, Microsoft Visual Studio® and Microsoft Transaction Server

Microsoft Certified Professional

Microsoft Certified Professional

Slide Objective

To provide students with

information about the

Trang 19

Certification Requirements

The certification requirements differ for each certification category and are specific to the products and job functions addressed by the certification To become a Microsoft Certified Professional, you must pass rigorous certification exams that provide a valid and reliable measure of technical proficiency and expertise

The following table describes exam requirements

Certification Exam requirements MCSE + Internet Pass seven core exams and two elective exams

MCSE Pass four operating system exams and two elective exams

MCSD Pass three core technology exams and one elective exam

MCP + Site Building Pass two core technology exams

MCP + Internet Pass three core exams

MCP Pass one exam (except Networking Essentials)

MCT Required to meet instructional and technical requirements

specific to each Microsoft Official Curriculum course they are certified to deliver.1

See the “Certification” section of the Web page provided

on the compact disc or the Microsoft Training and Certification Web site at http://www.microsoft.com/mcp/

You can also send e-mail to mcp@msprograms.com if you have specific certification questions

Exam Preparation Guides

To help prepare for the MCP exams, you can use the preparation guides that are available for each exam Each Exam Preparation Guide contains exam-specific information, such as a list of the topics on which you will be tested and information about credit toward certification These guides are available on the Training and Certification Web site, located at the following address:

http://www.microsoft.com/mcp/

Microsoft Official Curriculum (MOC) helps you to prepare for Microsoft Certified Professional (MCP) exams However, no one-to-one correlation exists between MOC courses and MCP exams

1

Inside the United States and Canada call (800) 636-7544 for more information on becoming a Microsoft Certified Trainer Outside the United States and Canada, contact your local Microsoft subsidiary.

For More Information

Important

Trang 20

class logistics and rules

for the training site

Lead-in

Before we start, let’s go

over the class logistics

Explain the class hours,

extended building hours

for labs, parking, rest room

location, meals, phones,

message posting, and

where smoking is or

isn’t allowed

Also make sure that the

students are aware of the

recycling program if one

is available

Trang 21

Module 1: SQL Server Overview

Trang 22

This page is blank

Trang 23

At the end of this module, you will be able to:

?? Describe Microsoft® SQL Server™ version 7.0 and its supported operating system platforms

?? Describe SQL Server architecture

?? Describe SQL Server security

?? Describe SQL Server databases

?? Describe SQL Server application design options, as well as SQL Server implementation and administration activities

Trang 24

? What Is SQL Server

Relational Database Management System SQL Server

Transact-SQL

Transact-SQL

Transact-SQL Application

on the server computer with SQL Server

?? SQL Server manages databases and allocates the available server resources—such as memory, network bandwidth, and disk operations—among multiple requests

Client/server architecture allows you to design and deploy applications to enhance a variety of environments Client programming interfaces provide the means for applications to run on separate client computers and communicate to the server over a network

In this course, the term client by itself refers to a client application

Relational Database Management System

The RDBMS is responsible for:?

?? Maintaining the relationships between data in the database

?? Ensuring that data is stored correctly—that the rules defining the relationships between data are not violated

?? Recovering all data to a point of known consistency in the event of a system failure

Structured Query Language,

to send requests between

the client and SQL Server

Point out that

SQL Server follows the

mainframe definition

Trang 25

Transact-SQL

SQL Server uses Transact-SQL, a version of Structured Query Language (SQL), as its database query and programming language SQL is a set of commands that allows you to specify the information that you want to retrieve

or modify With Transact-SQL, you can access data and query, update, and manage relational database systems

The American National Standards Institute (ANSI) and the International Standards Organization (ISO) have defined standards for SQL Transact-SQL supports the latest ANSI SQL standard published in 1992, called ANSI SQL-92, plus many extensions to provide increased functionality

Trang 26

SQL Server Platforms

Internet

Client Server

MS-DOS

Windows 3.x Windows NT Windows 95/98 Third Party Browsers

The client and server components of SQL Server run on the operating systems shown in the following table

Microsoft Windows 95/98 Yes Yes Microsoft Windows NT

Workstation, version 4.0 or later

Apple Macintosh

SQL Server 7.0 contains fixes for the known Year 2000 issue For the most current year 2000 compliance information on SQL Server 7.0, please visit the htttp://www.microsoft.com/year2000 website

Trang 27

SQL Server Integration with Windows NT

?Security

?Multiprocessor Support

?Microsoft Event Viewer

?Windows NT Services

?Windows NT Performance Monitor

?Microsoft Cluster Server

SQL Server is fully integrated with Microsoft Windows NT® and takes advantage of many of its features

SQL Server is integrated with the security system in Windows NT This integration allows a single user name and password for access to both SQL Server and Windows NT SQL Server also uses encryption features in Windows NT for network security SQL Server provides its own security for non-Microsoft clients

SQL Server supports the symmetric multiprocessing (SMP) capabilities of Windows NT SQL Server automatically takes advantage

of any additional processors that are added to the server computer

SQL Server writes messages to the Windows NT application, security, and system event logs, providing a consistent mechanism for viewing and tracking problems

SQL Server runs as a service on Windows NT, allowing you to start and stop SQL Server remotely

SQL Server sends performance metrics to the Windows NT Performance Monitor, enabling you to monitor the system performance of SQL Server

Microsoft Cluster Server, a component of Windows NT Enterprise Edition, supports the connection of two servers, or nodes, into a cluster for higher availability and better manageability of data and applications SQL Server works in conjunction with Cluster Server to switch automatically to the secondary node if the primary node fails

Microsoft Cluster Server

Trang 28

SQL Server Integration with Microsoft BackOffice

IBM Host

Internet

Microsoft SNA Server Data and Applications

Microsoft Systems Management Server

Microsoft Exchange Server

SQL Server

SQL Server integrates well with Microsoft BackOffice® products BackOffice is

a group of server applications that work together to help you build business solutions The following table describes some commonly used BackOffice applications that work with or use SQL Server

BackOffice application Description

Windows NT Server Allows SQL Server to communicate with

Internet clients

Microsoft Exchange Server Allows SQL Server to send e-mail messages

using Microsoft Exchange Server or other Messaging Application Programming Interface (MAPI)-compliant providers

SQL Server can send messages when an error occurs or a scheduled task (such as a database backup) succeeds or fails It also can respond to queries embedded in messages

Microsoft SNA Server Links IBM environments running the Systems

Network Architecture (SNA) protocol with PC-based networks

You can integrate SQL Server with IBM mainframe

or AS/400 applications and data using SNA Server Microsoft Systems

Management Server

Manages computer software, hardware, and inventory and uses SQL Server to store its databases

Slide Objective

To show how SQL Server

works with Microsoft

Trang 29

SQL Server Services

Microsoft Distributed Transaction Coordinator

?? Allocates computer resources among multiple concurrent users

?? Prevents logical problems, such as timing requests from users who want to update the same data at the same time

?? Ensures data consistency and integrity

SQLServerAgent Service

SQL Server Agent is a service that works in conjunction with SQL Server to create and manage local or multiserver jobs, alerts, and operators

Microsoft Distributed Transaction Coordinator Service

MS DTC service allows clients to include several different sources of data in one transaction MS DTC coordinates the proper completion of distributed transactions to ensure that all updates on all servers are permanent—or, in the case of errors, that all modifications are cancelled

Microsoft Search Service

The Microsoft Search service is a full-text engine that runs as a Windows NT service Full-text support involves the ability to issue queries against

character data and the creation and maintenance of the indexes that facilitate these queries

Slide Objective

To introduce the server

software for SQL Server

Trang 30

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 includes a variety of software for administering and managing the server, finding help on specific topics, designing and creating databases, and querying data

SQL Server Enterprise Manager Snap-in for Microsoft Management Console

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

SQL Server provides a number of administrative tools and wizards that assist with particular aspects of SQL Server The following table describes SQL Server tools and wizards

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 Profiler Utility used to capture a continuous record of

server activity and provide auditing capability 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

Slide Objective

To introduce the client

software for SQL Server

Lead-in

SQL Server includes a

variety of software for

administering and managing

the server, finding help on

specific topics, designing

and creating databases, and

Query Analyzer, and

the osql utility

Trang 31

(continued)

SQL Server Service Manager Graphical utility used for starting, stopping,

and pausing SQL Server services SQL Server Setup Application used to install and configure

SQL Server SQL Server wizards Collection of tools that guide users through

complex tasks

SQL Server Command Prompt Management Tools

SQL Server command prompt management tools allow you to enter Transact-SQL statements and execute script files The following table describes the most frequently used command prompt utilities that are provided with SQL Server Each file is an executable program

Utility Description 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

Application Help SQL Server tools generally provide context -sensitive

help on the application interface Click the Help button or a command on the Help menu

Transact-SQL Help When using SQL Server Query Analyzer, select a

statement name and then press SHIFT+F1

SQL Server documentation set SQL Server Books Online 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?”

Delivery Tip

Tell students to use

osql and point out that

isql is available for

backward compatibility

Delivery Tip

Briefly describe each

type of Help that

SQL Server provides

Trang 32

underlying technical details,

thus simplifying the

development, maintenance,

and management of your

database applications

Trang 33

Communication

Application Database Interface Network Library

Network Library

SQL Server Open Data Services

Open Data Services

Network Library

Network Library

Tabular Data Stream

Tabular Data Stream

SQL Server uses a layered communication architecture to isolate applications from the underlying network and protocols This architecture allows you to deploy the same application in different network environments The

components in the communication architecture include:

An application is developed using a database application programming interface (API) The application has no knowledge of the underlying network protocols used to communicate with SQL Server

This is an interface used by an application to send requests

to SQL Server and process results returned by SQL Server

This is a communication software component that packages the database requests and results for transmission by the appropriate network protocol A network library, also known as a Net-Library, must be installed on both the client and server

Clients and servers can use more than one Net-Library concurrently, but they must use a common network library in order to communicate successfully SQL Server supports network protocols such as TCP/IP, Named Pipes, Novell IPX/SPX, Banyan VINES/IP, and AppleTalk ADSP

Tabular Data Stream (TDS) is an application-level protocol used for communication between the client and SQL Server TDS packets are encapsulated in the network packets built for the protocol stack used by the Net-Libraries For example, if you use the Windows Sockets Net-Library, then the TDS packets are encapsulated in the TCP/IP packets of the underlying protocol

This is a component of SQL Server that handles network connections, passing client requests to SQL Server for processing and returning any results and replies to SQL Server clients Open Data Services automatically listens on all server Net-Libraries that are installed on the server

Emphasize the relationship

between network libraries

and TDS rather than

explaining the database

interface, which is described

later in the module

Database Interface Network Library

Tabular Data Stream

Open Data Services

Trang 34

Application Development

Other Data Sources

Other Data Sources Databases Databases Relational Relational

Data Object Interfaces

Data Object Interfaces

Application Programming Interfaces

Application Programming Interfaces

ODBC OLE DB

Users access SQL Server through an application that is written with a data object interface or an API

SQL Server supports commonly used and emerging database interfaces It supports low-level native APIs, as well as easy-to-use data object interfaces

Application Programming Interfaces

A database API defines how to write an application to connect to a database and pass commands to the database SQL Server provides native support for two main classes of database APIs, which in turn determine the data object interface that you can use Use the database APIs to have more control over application behavior and performance

This is a Component Object Model (COM)-based data access interface It supports applications written using OLE DB or data object interfaces that use OLE DB OLE DB can access data in SQL Server, other relational databases, and other data sources

Open Database Connectivity (ODBC) is a call-level interface It directly accesses the SQL Server TDS protocol and supports applications or components that are written using ODBC or data object interfaces that use ODBC ODBC can access data in SQL Server and other relational databases, but generally it cannot be used to access other data sources

Users access SQL Server

through an application that

is written with a data object

interface or an API

Delivery Tip

Present this slide from the

bottom to the top—introduce

APIs and then data

object interfaces

Delivery Tip

Refer students to

SQL Server Books Online

for a detailed discussion of

programming interfaces

OLE DB

Open Database Connectivity

Trang 35

Data Object Interfaces

In general, data object interfaces are easier to use than database APIs but may not expose as much functionality as an API

ActiveX® Data Objects (ADO) encapsulate the OLE DB API in a simplified object model that reduces application development and maintenance costs ADO can be used from Microsoft Visual Basic®, Visual Basic for Applications, Active Server Pages (ASP), and the Microsoft Internet Explorer scripting object model

Remote Data Objects (RDO) map over and encapsulate the ODBC API RDO can be used from Visual Basic and Visual Basic for Applications

ActiveX Data Objects

Remote Data Objects

Trang 36

Administration

Application Using COM Objects

Application Using COM Objects

Server

Transact-SQL

SQL Distributed Management Objects

Batch Utilities

Batch Utilities

SQL Server Enterprise Manager

SQL Server provides a variety of management tools that minimize and automate routine administrative tasks Transact-SQL statements are the underlying mechanism used to administer SQL Server

SQL Server Administration

You can administer SQL Server by using:

?? Batch utilities provided with SQL Server, such as osql and bcp

?? Graphical administration tools provided with SQL Server, such as SQL Server Enterprise Manager

?? COM-compatible applications, such as Visual Basic

SQL Distributed Management Objects

SQL Distributed Management Objects (SQL-DMO) is a collection of COM-based administration objects used by SQL Server SQL-DMO hides the details of the Transact-SQL statements and is suitable for writing administration scripts for SQL Server The graphical administration tools provided with SQL Server are written using SQL-DMO

variety of management tools

that minimize and automate

routine administrative tasks

Alert Management

Trang 37

SQL Server Agent can send e-mail messages, page an operator, or start another applic ation when an alert occurs For example, you can set an alert

to occur when a database or transaction log is almost full or when a database backup is successful

SQL Server Agent includes a job creation and scheduling engine Jobs can be simple, single-step operations, or they can be complex, multistep tasks that require scheduling You also can create job steps with Transact-SQL, scripting languages, or operating system commands

Replication is the process of copying data or transactions from one SQL Server to another SQL Server Agent is responsible for synchronizing data between servers, monitoring the data for changes, and replicating the information to other servers

Notification

Job Execution

Replication Management

Trang 38

The user then must have permission to access databases on the server This is accomplished by assigning database-specific permissions to user accounts and roles Permissions control the activities that the user is allowed to perform in the SQL Server database

Slide Objective

To describe the security for

SQL Server

Lead-in

SQL Server validates users

at two levels of security —

login authentication and

permissions validation on

database user accounts

and roles

Trang 39

Login Authentication

AUTHENTICATION Windows NT Verifies Password

AUTHENTICATION Windows NT Verifies Password

SQL Server Verifies Password

SQL Server SQL Server

Windows NT Windows NT

Group or User

Windows NT Group or User

SQL Server Login Account

SQL Server Login AccountOR

A user must have a login account to connect to SQL Server SQL Server recognizes two login authentication mechanisms—SQL Server authentication and Windows NT authentication—each of which has a different type of login account

SQL Server Authentication?

When using SQL Server authentication, a SQL Server system administrator defines a SQL Server login account and password Users must supply both the SQL Server login and password when they connect to SQL Server.?

Windows NT Authentication?

When using Windows NT authentication, a Windows NT account or group controls user access to SQL Server—a user does not provide a SQL Server login account when connecting A SQL Server system administrator must define either the Windows NT account or the Windows NT group as a valid SQL Server login account

modes and mechanisms

confusing, point out that

the server runs in an

authentication mode and

that a client connecting to

a server running in Mixed

Mode must choose an

authentication mechanism

Windows NT Authentication Mode Mixed Mode

Trang 40

Database User Accounts and Roles

Windows NT Verifies Password

Windows NT Verifies Password

SQL Server Verifies Password

SQL Server

Windows NT Windows NT

SQL Server Assigns Logins

to User Accounts and Roles

SQL Server Assigns Logins

to User Accounts and Roles

Database User Account

Database User Account

Database Role

Database Role

Windows NT Group User

Windows NT Group User

SQL Server Login Account

SQL Server Login Account

Database User Accounts

The user accounts used to apply security permissions are Windows NT users or groups or SQL Server login accounts User accounts are specific to a database

Roles

Roles enable you to assemble users into a single unit to which you can apply permissions SQL Server provides predefined server and database roles for common administrative functions so that you can easily grant a selection of administrative permissions to a particular user You also can create your own user-defined database roles In SQL Server, users can belong to multiple roles

After users have been

authenticated and have

been allowed to log in to

SQL Server, they must have

accounts in a database

For Your Information

Roles replace the

SQL Server version 6.5

concepts of aliases

and groups

Ngày đăng: 10/12/2013, 16:15

TỪ KHÓA LIÊN QUAN