SESS-10

24
SQL SERVER 6.5 Chapter-10/1 Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority. OBJECTIVE Distributed Data Overview SCOPE Distributed data Implementing distributed data Distributed Transaction Coordinator Replication Remote stored procedures Bulk Copy Program Distributing data on WWW

description

Sql

Transcript of SESS-10

Page 1: SESS-10

SQL SERVER 6.5

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

OBJECTIVE

Distributed Data Overview

SCOPE

Distributed data

Implementing distributed data

Distributed Transaction CoordinatorReplicationRemote stored proceduresBulk Copy ProgramDistributing data on WWW

Page 2: SESS-10

SQL SERVER 6.5

Chapter-10/2

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

IMPLEMENTING DISTRIBUTED DATA

The goal of distributed data is to make data more readily available to the users. With thedistributed data, component partitions of data are distributed over various nodes of thenetwork.

Depending on the specific update and retrieval traffic, distributing data can significantlyenhance overall performance.

In many situations it is necessary to distribute data across a geographically dispersedclient/server environment. Distributing data does not in any way reduce the need toensure consistency, concurrency, adequate performance and security of data.

In fact, it makes it more difficult to provide these capabilities. For example, whenmultiple copies of same information exist, there is always the possibility that they mightcontradict each other.

The challenge of RDBMS is to provide these capabilities in a multiserver environmentwhile maintaining performance and security.

The challenge to the implementor/administrator is to determine the method of distributingthe information in the multiserver environment.

Some of the methods which SQL Server uses to implement the distributed data are:

• Distribution Transaction Coordinator• Replication• Remote stored procedures• Bulk Copy Program• Distributed Data on World Wide Web

Page 3: SESS-10

SQL SERVER 6.5

Chapter-10/3Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

DISTRIBUTED TRANSACTIONS

Understanding Distributed Transactions

• Many times more than one source of information need to be updated and transactiontechnologies need to be applied to the update to ensure that a transaction is validbefore it occurs and all or none of the changes are made against the database table.

• The transactions that span more than one server i.e. update data on two or morenetwork-connected computer systems are referred as Distributed Transactions.

• Distributed transactions must be self-contained, autonomous or able to be reversedwithout affecting other processes. .

• Microsoft Distributed Transaction Coordinator (MS DTC) is a tool that provides theutility functions that help manage the process.

• It addresses the challenges of processing transactions over a distributed set ofsoftware components that exist on a single computer or on a system of networkedcomputers.

• MS DTC is fully integrated with Microsoft SQL Server and provides a transactionmanager in SQL Enterprise Manager at each computer, which is MS DTC userinterface, that manages distributed transactions.

• With MS DTC, running transactions and their status can be viewed and transactionchanges can be forced manually.

Two Phase commit

• MS DTC utilizes two-phase commit in its implementation• Two phase commit allows an application to coordinate updates among multiple

servers.• This implementation treats transactions on separate SQL Servers as a single

transaction.• It requires one SQL Server to be the commit server which serves as a record keeper

that helps the application determine whether to commit or to rollback transaction.• This commit process runs as a separate process from the transaction.• The role of commit service is to provide a single place where the commit / rollback

status is maintained.• The SQL Servers communicate with the commit service only if a failure happen

during the two-phase commit.• Thus, the two-phase commit guarantees that either all the databases on the

participating servers are updated or that none of them are updated.

First phase

• After all servers participating in the distributed transaction have been updated, thetwo phase commit begins when all servers agree that they are ready to commit.

Page 4: SESS-10

SQL SERVER 6.5

Chapter-10/4

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

Second Phase

• All servers commit.• A COMMIT TRANSACTION statement is executed to all servers.

Application tells the commit server that the transaction is complete, and connections areclosed. If any errors occur between phases one and two, all servers coordinate with thecommit server to see if the transaction should be canceled or committed.

Processing of Distributed Transactions by DTC

The participants in distributed transactions include:

