Vous êtes sur la page 1sur 35

SQL SERVER 6.

5
Chapter-1/1
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
OBJECTIVE
Introduction to Microsoft SQL Server and its features
SCOPE
RDBMS concepts overview
The ERA model
Database design and data modeling
Considerations in database design
About SQL Server 6.5
Client / Server features
Other features
SQL Server components
Distributed Management Framework
SQL SERVER 6.5
Chapter-1/2
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
AN OVERVIEW OF RDBMS CONCEPTS
A database system is computer based record keeping system which stores information
deemed to be of significance to the organization the system is serving.
Let us consider a case study to learn how to implement a database design.
Library Case Study Overview
Objective :
To learn how to implement a database design on SQL Server 6.5.
Introduction :
Tata WebNet wants to offer library services on the net. An interview was conducted
to understand the library business needs, in order to implement a database strategy for the
librarian and the members.
The case study provides an overview of various library operations like rules for
enrolling new members, the book check out process and withdrawl of memberships.
Issue of membership :
An applicant can become a member of the library by following certain rules:
Applicant can fill an application form for the membership either from the web or
directly through the library by providing certain details like their names and
addresses.
If the applicant has been or is a member of the library, the application is rejected.
Application number is allocated to the applicant who has been selected after requisite
verifications.
Membership is allocated to the selected applicants, picking up the member details
from the application, provided the applicant comes within a week after filling in the
application form.
At the time of allocating membership security deposit is accepted from a member.
Security deposit is to be retained by the library in case of non-payment of fines or
failure to return books at the time of close of membership.
SQL SERVER 6.5
Chapter-1/3
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Book check out process :
Members can put a book request from the web also.
Member requesting a book submits relevant details which include Member Number,
Book name, Author and Subject and gets the book reserved.
A maximum of three books can be issued to a member.
In case a member has already been issued three books or has to pay fine,books are not
issued.
In case the book is not available in the library, member can search for:
Same book in other libraries
Any book on same subject in the same library
Any book on same subject in other libraries
Availability of books with the publishers.
A book reserved can be issued within a week of reservation.
Books can be checked out for 15 days.
On late return of book, the member is required to pay fine.
Membership withdrawl :
In case, member decides to withdraw the membership from the library, he or she
should pay all the dues to the library and return the books previously issued.
In case, he fails to do so, the security deposit should be retained.
Its been recommended that the Tata WebNet implement this design on Microsoft SQL
Server 6.5.
Before implementing the database design, the ERA Model which is the basis of database
design should be understood.
SQL SERVER 6.5
Chapter-1/4
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
ERA MODEL - THE BASIS OF DATABASE DESIGN
ERA model is used to explain various concepts involved in planning and organizing a
database. It is one of the data modeling tools involved in producing a fully normalized
database.
Components of ERA model
Entities
Any object of interest about which data can be collected.
EXAMPLE
Applicant is an entity about which information can be stored, such as Application No., Applicant
Name, Address.
Similarly, Book is an entity about which data can be collected such as ISBN, subject, title of the book,
author, publication etc.
Attributes
Qualifiers that identify or define characteristics of an entity.
EXAMPLE

Each Applicant has an Application no, Name, Address . These are attributes of the entity Applicant.
Entity : Applicant
Attributes : Application no.
Name
Address


Relationships
Different entities can have relationships with each other (similar to the function of
verbs in relation to nouns).
EXAMPLE

A Book is issued to a Member. The verb issued describes the relationship between the two nouns (entities),
Book and Member.

SQL SERVER 6.5
Chapter-1/5
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.


Mapping of the components of ERA Model to a database design
Different components of ERA Model are translated into different components of database
design.
Entity
An entity in an ERA Model is modeled as a table.

For example, in case of WebNet Library, the entity Applicant is translated into a
table called Applicant.
EXAMPLE
TABLE
APPLICANT
APPL_NO NAME ADDRESS
A001 BARR, PETER CHURCH STREET
A002 ALLEN, SAM PARK STREET
A003 M, MARY POND DRIVE

DATABASE ( a collection of tables)
Note : Table names must be unique within a database
BOOK TABLE TABLE
TABLE
MEMBER ARCHIVE
APPLICANT
TABLE TABLE
TABLE
NAME OF
THE TABLE
LIBRARY
NAME OF
THE
DATABASE
SQL SERVER 6.5
Chapter-1/6
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Characteristics of table
Tables are composed of rows (records) and columns (fields).
DIAGRAM
APPLICANT
APPL_NO NAME ADDRESS
A001 BARR, PETER CHURCH STREET
A002 ALLEN, SAM PARK STREET
A003 M, MARY POND DRIVE
APPLICANT
APPL_NO NAME ADDRESS
A001 BARR, PETER CHURCH STREET
A002 ALLEN, SAM PARK STREET
A003 M, MARY POND DRIVE
Rows and columns can be in any order.
Each table stores data about entities.
Attributes
Attributes of the entity Applicant, such as Application No., Name, Address form the
columns of the table.
EXAMPLE
Applicant is an entity about which information can be stored, such as Application no.., Name, Address.
Application no., Name, Address are the attributes of the entity Applicant.
APPLICANT
APPL_NO NAME ADDRESS
- - -
- - -
- - -
Note: Column Names must be unique within a table
ENTITY
ATTRIBUTES
RECORD (ROW)
COLUMN (FIELD)
SQL SERVER 6.5
Chapter-1/7
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Non-decomposable columns
All columns in a table must be non-decomposable.
If the information in a column can be broken into multiple usable parts, columns
should be redefined as two or more columns.
EXAMPLE
APPLICANT
APPL_NO NAME ADDRESS
A001 BARR, PETER CHURCH STREET
A002 ALLEN, SAM PARK STREET
A003 M, MARY POND DRIVE
APPLICANT
APPL_NO LAST_NAME FIRST_NAME ADDRESS
A001 BARR PETER CHURCH STREET
A002 ALLEN SAM PARK STREET
A003 M MARY POND DRIVE
Primary Key
An attribute or attributes whose value uniquely identifies a specific row in a relation.
It is always recommended to have a Primary Key on a table.
There can be only one Primary key per table.
Enforces data integrity by ensuring that each row in the table is unique.
EXAMPLE
APPLICANT
APPL_NO LAST_NAME FIRST_NAME ADDRESS
A001 BARR PETER CHURCH STREET
A002 ALLEN SAM PARK STREET
A003 M MARY POND DRIVE
A004 ALLEN JOHN PARK STREET
PRIMARY
KEY
UNIQUE
VALUES
SQL SERVER 6.5
Chapter-1/8
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Foreign Keys
A column added to a table A , that is Primary Key of another table B.
A Foreign Key references the Primary Key of a table.
Values in the column marked as Foreign Key are checked against the values in the
Primary Key column to verify that these value are legitimate.
Provides a link between the two tables.
Foreign key can also be the primary key of the same table. In that case the foreign key
should be unique.
Enforces referential integrity by ensuring that each value in the Foreign Key column
is a valid Primary Key.

EXAMPLE
MEMBER
MEM_NO LAST_NAME FIRST_NAME ... ...
M001 BARR PETER ... ...
M002 ALLEN SAM ... ...
M003 M MARY ... ...
M004 ALLEN JOHN ... ...
ISSUE
ISBN COPY_NO MEM_NO OUT_DT DUE_DT
ID12 3 M002 03-04-97 03-19-97
CP03 1 M001 03-01-97 03-16-97
Relationships
Relationships are of three types and each of them is modeled differently.
1. One-to-one relationship
2. One-to-many relationship
3. Many-to-many relationship
FOREIGN KEY
PRIMARY
KEY
SQL SERVER 6.5
Chapter-1/9
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
One-to-one relationship
For each occurrence of an entity, there is a corresponding single occurrence of the
other entity.

EXAMPLE

A copy of a book (since unique ISBN + copy_no) can be issued only to one member. A member can
have only one book issued for a particular copy of that book.



Modeled using a foreign key.

EXAMPLE

The primary key of MEMBER is Mem_no which will exist as an attribute in the ISSUE table as a
foreign key. (Refer to the diagram for Foreign keys given earlier.)


One-to-many relationship
Each occurrence of one entity can result in multiple occurrence of the other entity.
EXAMPLE
A publisher can publish many books. But a particular book is published by only one publisher.
The entity PUBLISHER constitutes the one part of the relationship. The entity
PUB_BOOKS constitutes the many part of the relationship.
Models as a foreign key.
Primary key of the one part of the relationship is necessarily the foreign key in the
many part of the relationship.
SQL SERVER 6.5
Chapter-1/10
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
EXAMPLE
The primary key of PUBLISHER is Pub_no which will exist as an attribute in the PUB_BOOKS table as a
foreign key.