Application : Application requests the transactions. It can be SQL Server or a clientapplication.Transaction Manager : It is responsible for overall coordination of the transactions. Thisrole is played by MS DTC, installed on either a client or server within the network.Resource Managers : These contain the resources being operated on. They are thecomputers the databases reside on.

Step 1:

• MS DTC, SQL Server and client applications communicate by means of methods-functions that control transaction objects.

• An application begins a transaction by calling the transaction manager with a

BeginDistributedTransaction method. • This method creates a transaction object that represents the transaction.

• The application then includes the transaction object with execution request to theresource managers.

• When the resource manager receives an execution request with a new transactionobject, the resource, manager enlists in the transaction by calling the transactionmanager.

• As the transaction progresses, the transaction manager keeps track of each of the

resource managers enlisted in the transaction.

Page 5: SESS-10

SQL SERVER 6.5

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

DIAGRAM

Step 2:

• The resource manager performs the transactions request.(insert, delete or update).

• The resource manager keeps information to allow it to either undo or redo thetransaction’s work on those resources.

Step 3:

• When the application complete the transaction’s work it calls the MS DTCCommitTransaction method.

• MS DTC goes through a two-phase commit protocol with all enlisted resourcemanagers. It ensures that all managers commit the transaction or all abort it.

• In first phase, MS DTC asks each resource manager if it is prepared to commit. If allresource managers are prepared, then in second phase it broadcasts the commitmessage.

• If a failure occurs, resource manager is not sure about the outcome of the transaction.It then keeps locks on the data that is modified by the transaction.

• Once the transaction has successfully committed, the resource managers and thetransaction manager will ensure that the transaction’s effects are durable.

Application TransactionManager

Transaction Object

Begin Transaction

Application TransactionManager

Resource Manager

enlist

enlist

Page 6: SESS-10

SQL SERVER 6.5

Chapter-10/6

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

Using Distributed Transactions

Server must be instructed to participate in a distributed transaction and MS DTC shouldbe informed be informed of the participation.

SQL Server’s participation in an MS DTC transaction can be started by either of thefollowing:

• By a client application calling APIs from DB-Library or ODBC. SQL Server acts as aresource manager.

• By using BEGIN DISTRIBUTED TRANS statement. SQL Server uses remote storedprocedures to specify the transaction work on different database on different servers..The COMMIT TRANSACTION marks the end of the distributed transaction.

Syntax:

BEGIN DISTRIBUTED TRAN [tran_name]

EXAMPLE

BEGIN DISTRIBUTED TRANEXEC sp_addlogin user1EXEC server1.master.sa.spaddlogin user1

COMMIT TRAN

OUTPUT:• SQL Server login name user1 is either added to both the local and remote server or none.

Page 7: SESS-10

SQL SERVER 6.5

Chapter-10/7Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

REPLICATION

Replication overview

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 singlesource server to one or more destination servers at one or more remote locations.

This brings with it the ability to synchronize information sources for multiple domainseven in the cases where they are physically separated by distance and poorcommunication links.

At its most fundamental level, replication recognizes changes made to the database andsends these changes to the remote system or systems for their use.

There are two basic replication models:(a) Tight consistency(b) Loose consistency

Microsoft has employed loose integration in its replication model.

It allows a time lag between the moment when original data is altered and when thereplicated copies of that data are updated i.e. the information will flow across the systemof servers not in real-time but as quickly as it can.

Tight consistency Vs Loose consistency

Tight consistency Loose consistency

1. Guarantees that all copies will beconstantly identical to the original

Does not guarantee that all copies will beidentical to the original.

2. Requires high speed LAN Supports LANs, WANs, fast and slowcommunication links.

3. Reduces database availability Better database availability.4. Less scaleable model than Loose

Consistency.More scaleable than tight consistency.

Few ways where replication might be used:

• To maintain several decision support servers, removing the report generation and ad-hoc query impact from the source server.

Page 8: SESS-10

SQL SERVER 6.5

Chapter-10/8

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

• To distribute and update read-only copies of changes from a master price list on asource server to several regional servers supporting field offices.

• To distribute location specific data from a centralized master table.• To support order processing during a communications outage.

Server roles in replication