PUBLISHER
PUB_NO PUB_NAME ADDRESS
P001 - -
P002 - -
PUB_BOOKS
PUB_NO SUBJECT TITLE AUTHOR COST
P001 Window 95 ABC Win 95 ABC $12.00
P002 Java Java Book XYZ $10.00
P002 SQL Server SQL SVR 6.5 PQR $10.00




Many-to-many relationship
Multiple occurrences of one entity have corresponding multiple occurrences of
another entity.
EXAMPLE
Many publishers can publish many books and many books are published by many publishers.
Many part
SQL SERVER 6.5
Chapter-1/11
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
RELATIONSHIP MODELED AS
one-to-one foreign key column
in either table
one-to-many foreign key column in the table
which has many relationships
many-to-many separate table as a link with
foreign key columns to both
tables
DIAGRAM
THE ERA MODEL
ENTITIES RELATIONSHIPS ATTRIBUTES
Tables
Columns or
Tables
Columns Modeled as
SQL SERVER 6.5
Chapter-1/12
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
DATABASE DESIGN AND DATA MODELING
Roles and responsibilities of the Administrator
Installation and Configuration
Security Management
Data and Storage Management
System maintenance

Roles and responsibilities of the Implementor
Creating the logical database design
(a) Describes the organization of the database
(b) Produces a database schema which defines
(i) Information to be stored.
(ii) Organization of the data.
(iii) The tables needed.
(iv) Column definitions
Implementing the logical database design
(a) Determining storage space ( for databases etc.)
(b) Creating tables
(c) Selecting Primary Keys and Foreign Keys.
(d) Physical implementation of the Database Schema.
Designing and implementing data integrity requirements
(a) Done during all phases of a database design
(b) Restrictions are assigned to certain data to enforce data integrity
(c) Implemented at all levels in the database
Programming the database involves writing small program codes which are used to
(a) Enforce data integrity
(b) Provide information to users
(c) Automate administrative tasks
(d) Provide capability to communicate with clients (ODBC)
SQL SERVER 6.5
Chapter-1/13
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Database Design
Planning the database design includes
(a) Determining the business and user requirements
(b) Considering the problems that are to be used
Considerations in Database Design
Creating a Normalized database
(a) Prevents unnecessary data redundancy and inconsistencies in the database
(b) Enhance the maintainability, extensibility and performance of the database
(c) The overall goal in creating a relational database is a design that meets the rules
of a third normal form.
Considering the Degrees of Denormalization
(a) Fully normalizing the database tables doesnt work always.
(b) Denormalization is purposeful violation of the rules of a normalized database to
increase the performance of a specific task.
EXAMPLE
A join returning information from different tables might take too long , in comparison to creating a single
table that holds information from all the three tables as a single row of information.
(c) Database should be fully normalized before considering the denormalization.
(d) Occurs during all phases of implementing a database.
SQL SERVER 6.5
Chapter-1/14
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
ABOUT THE MICROSOFT SQL SERVER 6.5
Microsoft SQL Server 6.5 is one of the powerful, high performance, preferred Relational
DataBase Management Systems, that runs on the Microsoft Windows NT operating
system.
It is capable of supporting hundreds of simultaneous users, depending on the application
and the hardware environment.
It is designed as the central repository for all the data of an organization and to meet the
demanding requirements of distributed client/server computing.
Client/server features of SQL server
DIAGRAM
EVOLUTION OF CLIENT/SERVER COMPUTING



Host centric computing with an intelligent central Mainframe and Dumb terminals

A stand-alone intelligent Personal Computer
Mainframe
Dumb
Terminal
Dumb
Terminal
Dumb
Terminal
SQL SERVER 6.5
Chapter-1/15
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.



Client/Server computing across a LAN
(Clients are intelligent i.e. have CPU)
Client/Server computing and SQL Server
Client/Server computing is a type of distributed model for data storage, access and
processing which combines the best parts of Mainframe and Stand-alone technology
into a cohesive environment. (As shown in the diagram)
Server database that resides in a common location is accessed by many users called
clients from other computer systems rather than from I/O devices such as terminals.
With more intelligent client systems, users can retrieve information from the server
and manipulate/process it locally and independently without communicating with the
server, which optimizes the processing of the information.
SQL Server provides the server software that is installed on the server system and
client software installed on the client PC system.