Publication server

• When data is made available for replication, it is published. The server that providesthe information to other systems i.e. the server that contains the source databases andmakes data available for replication is called publisher or publication server.

• The information provided to the other systems by the publisher is called publication.• Publication consists of articles, the basic unit of replication. Articles are the items

provided to the other systems, which are discrete pieces of information that rangefrom the entire contents of the database to a single row or the result of a query.

Subscription server

• A server requesting for the publication is called a subscription server or subscriber.• The subscriber can be Microsoft SQL Server, Microsoft Access database or some

ODBC database whereas the publisher must be Microsoft SQL Server.

Distribution server

• Receives data from the publisher, stores in the distribution database, and thenforwards it to the appropriate subscription servers.

• Replicated data moves in only one direction - from publication server to subscriptionservers.

• Each server can act as both a subscriber and a publisher.

EXAMPLE

If server A publishes Publication 1, and server B publishes Publication 2, Server A could act as apublication server (of Publication 1) and a subscription server ( to Publication 2).

In most cases, the publication server and the distribution server are combined in onecomputer.

Types of replication models

There are four distinct replication models

Page 9: SESS-10

SQL SERVER 6.5

Chapter-10/9Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

Central publisher

DIAGRAM

• One server is defined as the publisher.• It distributes data to any number of servers that are setup as subscribers.• This is default option for replication in SQL Server.• Publication server is the primary owner or source of all replicated data.• Subscription sites treat replicated data as read-only.

Example - This scenario might be used to distribute master data, lists or reports from acentral server to any number of subscription server.

Central Publisher using a remote distributor

DIAGRAM

Publisher /Distributor

Subscribers

Publisher Distributor

Subscribers

Page 10: SESS-10

SQL SERVER 6.5

Chapter-10/10

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

• A separate distribution server is established to store the data before it is published tothe subscribing server.

Example - Useful when publication server is a heavily used online transaction processingserver and should be freed from the distribution role because of performance and storageconsiderations.

Central subscriber

DIAGRAM

• Multiple publishers replicate data to a single subscriber.• It addresses the need for consolidating data at a centralized site and providing the

local site with an overview of all the data.• Multiple publishers are writing to the same subscription table, hence precautions must

be taken to ensure that all data remain in synchronization.

Example - Useful for rolling up inventory data from a number of servers at localwarehouses into a central subscriber at headquarters.

Multiple publishers of one table

DIAGRAM

Distributor /Publisher

Distributor /Publisher

Distributor /Publisher

Distributor /Publisher

Subscriber

Publisher / Distributor /Subscriber

Publisher / Distributor /Subscriber

Page 11: SESS-10

SQL SERVER 6.5

Chapter-10/11Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

• Multiple publication servers and multiple subscription servers each potentially play adual role.

• It is closest to the implementation to fully distributed data processing.• Each server controls its own data and has a view of the other data.

Example - Useful for maintaining common information at regionally dispersed centres.

Guidelines for implementing replication

• It is important to replicate only the necessary data and not the whole database.• If sites are read only and only need specific information from the database, replication

can be used.• If sites must have update capabilities, do not consider replication.• The database server that serves as the central point for data modification is the best

candidate for distributing information.

CLASSROOM EXERCISES 1. What is the difference between a distributed and a replicated

information? 2. What could be the advantages and disadvantages of using the

loose consistency model?

Publisher / Distributor /Subscriber

Page 12: SESS-10

SQL SERVER 6.5

Chapter-10/12

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

REMOTE STORED PROCEDURES

• Remote stored procedure allows a client who is connected to one SQL Server toexecute a stored procedure on another SQL Server without establishing a connectionto the second server.

• The server to which the client is connected accepts the request and sends the requestto the remote server on the client’s behalf.

• The remote server processes the request and returns any results to the original server,which in turn passes those results to the client.

• Requests can be initiated by the clients on the server.

Syntax:

EXEC server_name.dbname.owner.stored_procedure_name

• Remote execution does not require a client to open the connection to the remoteserver.

• Client executes the stored procedure using EXEC statement as part of normal batchsubmitted to the local server.

• The name of the remote server must be included.

EXAMPLE

EXEC sp_whoEXEC remote_server.master.sa.sp_who

• Both stored procedures are returned to the client in a identical manner.• Server to server connection information must be available to both the servers before

the connection can be opened.• This information is stored in master database, and is added using system stored

procedure.

System stored procedures used in server administration are:

sp_addremoteloginsp_addserversp_dropremoteloginsp_dropserversp_helpremoteloginsp_helpserversp_remoteoptionsp_serveroption

Page 13: SESS-10

SQL SERVER 6.5

Chapter-10/13Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

Implementing remote stored procedures

• A server must be willing to participate in this network. Remote Access configurationoption is turned on to enable participation.

• Each server must store both its own name as the local server and the name of theserver in the sysservers table.

• The login id that the local server uses when opening the connection must exist on theremote server.

Page 14: SESS-10

SQL SERVER 6.5

Chapter-10/14

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

BULK COPY PROGRAM

Command line utilities are executable programs which are rum from a command prompt.

Bulk Copy Program (BCP) is a command line utility that copies SQL Server data to orfrom an Operating System file in a user specified format.

The utility can be used to transfer:

• large amount of data to and from SQL Server through an intermediate file.• data into SQL Server database from another program usually another DBMS.• data for use with other programs for example spreadsheets. Data is moved from SQL

Server into an Operating System file or onto a diskette, from there, the other programcan import data.

Guidelines for copying data

• The table structures of the source and destination tables need not be identical.• Data copied into SQL Server is appended to existing contents of table.• Data copied to a file overwrites any previous contents of file.

Permissions for copying data

• To copy data from an Operating System file into a table, a user must have INSERTpermission on the table.

• To copy a table or a view to an Operating System file, the user must have SELECTpermission on

⇒ table or view being copied⇒ sysobjects⇒ syscolumns⇒ sysindexes

For transferring data to and from SQL Server, following information is provided

• The name of the database• Name of the table or view• name of the Operating System file or diskette drive• The direction of transfer (in/out)

In addition , other parameters like length, datatype and terminator of the column can alsobe specified.

Page 15: SESS-10

SQL SERVER 6.5

Chapter-10/15Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

EXAMPLE

bcp library..member out mem_out /n /Sservername /Usa /Ppassword

• Copies the member table from library database to mem_out file.• out option copies to a file from the database table or view.• /n uses the database datatypes as default (does not prompt for each field).• Server name, sa and password specify the name of the server and the login to connect to transfer data.

Note: See Appendix C for details

Copying tables with or without indexes

Tables without indexes Tables with indexes

bcp utility is fastest if the database tablehas no indexes,or constraints that useindexes.

bcp utility is slow if database table hasindexes, or constraints that use indexes.

For fast bcp, sp_dboption system storedprocedure is used to set the selectinto/bulkcopy option for that databasetrue.

sp_dboption databasename, ‘selectinto/bulkcopy’, true

For a table that has indexes,or constraintsthat use indexes, there is no need to setthe option.

Fast bcp does not log data insert intransaction log.

Inserts into the tables with indexes arealways logged.

By default, the select into/bulkcopy option is off.

Integrity issues

• Any defaults defined for the columns,and datatypes in the table are always enforcedwhen data is copied into a table.

• Rules and triggers are not enforced so as to load the data at maximum speed.• bcp ‘out’ is static i.e. any updates made to the data during the bcp processes will not

be reflected in the bcp data file.• bcp ‘in’ is dynamic i.e. all rows of a batch become available after the batch has

finished.

Page 16: SESS-10

SQL SERVER 6.5

Chapter-10/16

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

CLASSROOM EXERCISES

1. Why bcp defaults to slow bcp? 2. How can you make sure that no one else can access the database while

exporting the data?

Page 17: SESS-10

SQL SERVER 6.5

Chapter-10/17Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

DISTRIBUTING DATA ON THE WORLD WIDE WEB

World Wide Web (WWW) pages