The SQL Server database is the Server application which is responsible for creating
and maintaining database objects such as tables and indexes, maintaining integrity
and security.
The client software allows to create, maintain and access the database and all objects
from the client and allows the client applications written in host languages like Visual
Basic, C, C++ etc. to perform add, change and delete operations against the database
residing on the Server.

Client or front-end co-ordinates application logic with a Server or back-end
application using some mechanism of communication.
Server
Intelligent
Client
Intelligent
Client
Intelligent
Client
SQL SERVER 6.5
Chapter-1/16
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
The network software components required for the interconnection of Client and the
Server computer in case of SQL Server are built into the Windows NT system.
DIAGRAM
Traditional approach Vs Client/Server approach
Traditional approach
Traditional applications are data-dependent i.e.:
the way in which data is organized in secondary storage
the way in which data is accessed
are related to the requirements of the application.
EXAMPLE
If a file is stored in indexed sequential form, the application must have the knowledge that index exists and
internal structure of the application will be built around this knowledge.
Client/Server approach
Client/Server computing is data-independent.
Applications concerned, do not depend on any one particular storage structure and
access strategy.
SQL Server
CLIENTS
SERVER
Connections are through Network software components
built into Windows NT
C
C++
Visual Basic
SQL SERVER 6.5
Chapter-1/17
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
The storage structure or access strategy can be changed in response to changing
requirements without having to modify existing applications.
Microsoft SQL Server features
Best database for Microsoft Windows NT
The unified architecture of SQL Server with Windows NT, sharing programming
interfaces and tools, administration, security and network models, and broad hardware
options, facilitates building and deploying of richer applications more quickly and easily.
Multiprocessing feature of Windows NT
Windows NT can run on systems that use different microprocessors for their CPUs
such as Intel 386, 486, Pentium, x86 clones, Alpha AXP, MIPS R4000 series etc.
The key advantage of using SQL Server with Windows NT as the operating system
platform is that there are many choices of computer systems to use as server for the
SQL Server database.
I/O requests can be handled by one processor while other operations such as
validation can be performed by the other processor of the system.

Thus, multiple server requests can be handled at one time, which increases the
number of clients that can be served by the server.
DIAGRAM
Multiple server requests can be handled at one time by using more than one CPU.
Windows NT
SQL
Server
Client 1
Client 2
I/O request
Validation
CPU1
CPU2
CPU3
I/O request
Validation
Client 3
Validation
Validation
CPU4
SQL SERVER 6.5
Chapter-1/18
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Multithreading environment of Windows NT
Multithreading environment of Windows NT provides significant performance
improvements over environments that dont have this capability.
The two processes of SQL Server, MSSQLServer and MSQLExecutive, which are
sections of computer code that control how the computers hardware and other
software is used, use Windows NT processes to service the client systems.
For example, Transact-SQL statements when issued, are conveyed to and performed
by these two processes.

The processes are divided into multiple threads of execution. Each thread being
executed by a single processor, allows multiple execution in a multiprocessor
environment of Windows NT.
DIAGRAM
Threads of a process
( Each thread being executed on a single processor)
Windows NT security and SQL Server
Standard security
To logon to the SQL Server, each user must provide a valid login ID and password.
SQL Server has its own validation process for the connections, which is referred as
standard security.
A Process
CPU2 CPU4 CPU3 CPU1
thread 1 thread 2 thread 3 thread 4
SQL SERVER 6.5
Chapter-1/19
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Integrated security
Integrated security allows SQL Server to use Windows NT authentication mechanism
to validate logins for all connections.
Integrated security lets SQL Server applications take advantage of Windows NT
security features, including encrypted passwords, password aging, domain-wide user
accounts and Windows-based user administration.
Mixed security
It allows SQL Server login requests to be validated by using either integrated or
standard security methods.
Monitoring server activity and performance
Performance Monitor
SQL Performance Monitor is the integration of Microsoft SQL Server with the
Window NT Performance Monitor.
It makes possible to get up-to-the -minute activity and performance statistics about
SQL Server.
It obtains statistics from performance counters, several of which are grouped within a
performance object.
Event viewer
Windows NT Event log, is a special file containing SQL Server error messages as
well as messages for all activities on computer
This file can be viewed only by using the Windows NT Event viewer.
SQL SERVER 6.5
Chapter-1/20
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Multiple-user environment of SQL Server on Windows NT
Windows NT enables the establishment of networks and connection to other computer
systems. The connectivity feature of Window NT serves many purposes:
Network connections can be made for the purpose of sharing the resources on
different systems.
Connections can be created to access information on a remote disk of another
Windows NT or a non-Windows NT system.