World Wide Web is one of the most visible Internet services. It presents informationtextually and graphically and turns Internet into an information resource and marketingtool.

The (HyperText Markup Language) HTML files, also known as web pages, are resourcesfor displaying information on World Wide Web.

HTML commands are added to the document file using a text editor, or using aspecialised web page editor like Microsoft Word Internet Assistant. These commands areused to present and format the simple text, tables and database query results.

These HTML pages can be viewed by using any HTML ( or web page) browser.

Distribution models

There are two ways in which data can be distributed on the Internet.

(a) Data push model(b) Data pull model

Data push model

• A web page is built and posted on the Internet.• The web users accessing the information through the Web Browser can not

manipulate the data, since it is read-only.

DIAGRAM

SQLServer Internet Server Web Browser

HTMLfiles

Browserreviews data

Page 18: SESS-10

SQL SERVER 6.5

Chapter-10/18

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

Data pull model

• A client opens a web page posted on the Internet server and interacts with the page.• Internet server queries SQL Server for the requested information.• The information is pulled, a new web page is generated and send to client.

DIAGRAM

The SQL Server Web Assistant

The SQL Server Web Assistant, an easy-to-use interface, assists in the process ofpublishing Microsoft SQL Server data on the World Wide Web. This tool is used toimplement the data push model.

It allows to define a set of data (a query) which is automatically merged into an HTMLdocument and pushed to the Internet Server.

The pages can be generated on one-time basis or as a regularly scheduled SQL Servertask. A web page can also be updated using a trigger when the supporting data changes.

In order to use SQL Server Web Assistant, one must have:

(a) CREATE PROCEDURE privileges in the database.(b) SELECT privileges on the columns accessed by the query.

Options for creating a web page

After connecting to the SQL Server Web Assistant from the SQL Server 6.5 programgroup, certain information is supplied and selections are made for other options in aseries of dialog boxes.

SQL Serverreturns data

Internet Serverrequesting data from

SQL Server

WebBrowser

SQLServer

Query

Receivingdata

InternetServer

Page 19: SESS-10

SQL SERVER 6.5

Chapter-10/19Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

Providing login

An appropriate login id is provided to access tables and databases that need to be used inproviding content for the required web page.

Selecting the contents for the web page (Specifying the query)

Queries in SQL Server Web Assistant can be built using one of the three options shownby the Query dialog box:• Queries from a graphical database/table hierarchy - Allows to use the point-and-click

interface and indicate the tables and other items to be included in the query that willbe used to generate the page.

• Free form query option - Allows to specify the database and directly enter (typing in)the query

• Query by using an existing stored procedure. The query page asks you to select how to apply the query and then to type the query.

Scheduling

Creation of web pages can be scheduled as follows:

Scheduling option Description

Now Immediate, one time executionLater One time execution for a specified date and time.When data changes Automatic triggered execution. Changes to certain

tables and columns cause the web page to be updated.On certain days of the week Execution at a day and time, for example, Wednesday

at noon.On a regular basis Execution every n minutes, hours, days or weeks for

example every 5 minutes.

File options

• The file name and path of the web page is created.• This is either on local or remote computer.• An optional template file can be used as a template for the web page. The template

can contain any static text, URL links or other features.• The title of the web page is specified and a title for the results set is also specified.• One or more URL links can be specified or a data query can be specified that returns

the formatting and presentation of the data with the additional HTML pages.

Page 20: SESS-10

SQL SERVER 6.5

Chapter-10/20

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

Formatting options

• HTML offers a limited variety of fonts and formatting options.• HTML heading styles to be used for the titles of the web page and data sections can

be specified.• Timestamp and column headers can be included.• If a template file is used, several of these options will already be determined.

After an HTML page is generated, it can be viewed by any web browser.

DIAGRAM

Implementation of data pull model

• Web users can initiate dynamic queries from an HTML document to a SQL Server,through the Microsoft Internet Information Server (IIS).

• IIS provides the software necessary to publish information on Internet. • Integration of SQL Server with IIS, including it’s built-in Internet Database