Database access from the SQL Server database by the clients depends on the
communication connections that are established by the Windows NT system.

Administrative operations can be done through network connections to Windows NT.
Best database for the Internet
SQL Servers built-in Internet integration gives organizations the ability to build
Active Web Sites.
The SQL Server Web Assistant, an easy-to-use interface, allows to define a set of
data (a query) which is automatically merged into an HTML document and pushed to
the Internet Server.
DIAGRAM
SQL
Server
( Web
Assistant)
Internet Server
Web Browser
HTML
files
Browser
reviews data
SQL SERVER 6.5
Chapter-1/21
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Web users can initiate dynamic queries from an HTML document to a SQL Server,
through the Microsoft Internet Information Server (IIS).
Note: Details are covered in the later sessions.
DIAGRAM
Replication
Replication is provided as an integral element of Microsoft SQL Server 6.5.

It allows automatic distribution of read-only copies of transactional data from a single
source server to one or more destination servers at one or more remote locations.

DIAGRAM



BASIC REPLICATION MODEL
When SQL Server data is published to non-SQL Server systems like Oracle, Access,
Sybase, IBM DB2, it is called Heterogeneous Replication.
Web
Browser
IDC
Internet
Server
SQL
Server
Query
IIS requesting
data from SQL
S
SQL Server
returns data
Receiving
data
IIS
Read/Write
database
Read only data
tables
SQL SERVER 6.5
Chapter-1/22
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Distributed transaction
SQL Server supports distributed transactions. ( Transactions that span more than one
server.)

When a transaction occurs, many times more than one source of information need to
be updated

DTC (Distributed Transaction Coordinator) provides the utility functions that help
manage the distribution transaction process.

Changes on multiple servers can be committed as a single unit of work.
Open DataBase Connectivity (ODBC)
SQL Server driver enables different client applications to access data in SQL Server
database through ODBC interface without requiring any change to Server database or
the client application.
DIAGRAM
OPEN DATABASE CONNECTIVITY

Integration with OLE object technology
OLE is a programming technology that allows an application to expose objects,
properties, and methods to other controller applications.
Controller applications can then program the object application.
DBASE SQL SVR
Network
Client
Application
ODBC DLL
DBASE Driver SQL SVR Driver
SQL SERVER 6.5
Chapter-1/23
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
SQL Enterprise Manager, a tool that simplifies managing multiple server
environment utilizes the OLE service, which provide easier administration of tasks
since relationship between the objects are known.
Programmability using Visual Basic, VC++ provide an extensible programming
environment for SQL Server.
DIAGRAM
OLE AND SQL SERVER