Connector (IDC) which is an Internet Server API, modifies and retrieves theinformation from the SQL Server as well as create new web pages and send theseback to the Web users.

DIAGRAM

WebBrowser

IDC

InternetServer

SQLServer

Query IIS requestingdata from SQLS

SQL Serverreturns data

Receivingdata

SQLServer( Web

Assistant) Internet Server Web Browser

HTMLfiles

Browserreviews data

IIS

Page 21: SESS-10

SQL SERVER 6.5

Chapter-10/21Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

• The IIS provides access to the ODBC layer with the use of IDC.• IDC acts as a go between for system, providing the interface between HTML and

how the information is queried at database level.• An HTX file is returned to the user, which indicates how the resulting data is

displayed.

DIAGRAM

Thus, there are three components:• Initial source HTML document containing form fields and other options.• The IDC file for making and carrying out the database commands.• The HTX file for presenting the information returned.

Building form to prompt for values

• A form is presented to the user which allows them to select what information theyneed.

• Forms can be created which allow input that can be used to form the SQL statementsthat are passed to the data source.

Incoming HTTP request

IDC document

The IDC source indicates the ODBCDSN, SQL statement and applicable

parameters to use to retrieveinformation.

Internet Information Server

ODBC

ODBC datasource

HTX document

The HTML extension file indicateshow the output data should beprovided to the user’s browser.

To browser for display to the user

Page 22: SESS-10

SQL SERVER 6.5

Chapter-10/22

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

A sample HTML file (form.htm)

<HTML><HEAD><TITLE>Demonstration form</TITLE></HEAD><h1>sample form for database access</h1><FORM METHOD=“POST” ACTION=“/scripts/form1.idc”>Enter name to find : <INPUT NAME=“au_lname”><p><INPUT TYPE=“SUBMIT” VALUE=“Run query”></FORM></BODY></HTML>

In this example, form1.idc is called and passed parameters. Notice, that the variable nameau_lname is used to reference the value provided by the user. Thus, a user is allowed totype a name that can be used to search the authors table in the pubs database.

The browser opens a new URL on the server with the following specification:

http://scripts/form1.idc?au_lname=<name>

Building server query source file

• When the URL is accessed, the server will run the indicated IDC file.• IDC file contains the SQL statements and directives necessary to carry out the

commands needed.

A sample IDC file (form1.idc)

Data source: web sqlUsername: saTemplate: form1.htxSQLstatement:+SELECT au_lname, phone, address from authors+ where au_lname like ‘%au_lname%%’

The user will not see this file or output from it directly. The IDC calls the Templateindicated and passes in the results to be returned as a Web page.

Notice, that the variable is placed between percentages.

The data source indicated in the IDC relates to the ODBC data source established withthe ODBC manager.

Page 23: SESS-10

SQL SERVER 6.5

Chapter-10/23Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

After the values have been retrieved that you want to display, the results can be moved onto the results set source files.

Building Results Source file

• The HTML extension files with the extension .HTX are referenced in the Templateentry in the IDC file.

• These files need to be created to dictate how the information is presented.

Page 24: SESS-10

SQL SERVER 6.5

Chapter-10/24

Copyright Tata Infotech Ltd. : Copying of this document in part or full is not permitted without express authority.

SUMMARY

There are various methods which SQL Server uses to implement the Distributed Data.

Distributed Transaction Coordinator - Tool that provides the utility functions that helpmanage the transactions that span more than one server.

Replication - Allows automatic distribution of read-only copies of transactional data froma single source server to one or more destination servers at one or more remote locations.There are three server roles:• Publication server• Subscription server• Distribution serverTypes of replication models:• Central publisher• Central publisher using a remote distributor• Central subscriber• Multiple publishers of one table

Remote stored procedures - Allow a client connected to one SQL server to execute astored procedure on another SQL Server without establishing a connection to the secondserver.

Bulk Copy Program - A command line utility that copies SQL Server data to or from anOperating System file in a user specified format.

Distributing data on WWW - Two types of models• Data push model- Implemented by SQL Server Web Assistant.• Data pull model - Through IIS.