Other features
SQL Server supports very large databases, allowing the management of databases in
the 100 to 200 Gigabyte range.
In addition to using the dialect of SQL (Transact-SQL), which is a high level
language for RDBMS, SQL Server provides a variety of graphical and command line
utilities that enable clients to access data in a variety of ways.
All of Microsofts best infrastructure technology and Microsofts best development
tools are optimized to work best with Microsoft SQL server.
EXAMPLE
Microsoft Visual Basic Enterprise, Microsoft Visual C++ Enterprise include tools to manage SQL server
objects.
SQL Enterprise Manager VB, VC++, etc.
SQL OLE
SQL Server Object application
Controller
application
SQL SERVER 6.5
Chapter-1/24
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
CLASSROOM EXERCISE
1. How does the multiprocessing feature of Windows NT help SQL Server?
2. What is the difference between Replication and Distribution?
3. What is the purpose of SQL Performance Monitor?
SQL SERVER 6.5
Chapter-1/25
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
SQL SERVER COMPONENTS
Transact-SQL
The query language, SQL, is the standard database query language for the relational
databases. The dialect of the SQL used with SQL Server is Transact-SQL.
Transact-SQL statements are used to:
create logical storage units such as databases. (CREATE DATABASE statements)
create objects such as tables that are stored in databases. (CREATE TABLE
statements)
add and manipulate data and other database objects. (INSERT, DELETE, UPDATE
and SELECT statements)
execute SQL statements rapidly by the use of stored sets of Transact-SQL statements
such as stored-procedures .
Command line Applications
Transact-SQL statements can be entered through the ISQL (Interactive Structured
Query Language) utility.
From the Operating System prompt, ISQL is invoked with the command isql along
with the needed parameters.
EXAMPLE
isql /u<login id> /p<password>
1>
The command is given from the Operating System prompt.
The execution of the command results in entering the ISQL command session directly, since the
username and password are entered.
Each parameter is preceded by the forward slash (/) or a hyphen (-).
The ISQL command prompt will be successively numbered (as shown in the example) until the
execution command (GO) is entered.
ISQL commands used after entering ISQL.
SQL SERVER 6.5
Chapter-1/26
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Commands Purpose
GO Executes a command
RESET Clears statements that were entered
ED Invokes the default system editor
!! command Executes an Operating System command
QUIT or EXIT() Exits ISQL
Ctrl+C Terminates a query without exiting ISQL
SHUTDOWN Stops the SQL Server and exits ISQL
Note: See Appendix B for details.
GUI Applications
ISQL/w
Allows issuing of Transact-SQL statements in a graphical query interface.
Can be considered as a Windows version of ISQL command line.
SCREEN CAPTURE
SQL statements are entered in the query page of ISQL/w.
Operations like cut, copy, paste, print, save and edit previous queries can be done
easily, in comparison to ISQL command line.
On execution, Query output is displayed in the Results window.
ISQL/w has the capability for graphically analyzing the queries.
SQL SERVER 6.5
Chapter-1/27
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
SQL Enterprise Manager
Used to perform all administrative operations with local or remote servers.
Following tasks can be performed using the SQL Enterprise Manager:
Manage user accounts and server logins (login option under manage in Enterprise
Manager)
Manage databases and database objects (Database devices and database options
under manage)
Start, stop and configure servers (SQL Server option under server)
Display server statistics (current activityoption under server)
Configure and manage replication (replication configuration option under server)
Manage the access control (permissions option under object)
Schedule tasks and events (scheduled tasks and alerts / operators options under
server). These are commonly called as Executive managers which are serviced by the
SQLExecutive service running in the background.
Backing up and restoring (Database backups/restore option under tools)
Managing remote servers (Remote servers option under server)
Scheduling automatic daily or weekly routine database maintenance tasks such as
database and transaction log backups, database consistency check etc. (Database
maintenance wizard option under help)
SQL Service Manager
SQL Service Manager is useful when physically working on the server.
It starts, stops or pauses the local or remote SQL Server processes.
It must be started before any operation within the database can be performed.
SQL SERVER 6.5
Chapter-1/28
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
SCREEN CAPTURE
SQL Service Manager dialog box after the MSSQLServer service is started.
The traffic-light metaphor simplifies starting, stopping, pausing SQL Server.
Services in Window NT, such as MSSQLServer and SQLExecutive of SQL Server,
are system processes that run in the background within NT.
These background processes are used by SQL Server and client systems that require
their functions.
SQL Security Manager
Provides a way to map the NT users and groups to SQL Server.
Authorizes Windows NT users to access SQL Server
SQL Client Configuration Utility
Defines the Net-Library and DB-Library used for communication between the client
and the server.
Net-library is set to Named pipes which is the default communication mechanism
between the client and the server
A different network library, (other than Named pipes ) can be chosen as an alternative
communication mechanism.
It also searches for multiple copies of DB-Library and displays the version number.
DB-Library is an API for both C and VB that allows to work directly with SQL
Server.
SQL SERVER 6.5
Chapter-1/29
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
SCREEN CAPTURE
SQL Server Books online
Provides online access to the entire text of the SQL Server documentation provided
by Microsoft.
Includes a powerful and easy-to-use full-text search capability.
SQL Performance Monitor
Integrates Windows NT Performance Monitor with SQL Server, providing the status
of the activities and performance statistics of both the system and the SQL Server.
SQL Trace
Monitors and records SQL Server database activity.
Monitoring can be done real-time or it can create filters that focus on actions of
particular users, applications or hosts servers.
It can display any SQL statements and remote procedure calls that are sent to any
SQL Server.
SQL SERVER 6.5
Chapter-1/30
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Microsoft Query
Allows to build SELECT queries graphically against any ODBC data source.
It can display basic schema information about a database.
SQL Server Web Assistant
Generates HTML files from SQL server data by using Transact-SQL queries, stored
procedures.
Generated Web pages can be viewed with any HTML browser.
SQL setup
SQL setup is used to:
Install new software
Upgrade existing software
Remove SQL Server
Change network support options
Add a language
Set security options.
Microsoft SQL Server ODBC driver
A help file providing information about the Microsoft SQL Server ODBC Driver.
SQL Distributed Management Objects
A help file displaying the Microsoft SQL Server Distributed Management Object
Model.
CLASSROOM EXERCISE
1. Which graphical tool of SQL Server can be used to graphically build
SELECT queries?
2. Can SQL Enterprise manager be used to start, pause, continue or stop SQL
Server services?
SQL SERVER 6.5
Chapter-1/31
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
DISTRIBUTED MANAGEMENT FRAMEWORK
Distributed Management Framework (DMF ) of objects, services and components is used
to manage Microsoft SQL Server.
Logically it can be separated into three parts.
DIAGRAM
Server/Back end
Direct access to SQL Server engine and services is through Transact-SQL statements
from the command line.

The SQL Executive service manages replication, tasks, events and alerts .

The SQL Executive Service and SQL Server service work together to provide the
database back end, and run as Window NT services.
SQL Object library
DMO provides 32-bit OLE automation objects and expose interfaces for all SQL
Server management functions to any OLE-compliant application.

It acts as a middle layer between the client and the server.

SQL Enterprise Manager
SQL Server Distributed Management Objects
SQL Executive Services SQL Server Service
Clients/Front
end
SQL
Object
library
Server/Back
ends
(NT
services)
OLE Automation
SQL SERVER 6.5
Chapter-1/32
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
This capability allows applications that use these objects to manage SQL Server from
remote locations.
Clients/Front end
The client layer includes SQL Enterprise Manager as well as any applications written
using SQL-DMO automation objects.
SQL SERVER 6.5
Chapter-1/33
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
Capabilities and Limitations of SQL Server
Description Capabilities/Limitations
Maximum number of databases 32,767
Maximum number of tables Two billions
Maximum number of columns per table 250
Maximum number of rows per table Unlimited ( number of rows are limited in
practice by the capacity of the storage
medium on which tables are srored)
Maximum number of devices 256
Maximum number of bytes per row 1962 (excluding text and image column)
Maximum number of indexes:
Clustered
Nonclustered
1 per table
249 per table
Maximum number of columns that can be
indexed
16
Maximum number of triggers on a table 3 ( one each for INSERT, UPDATE and
DELETE)
Maximum number of parameteres in a
stored procedure
255
SQL SERVER 6.5
Chapter-1/34
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
SUMMARY
SQL Server is designed as the central repository for all the data of an organization and to
meet the demanding requirements of distributed client/server computing.
Components of ERA model:
Entity
Attribute
Relationships
Features:
Best database for Microsoft Windows NT
Best database for Internet
Replication
Distributed transactions
ODBC
Integration with OLE technology
Database Maintenance Plan Wizard
Remote server management
SQL Server Components:
SQL Enterprise Manager
SQL Service Manager
ISQL/w
SQL Security Manager
SQL Trace
SQL Client Configuration utility
SQL Performance Monitor
Microsoft query
SQL Server Web Assistant
SQL Books online
SQL Setup
Microsoft ODBC SQL Server Driver
SQL DMO
SQL SERVER 6.5
Chapter-1/35
Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.
LAB EXERCISES
1. Assign your server to a group and then register your server using SQL
Enterprise Manager.
2. Explore the SQL Enterprise Manager.
3. Create a Transact-SQL script using the script generating capability of SQL
Server through SQL Enterprise Manager.
4. Use the SQL Query tool to create and execute queries in the Enterprise
manager .
5. Explore the ISQL/w utility.
6. Based on the information presented by the WebNet Library, design a
database for the desired Library system.

Vous aimerez peut-être aussi