.

MS SQL Server 6.5

Язык: русский
Формат: реферат
Тип документа: Word Doc
0 1894
Скачать документ

NIAeA?AEAIEA: TOC \o “1-3”

Aaaaeaiea GOTOBUTTON _Toc403054661 PAGEREF _Toc403054661 2

A?oeoaeoo?a MS SQL Server 6.5 GOTOBUTTON _Toc403054662 PAGEREF
_Toc403054662 3

I?iecaiaeeoaeueiinoue GOTOBUTTON _Toc403054663 PAGEREF
_Toc403054663 4

?ani?aaeaeaiiay n?aaea oi?aaeaiey GOTOBUTTON _Toc403054664 PAGEREF
_Toc403054664 5

SQL-DMO (Distributed Management Objects) GOTOBUTTON _Toc403054665
PAGEREF _Toc403054665 7

Eioaa?aoeey n yeaeo?iiiie ii/oie GOTOBUTTON _Toc403054666 PAGEREF
_Toc403054666 8

Oa?aeoa?enoeee ycuea Transact-SQL GOTOBUTTON _Toc403054667 PAGEREF
_Toc403054667 9

MS Distributed Transaction Coordinator (DTC) e ?ani?aaeaeaiiua
o?aicaeoeee GOTOBUTTON _Toc403054668 PAGEREF _Toc403054668 11

Aeiee?iaee GOTOBUTTON _Toc403054669 PAGEREF _Toc403054669 14

Iaaeaaeiinoue o?aiaiey eioi?iaoeee GOTOBUTTON _Toc403054670 PAGEREF
_Toc403054670 16

Oe?aaee?iaaiea GOTOBUTTON _Toc403054671 PAGEREF _Toc403054671 18

Aii?inu aaciianiinoe aeinooia GOTOBUTTON _Toc403054672 PAGEREF
_Toc403054672 20

Iaeioi?ua aii?inu eniieueciaaiey MS SQL Server a
Internet/intranet-i?eeiaeaieyo GOTOBUTTON _Toc403054673 PAGEREF
_Toc403054673 21

Caeeth/aiea GOTOBUTTON _Toc403054674 PAGEREF _Toc403054674 24

Nienie eeoa?aoo?u: GOTOBUTTON _Toc403054675 PAGEREF _Toc403054675
25

Aaaaeaiea

Eieue nei?i yoio iaci? iinayuai na?aa?o aac aeaiiuo, iaaiciiaeii ia
oiiiyiooue i oii, /oi nicaeaiea iaoei aeey o?aiaiey e oi?aaeaiey
aeaiiuie yaeyaony, iiaeaeoe, iaeiei ec naiuo cia/eiuo aeinoeaeaiee
/aeiaa/anoaa ni a?aiaie ecia?aoaiey ienueiaiiinoe. Eae ecaanoii, a
ia/aea auei neiai. Neiai, iciaiaiiaaaoaa ia?aoiae io ?aoeaenee a
aini?eyoee ie?oaeathuaai ie?a e aano?aeoiiio iuoeaieth. Aiciiaeii,
eiaiii yoio ia?aai?io a niciaiee ia?ooee ia?aicaeaiioth aa?iiieth e
i?ioeaiiinoaaee /aeiaaea i?e?iaea. Eae au oi ie auei, i?e anae
ia?aie/aiiinoe e eiiaiaioiie iaiieiioa aa?aaeueiiai iauaiey eiaiii neiai
neoaeeo iniiaiui niiniaii ia?aaea/e eioi?iaoeee ii n?aaiaieth, iai?eia?,
n iocueie, oaioeai, aeeaiienueth, a?oeoaeoo?ie e o. ae. A ?aieao oie
ia?aaeeaiu, a eioi?ie naaiaeiy ?aaioaao iao iica, i?aaenoaaeyaony
e??aoeeiiaeueiie aiciiaeiinoue i?inaaoeaiey, ica?aiey, o. a. iaiiaaiiiai
iieo/aiey iaiaoiaeeiuo ciaiee. Inoaaony i?ioeann iinoaiaiiiai iiciaiey
aeaenoaeoaeueiinoe, e aeey yoiai /aeiaae auioaeaeai aue iao/eoueny
nio?aiyoue eioi?iaoeeth, iieo/aiioth ia i?aaeuaeoueo yoaiao. Eeth/aaui
iiiaioii noaei aicieeiiaaiea ciaeiaiai ienueia, eioi?ia, ianiio?y ia
aieueoea eee iaiueoea iioa?e, niiaei iaania/eoue aeieaeiia o?aiaiea
oi?iaeeciaaiiuo ciaiee. Eae ooaa?aeaeatho aio?iiieiae, ca iineaaeiea
ianeieueei aeanyoeia ouny/ eao oeceieiae/aneea ia?aiao?u homo sapiens
i?aeoe/anee ia eciaieeenue – ia?acii aiai?y, iu ia noaee eo/oa aeoiaoue
eee aeoaaea /oanoaiaaoue. Aaeeinoaaiiia, /oi ioee/aao nia?aiaiiiai
/aeiaaea io aai i?aaeoanoaaiieeia – yoi iauai iaeiieaiiie eioi?iaoeee e
oniaa?oainoaiaaiiua niiniau aa ia?aaioee. Eiaiii aeaaeaiea eioi?iaoeeae
iaania/eei i?ia?ann /aeiaa/aneiai iauanoaa, iicaieea eaaeaeiio
iineaaeothuaio iieieaieth iia?aoueny ia iauai ciaiee e iiuoa, nia?aiiue
i?aaeoanoaaiieeaie, e a iauai neo/aa ia ecia?aoaoue caiiai aaeineiaae.

Iaeeiaeiue ?ino ai a?aiaie niaieoiiie aacu ciaiee oeeaeeecaoeee aucaae e
aeecie i?ia?anne?othuoth yaiethoeeth n?aaenoa o?aiaiey, ia?aaioee e
i?aaenoaaeaiey eioi?iaoeee eae eino?oiaioia oiiiaeaiey aa
eioaeeaeooaeueiie iiue. A yoii ?yaeo i?eiaiaiea iineaaeieo aeinoeaeaiee
a iaeanoe eiiiuethoa?iuo oaoiieiaee n?aaieii ii noaiaie aaaeiinoe n
ecia?aoaieai ia/aoiiai noaiea eee aeaaea aai i?aainoiaeeo. Iaaethaeaaony
e ia?aoiay caaeneiinoue: /ai aieaa eciu?aiiua n?aaenoaa eniieuecothony
aeey ia?aaioee eioi?iaoeee, /ai auno?aa ?anooo aa iauaiu, oai aieueoaa
cia/aiea iia i?eia?aoaao i?aeoe/anee ai anao aniaeoao /aeiaa/aneie
aeayoaeueiinoe, a /anoiinoe a yeiiiieea. ?ieue eioi?iaoeee, eae oiaa?a
eee i?aaeiaoa o?oaea, iineo niaa?oaiii iniaue oa?aeoa?. Eioi?iaoeey
n?aaieoaeueii eaaei eiie?oaony aac oua?aa aeey naieo iio?aaeoaeueneeo
naienoa. A ioee/ea, iai?eia?, io oiiiu iaooe, iaeia e oa aea eioi?iaoeey
iiaeao auoue iio?aaeaia iaiaeiie?aoii, a oii /enea iaeiia?aiaiii
?acee/iuie o/anoieeaie oiaa?iuo ioiioaiee. Ana iu aua n o?ieia
iauanoaiaaaeaiey onaieee, /oi o?oae yaeyaony iniiaiui enoi/ieeii
nicaeaiey iaoa?eaeueiuo aeaa. Iaeiaei aeaaea o aaoi?ia o/aiey i
i?eaaai/iie noieiinoe iiaeii ano?aoeoue iuneue i oii, /oi ii ia?a
?acaeoey iaoee aeaaiay aeiey i?e?inoa iauanoaaiiiai aeaaininoiyiey
aoaeao iaoneaaeeaaoueny onei?aiiuie oaiiaie iaiiaeaiey iniiaiiai
eaieoaea a neeo ?inoa oaoie/aneiai i?ia?anna. Iiiaea nia?aiaiiua
caiaaeiua yeiiiienou neeiiiu n/eoaoue, /oi /aeiaa/anoai anooieei a
iinoeiaeono?eaeueiue ia?eiae naiaai ?acaeoey, iniiaiui n?aaenoaii
i?iecaiaenoaa a eioi?ii aoaeao aunooiaoue eioi?iaoeey e ii ioiioaieyi
nianoaaiiinoe ia eioi?oth a iauanoaa oaea ia/ae ii?aaeaeyoueny iiaue
i?aayuee eeann – eiaieoa?eao. Iiaeii i?eieiaoue eee inia?eaaoue yoe
auaiaeu, i/aaeaeii iaeii – a aeayoaeueiinoe nia?aiaiiiai i?aaei?eyoey
eioi?iaoeey noaiiaeony iaeiei ec aaaeiaeoeo i?iecaiaenoaaiiuo ?ano?nia,
auaeaeyynue a naiinoiyoaeueiue oaeoi? oniaoiiai aeciana ec
o?aaeeoeeiiiuo ninoaaeythueo, oaeeo eae eaae?u, eeeaiou, eaiaeu nauoa,
oaoiieiaee. Iaeiiaoe, eioi?iaoeey ia iiaeao iio?aaeyoueny
iaiin?aaenoaaiii: iai?eia?, /oiau onaieoue oaeno, ioaeii, eae ieieioi,
oiaoue /eoaoue. Ionthaea n ?inoii cia/aiey eioi?iaoeee aic?anoaao ?ieue
n?aaenoa aa ia?aaioee. Anee ca/anooth noieiinoue eioi?iaoeeiiiie aacu
ei?ii?aoeee ieacuaaaony auoa i?iecaiaeeiie ath i?iaeoeoeee e oneoa, anee
eioi?iaoeey – yoi anaaaea aeaiueae (e a iauai-oi iaiaeua), oi
iaoaeeaeoaeueii, /oi ?uiie NOAAe ia naaiaeiy ioeaieaaaony a aeanyoee
ieeeea?aeia aeieea?ia.

Oioy i?aaeee iuiaoieo NOAAe nouanoaiaaee ia iyeio?aeiao aua aei
iiyaeaiey a 1969 a. ciaiaieoie noaouee Y. Eiaeaea, iieiaeeaoae ia/aei
oai?ee ?aeyoeeiiiuo aac aeaiiuo, eo iienoeia ianniaia ?ani?ino?aiaiea e
aani?aoeaaeaioiue ?ino iiioey?iinoe iaania/eee “ianoieueiua” aa?eaiou
iaeiia?aiaiii n ie?iaie yeniaineae ia?niiaeueiuo eiiiuethoa?ia. Iaeiaei
o?aaiaaiey ei?ii?aoeaiiai aeinooia e ?ano?nai e iiyaeaiea eieaeueiuo
au/eneeoaeueiuo naoae ia aaca IE i?eaaee e nicaeaieth iaeaieaa
iiiai/eneaiiuo ia naaiaeiy ?aoaiee ia aaca oaoiieiaee “eeeaio-na?aa?”. A
iineaaeiaa a?aiy iaiaoiaeeiinoue iiaeaea?aeee ioeueoeiaaeeeiuo i?iaeoia
(ecia?aaeaiee, aeaeai, caoea) e ?aaiou n ae?oaeie aeaeaie
iano?oeoo?e?iaaiiie aecian-eioi?iaoeee (a?aiaiiua ?yaeu, aaia?aoe/aneea
ea?ou) aucaaea e aeecie aiaae?aiea iauaeoiie eaeaieiaee a noa?ua aeia?ua
?aeyoeeiiiua aacu iacaaeneii io oiai, aeinoeaaeinue ee yoi iieiui
ia?aienuaaieai yae?a eee eioaa?aoeeae aioiauo ?aeyoeeiiiuo e iauaeoiuo
aac aeaiiuo. Eeanne/aneoth aea a oa?ieiao ?aeyoeeiiiie oai?ee NOAAe, eae
ecaanoii, a ia?aii i?eaeeaeaiee iiaeii iienaoue eae eiiieaen ec
eino?oiaioa?ey aeey iiaeaea?aeee oaaeeoe e ioiioaiee iaaeaeo naycaiiuie
oaaeeoeaie, iieueciaaoaeueneiai eioa?oaena aeey aaiaea, iienea aeaiiuo e
eo i?aaenoaaeaiey e aunieio?iaiaauo n?aaenoa ?ac?aaioee i?eeiaeaiee.
Auaeaeaiea a yoie n?aaea naiaia?aciiai eniieieoaeueiiai eioi?iaoeeiiiiai
oeaio?a, i?eieiathuaai ei?ioeea cai?inu io eeeaioia, iouneeaathuaai
iioeiaeueiue iooue eo auiieiaiey e ia?aaeathuaai a ioaao
?acoeueoe?othuea iiiaeanoaa, i?eaiaeeo e ?acaeaeaieth ooieoeee NOAAe,
/anoue ec eioi?uo cae?aieyaony ca na?aa?ii, a /anoue – ca eeeaioii.
O?aaeeoeeiiii ia na?aa? aiceaaathony iaycaiiinoe ii iia?aoeaiiio
eniieiaieth o?aicaeoeee, iiaeaea?aeea oeaeinoiinoe aeaiiuo, iaania/aieth
aaciianiinoe o?aiaiey e aeinooia, iaania/aieth iieueciaaoaeueneeo
niaaeeiaiee e niaethaeaieth /anoe eiaeee i?eeiaeaiey, aieueoae eee
iaiueoae a caaeneiinoe io naiiai eiie?aoiiai i?eeiaeaiey. Anoanoaaiii,
naiay ieieiaeueiay /anoue na?aa?iie eiaeee aeieaeia iaania/eaaoue
i?iaeoe?iaaiea no?oeoo?iie noaiu aacu aianoa n niioaaonoaothueie
ia?aie/aieyie. Ia noi?iia eeeaioa o ian, oaeei ia?acii, inoathony
ae?oaay (eae i?aaeei, ana-oaee iaiueoay) /anoue aecian-eiaeee
i?eeiaeaiey e iieueciaaoaeueneee eioa?oaen. Enoiaey ec anaai neacaiiiai
auoa i cia/aiee e oeaia eioi?iaoeee a nia?aiaiiii ie?a ia aoaeao
aieueoei i?aoaaee/aieai neacaoue, /oi a na?aa?ao aac aeaiiuo (ai anyeii
neo/aa, aeey “aieueoie oanoa?ee”) aiieioeeenue eo/oea aeinoeaeaiey a
iaeanoe eioi?iaoeeiiiuo oaoiieiaee. Microsoft SQL Server 6.5 yaeyaony
iaeiei ec iaeaieaa no?aieoaeueii ?acaeaathueony na?aa?ia aac aeaiiuo ia
?uiea ei?ii?aoeaiuo NOAAe. ?acoiaaony, a ?aieao aeaiiie noaouee
iaaiciiaeii iiae?iaii inoaiiaeoueny ia oa?aeoa?enoeeao yoiai i?iaeoeoa a
oie ia?a, a eaeie yoi oioaeinue au naeaeaoue e eaeie ii, aaconeiaii,
caneoaeeaaao. Iiyoiio iu ia?aie/ei iaoo caaea/o ?anniio?aieai oioy au
iaeioi?uo aaciauo aiciiaeiinoae Microsoft SQL Server 6.5 i?eiaieoaeueii
e ia?a/eneaiiui auoa ooieoeeyi na?aa?a aac aeaiiuo.

A?oeoaeoo?a MS SQL Server 6.5

Neiiao?e/iay ioeueoei?ioeanni?iay a?oeoaeoo?a MS SQL Server
i?aaeoniao?eaaao eniieueciaaiea “?iaeiuo” na?aenia iia?aoeeiiiie nenoaiu
Windows NT aeey oi?aaeaiey iioieaie (threads), iaiyoueth, iia?aoeeyie
aeeneiaiai /oaiey/caiene, naoaauie neoaeaaie, ooieoeeyie aaciianiinoe, a
oaeaea aeey iiaeaea?aeee ia?aeeaeueiiai auiieiaiey iioieia ia
ianeieueeeo CPU. Eniieueciaaiea iioieia Windows NT iicaieyao MS SQL
Server aaoiiaoe/anee ianooaae?iaaoueny i?e ?aaioa ia iiiaii?ioeanni?iuo
ieaooi?iao, /oi eneeth/aao iaiaoiaeeiinoue aeiiieieoaeueiie
eiioeao?aoeee eee i?ia?aiiiie iano?ieee. Iai?eia?, ia Comdex auea
i?iaeaiiino?e?iaaia ?aaioa MS SQL Server ia ieaooi?ia AlphaServer 8400
i?iecaiaenoaa Digital, iniauaiiui 12 i?ioeanni?aie, 28 Aaaeo iaiyoe e
39-oe oa?aaaeoiui o?aieeeuai. A ioee/ea io aieueoeinoaa ?ani?ino?aiaiiuo
NOAAe, auioaeaeaiiuo eiaoue a naiai ninoaaa iaoaieciu aeoaee?iaaiey
yae?a iia?aoeeiiiie nenoaiu aeey iaania/aiey e?inn-ieaooi?iaiiie
ia?aiineiinoe, MS SQL Server iaeaaeaao aeinoaoi/ii eaaeiaaniie
i?ic?a/iie a?oeoaeoo?ie, ia ia?aoyaeaeaiiie ianaienoaaiiuie ae
ooieoeeyie. A ?acoeueoaoa, iai?eia?, i?e niaia oeia i?ioeanni?a ia
o?aaoaony caiiai i?eia?aoaoue MS SQL Server aeey iiaie aiia?aoiie
ieaooi?iu. Ii noaaeony, ii ii?aaeaeaieth, ia ana, ia /ai ?aaioaao
Windows NT (ia naaiaeiy yoi Intel, Alpha, MIPS e PowerPC). Ii ia?a oiai
eae Windows NT caaiaauaaao ana aieueoaa i?eciaiea e ana aaaeouea
i?iecaiaeeoaee NOAAe oaea auionoeee aa?nee naieo i?iaeoeoia iiae yoie
iia?aoeeiiiie nenoaiie eee oaea cayaeee i naiae aioiaiinoe yoi naeaeaoue
a aeeaeaeoaa a?aiy, ecia/aeueiay i?eaioe?iaaiiinoue MS SQL Server 6.5 ia
oanioth eioaa?aoeeth n Windows NT aunooiaao a ea/anoaa iaeiiai ec
na?ueaciuo i?aeiouanoa.

Ia eaaeaeia iieueciaaoaeueneia niaaeeiaiea a MS SQL Server iacia/aaony
ioaeaeueiue ?aai/ee iioie (ii?yaeea 55E) a ?aieao aaeeiiai na?aa?iiai
i?ioeanna. Oae eae eaaeaeue ec yoeo iioieia a aeaenoaeoaeueiinoe
yaeyaony iioieii Win32, ia ieo ?ani?ino?aiythony niioaaonoaothuea
ooieoeee eiio?iey iia?aoeeiiiie nenoaiu, aeeth/ay caueoo iaiyoe, i?aaeea
aeinooia e iai?oaeiaaieth e ieaie?iaaiea auiieiaiey iioieia ai a?aiaie
(thread scheduling). Yoi i?aaeinoaaeyao oeo/oaiiua niiniaiinoe e
ianooaae?iaaieth i?e ?inoa /enea iaeiia?aiaiii ?aaioathueo
iieueciaaoaeae, aeeiaie/aneoth aaeaine?iaeo i?e caa?ocea i?ioeanni?ia e
iiauoaiioth iaaeaaeiinoue, oae eae iieueciaaoaeueneea cai?inu,
eniieiythueany ia ?aciuo iioieao, caueuaiu ae?oa io ae?oaa. Ianiio?y ia
oi /oi ioe niaaeeiaiee ia?aie/ai 1024 iioieaie, aeeiaie/aneia oi?aaeaiea
iieueciaaoaeueneeie niaaeeiaieyie e naiaiaeiuie iioieaie iicaieyao
oaaee/eoue yoo aaee/eio aei 32 767. E?iia yoiai, ae?oaea ioeu iioieia
iiaoo eniieueciaaoueny aeey ia?aeeaeueiiai auiieiaiey iia?aoeee
neaie?iaaiey aeaiiuo, oaeaeaiey e iaiiaeaiey, ?aca?aiiai eiie?iaaiey,
i?iaa?ee oeaeinoiinoe aacu, eiaeaene?iaaiey, aneio?iiiiai iia?aaeathuaai
/oaiey aeaiiuo a eyo ia iniiaa aeai?eoiia i?aaeneacaiey, nicaeaiey e
oi?aaeaiey eo?ni?aie e o. ae.

Naoaaua neoaeau Windows NT iaania/eaatho MS SQL Server iiaeaea?aeeo
i?ioieieia TCP/IP, NWLink IPX/SPX, Named Pipes (NetBEUI), Banyan Vines,
AppleTalk (ADSP) e DECNet. A aa?nee 6.5 e iei aeiaaaeeanue
aeiiieieoaeueiay naoaaay aeaeeioaea – multiprotocol network library,
eioi?ay “oiaao neooaoue” ii?ou TCP/IP, nieaou SPX eee iieiaiiaaiiua
eaiaeu (named pipes), eioi?ua iau/ii auae?athony aeeiaie/anee.
Ianiiiaiiui aeinoieinoaii multiprotocol yaeyaony iaee/ea naoaaiai
na?aena, iaania/eaathuaai acaeiiaeaenoaea iaaeaeo i?ioeannaie i?e iiiiue
auciaia oaeaeaiiuo i?ioeaaeo?, /oi iicaieyao, iai?eia?, eniieueciaaoue
oeo?iaaiea i?e ia?aaea/a aeaiiuo.

I?iecaiaeeoaeueiinoue

Iiiaiiioi/iia yae?i e eioaa?aoeey ni neoaeaaie ieaie?iaaiey iioieia
Windows NT iaania/eaaao aunieoth i?iecaiaeeoaeueiinoue MS SQL Server i?e
ia?aaioea OLTP- e DSS-cai?inia, /oi iniaaiii caiaoii i?e iaeiia?aiaiiie
?aaioa ianeieueeeo nioai iieueciaaoaeae. A iioaeeeiaaiiuo ?acoeueoaoao
ii oanoe?iaaieth MS SQL Server 6.5 ia iaeneiaeueiia /enei iaeiia?aiaiii
?aaioathueo iieueciaaoaeae i?eaiaeeony oeeo?a 3500, oioy ecaanoiu
?aaeueii ?aaioathuea i?eeiaeaiey, aaea iaa?ocea aeioiaeeea aei 5000
iaeiia?aiaiiuo iieueciaaoaeueneeo niaaeeiaiee. Ca ia?eiae n ieoya?y 1995
a. ii aeaeaa?ue 1996 a. i?iecaiaeeoaeueiinoue MS SQL Server, ecia?aiiay
ii oanoai TPC-C (ni. http://www.tpc.org), au?inea n 2454 aei 7521
o?aicaeoeee a ieiooo, o. a. aieaa /ai a 3 ?aca. Aeey n?aaiaiey caiaoei,
/oi aaeaaeiaaiue iauai o?aicaeoeee a ?an/aoiie nenoaia VISA ninoaaeyao
io 10 aei 40 iei. Oaii 7,5 oun. o?aicaeoeee a ieiooo icia/aao, /oi iaeei
MS SQL Server niiniaai i?e ?aaeeia ?aaiou 24o7 ianeoaeeoue iaiiiaei
iaiaa 11 iei. o?aicaeoeee a nooee. Nouanoaoao aua iaeei ia?aiao?, oanii
naycaiiue n i?iecaiaeeoaeueiinoueth, eioi?ue, ia yaeyynue a no?iaii
niunea neiaa oaoie/aneei, i/aiue iiioey?ai ia Caiaaea i?e ioeaiea
aiciiaeiinoae oiai eee eiiai na?aa?a aac aeaiiuo, oae eae io iaai
nouanoaaiii caaeneo noieiinoue aeaaeaiey i?iaeoeoii (cost of ownership).
?a/ue eaeao ia oaeaeueiie oeaia ca o?aicaeoeeth a ieiooo, eiuie neiaaie,
neieueei i?eaeaony caieaoeoue ca aeinoeaeaiea oaeie nei?inoe ia?aaioee
cai?ina. Ca oio aea naiue ia?eiae, a oa/aiea eioi?iai iu ?anniao?eaaee
?ino i?iecaiaeeoaeueiinoe, iieacaoaeue “oeaia/i?iecaiaeeoaeueiinoue”
nieceeny n 242 aei 65 aeiee. ca o?aicaeoeeth a ieiooo, /oi aiai?eo i
?acoiiie noieiinoe nenoai ia aaca MS SQL Server i?e aunieeo o?aaiaaieyo
e nei?inoe ia?aaioee.

?ani?aaeaeaiiay n?aaea oi?aaeaiey

A ninoaa MS SQL Server 6.5 aoiaeeo nauoa 20 a?aoe/aneeo n?aaenoa
oi?aaeaiey e ooeeeo eiiaiaeiie no?iee, eioi?ua e?aoei ioa?aeoa?eciaaiu a
oaae.1.

Iacaaiea E?aoeia iienaiea Eioa?oaen

Eniieiyaiue oaee

SQL Enerprise Manager

Iiuiue oeaio?aeeciaaiiue eino?oiaio iieiiai oi?aaeaiey na?aa?aie a
ianooaaao i?aaei?eyoey, aeeth/ay aacu aeaiiuo, eo iauaeou,
i?aaeoi?aaeaeaiey (alerts), nieaie?iaaiiua ai a?aiaie caaea/e,
oe?aaee?iaaiea e cai?inu. A?aoe/aneee sqlew.exe

SQL Executive Eieaeueiue aaeieieno?aoeaiue aaaio aeey ieaie?iaaiey
caaea/, oi?aaeaiey i?aaeoi?aaeaeaieyie e iiieoi?eiaa aeoeaiinoe MS SQL
Server. Iiaeao auoue aucaai ec SQL Enterprise Manager.

Eiiaiaeiay no?iea sqlexec.exe

Sqlmaint Ii?aaeaeyao ieai iaiaoiaeeiuo ?ooeiiuo aeaenoaee ii
iiaeaea?aeea aacu aeaiiuo: ?aaoey?iay i?iaa?ea oeaeinoiinoe, ?aca?aiia
eiie?iaaiea, ia?ano?ieea eiaeaenia e o. Ae., eioi?ue aiineaaenoaee
aoaeao auiieiyoueny aaoiiaoe/anee. Aiaeiae/iue ianoa? aeeth/ai a SQL
Enterprise Manager.

Eiiaiaeiay no?iea

sqlmaint.exe

SQL Service Manager Sqlservr Eniieuecoaony aeey caionea, inoaiiaa,
i?einoaiiaee e aiciaiiaeaiey aeayoaeueiinoe na?aa?a e aaaioa SQL
Executive. Nai MS SQL Server iiaeao auoue caiouai ec eiiaiaeiie no?iee,
a?aoiaiou eioi?ie ii?aaeaeytho aai oaeouoth iano?ieeo.

A?aoe/aneee, Eiiaiaeiay no?iea

sqlmgr.exe sqlservr.exe

ISQL/w N?aaenoai iino?iaiey cai?inia, aiaeeca ieaia auiieiaiey,
i?iniio?a noaoenoe/aneie eioi?iaoeee e iaeiia?aiaiiiai oi?aaeaiey
iiiaeie cai?inaie a ?acee/iuo ieiao. A?aoe/aneee

isqlw.exe

Isql N?aaenoai eioa?aeoeaiiai aaiaea iia?aoi?ia Transact-SQL, auciaa
nenoaiiuo i?ioeaaeo?, caionea ne?eioia. Eiiaiaeiay no?iea

isql.exe

SQL Security Manager Oi?aaeaiea eioaa?e?iaaiiui ?aaeeiii aaciianiinoe.
A?aoe/aneee

sqsecmgr.exe

SQL Trace N?aaenoai iiieoi?eiaa iieueciaaoaeueneie aeoeaiinoe. Iicaieyao
ioeaaeeaaoue iia?aoi?u Transact-SQL, auciau i?ioeaaeo?, eieoeee?oaiua
eaaeaeui eeeaioii, a ?aaeueiii a?aiaie eee caienuaaoue a aeo?iae.
Iaeaaeaao aici-noyie oeeueo?aoeee. A?aoe/aneee

sqltrace.exe

SQL Performance Monitor Eniieuecoao aeey iiieoi?eiaa niauoee e nai?a
noaoenoeee ii MS SQL Server noaiaea?oiue perfmon.aoa Windows NT ia
iniiaa i?aaeinoaaeyaiiai ei nienea iauaeoia e n/ao/eeia. A?aoe/aneee
sqlalrtr.exe

SQL Alerter Eioaa?aoeey iaoaiecia i?aaeoi?aaeaeaiee n niioaaonoaothueie
neoaeaaie Windows NT Performance Monitor. Eiiaiaeiay no?iea

SQL Transfer Manager Oi?aaeaiea ia?aiinii aeaiiuo e iauaeoia n
?acee/iuo ieaooi?i SQL Server. A?aoe/aneee sqlxfr.exe

BCP (bulk copy) Ia?aiin aeaiiuo iaaeaeo MS SQL Server e oaeeaie
iia?aoeeiiiie nenoaiu (iai?eia?, oaenoiauie). Eiiaiaeiay no?iea bcp.exe

SQL Setup I?eiaiyaony aeey ia/aeueiie onoaiiaee, oaeaeaiey, upgrade,
einoaeeyoeee aeiiieieoaeueiuo eiiiiiaioia e eciaiaiey iano?iae a
eiioeao?aoeee: iiaeaea?aeee naoaauo i?ioieieia, eciaiaiey ycuea, auai?a
eiaeiaie no?aieoeu e ii?yaeea ni?oe?iaee, iiaeaee aaciianiinoe, a oaeaea
aeey ia?ano?ieee aacu aeaiiuo master. A?aoe/aneee setup.exe

Language installation Onoaiiaea iiaeaea?aeee aeiiieieoaeueiie ycueiaie
eioi?iaoeee (iai?eia?, eieaeeciaaiiuo niiauaiee). Eniieuecoaony a
setup.exe. Eiiaiaeiay no?iea langinst.exe

Sort order installation Onoaiiaea eiaeiaie no?aieoeu neiaieia,
/oanoaeoaeueiinoe e ?aaeno?o e ioiioaiey ii?yaeea iaae neiaieaie.
Eniieuecoaony a setup.exe. Eiiaiaeiay no?iea charset.exe

Check upgrade Eniieuecoaony MS SQL Server ai a?aiy upgrade aeey i?iaa?ee
niaianoeiinoe nouanoaothueo iieueciaaoaeueneeo aac. Eiiaiaeiay no?iea
nhkupg65.exe

SQL Client Configuration Utility Iano?ieea eeeaioa DB-Library, ?acee/iuo
naoaauo aeaeeioae e/eee iieueciaaoaeueneeo iieiaiiaaiiuo eaiaeia.
A?aoe/aneee windbver.exe

Makepipe, readpipe Iuoathony ioe?uoue e eniieueciaaoue iieiaiiaaiiue
eaiae iaaeaeo na?aa?ii e eeeaioii. Eiiaiaeiay no?iea
makepipe.exereadpipe.exe

Odbcping I?iaa?ea i?aaeeueiinoe onoaiiaee ODBC-niaaeeiaiey n MS SQL
Server. Eiiaiaeiay no?iea odbcping.exe

Console Eniieuecoaony aianoa n iia?aoi?ii DUMP aeey ?aca?aiiai
eiie?iaaiey, anee ono?ienoaii yaeyaony aeeneaoa. Eiiaiaeiay no?iea
console.exe

Printdmp Oi?iaoe?iaaiiue aeaii noaea aeey ioaeae ioeaaeee. Eiiaiaeiay
no?iea printdmp.exe

Oaaeeoea 1.

E?iia yoiai, MS SQL Server 6.5 aeeth/aao Web-assistant –
i?ia?aiio-ianoa? aeey iiaeaioiaee ioaeeeaoeee ia Web-co?aieoeao aeaiiuo
ec aacu, SQL Mail – ooeeeoo, iaania/eaathuoth eioaa?aoeeth n yeaeo?iiiie
ii/oie MS Mail eee MS Exchange, MS Distributed Transaction Coor-dinator
(MS DTC) aeey i?iaaaeaiey ?ani?aaeaeaiiuo o?aicaeoeee e iaeioi?ua
ae?oaea n?aaenoaa. SQL Server, MS DTC e SQL Executive ooieoeeiie?otho
eae na?aenu iia?aoeeiiiie nenoaiu. Niaeaniaaiiay ?aaioa yoeo eiiiiiaioia
aeinoeaaaony aeaaiaea?y o?aoo?iaiaaie a?oeoaeoo?a SQL-DMF (Dist-ributed
Management Frame-work).

Eaaei ianooaae?oaiay ?ani?aaeaeaiiay n?aaea oi?aaeaiey iicaieyao
cia/eoaeueii oi?inoeoue i?ioeannu oeaio?aeeciaaiiiai eiio?iey iaae
iiiaeie na?aa?aie, eioi?ua iiaoo iauaaeeiyoueny a a?oiiu ii
niia?aaeaieyi aaciianiinoe eee n aaeieieno?aoeaiuie oeaeyie, e eo
iauaeoaie, e eioi?ui ioiinyony:

• ono?ienoaa (devices), ia eioi?uo oece/anee ?aniieaaathony aacu
aeaiiuo;

• ?aca?aiua ono?ienoaa, niaea?aeauea no?aoiai/iua eiiee aac aeaiiuo e
iauaeoia aioo?e iaa;

• aacu aeaiiuo:

• iieueciaaoaee e a?oiiu iieueciaaoaeae;

• oaaeeoeu;

• i?aaenoaaeaiey;

• o?aieiua i?ioeaaeo?u;

• i?aaeea (rules);

• ia?aie/aiey oeia default;

• oeiu aeaiiuo, ii?aaeaeaiiua iieueciaaoaeai;

• logins aeey niaaeeiaiey n na?aa?ii.

SQL Enterprise Manager eioaa?e?oao a naaa ana ooieoeee oi?aaeaiey,
aeeth/ay nicaeaiea aac aeaiiuo e iauaeoia aioo?e ieo, iacia/aiea i?aa
aeinooia, ?aca?aiia eiie?iaaiea, oe?aaee?iaaiea e o. ae. I?e aeaeaiee
eiaaony aiciiaeiinoue aaoiiaoece?iaaoue i?ioeann ninoaaeaiey ieaia
iiaeaea?aeee aacu i?e iiiiue niaoeeaeueiie i?ia?aiiu-iiiiuieea
(Data-base Main-tenance Wizard). ?acee/iua iiaeoiaeu e nenoaiiiio
aaeieieno?e?iaaieth ca/anooth iiaoo niaea?aeaoue ?yae iaeii?eyoiuo
iiiaioia, iai?eia? iaiaoiaeeiinoue auiieiyoue ?aca?aiia eiie?iaaiea aacu
a noaaioo aa/a?ii. Ii oai aea i?e/eiai ?oeiaiaeeoaeue auaaao auioaeaeai
eiiaiaee?iaaoue nio?oaeieeia a eaeie-ieaoaeue oaeaeaiiue oeeeae, aaea
ionoonoaoao aeieaeiui ia?acii iiaeaioiaeaiiue IT-ia?niiae. MS SQL Server
6.5 iicaieyao ?aoeoue yoe i?iaeaiu, ai-ia?auo, ca n/ao
oeaio?aeeciaaiiiai oi?aaeaiey oaeaeaiiuie na?aa?aie, ai-aoi?uo, ca n/ao
iaee/ey iiuiiai n?aaenoaa aeeniao/a?ecaoeee caaea/ ai a?aiaie,
i?aaeinoaaeyaiiai SQL Executive. Aeey eaaeaeie aaeieieno?aoeaiie
ooieoeee iiaeao auoue iacia/ai a?aiaiiie a?aoee aa auiieiaiey.
I?aeoe/anee ana NOAAe niaea?aeao ?acaeoua n?aaenoaa ii eeeaeaeaoeee oao
eee eiuo iaaeaaii?eyoiuo iineaaenoaee. Microsoft SQL Server, iiieii
yoiai, i?aaeinoaaeyao iaoe?iue eino?oiaioa?ee aeeaaiinoeee, iicaieythuee
naiaa?aiaiii i?aaeioa?aoeoue i?e/eiu naiaa. Ooeeeou SQL Performance
Monitor e Alert Manager iiaoo eniieueciaaoueny aeey i?ia?aiie?iaaiey
?aaeoeee na?aa?a ia ?acee/iua eeannu niauoee, aicieeathueo a nenoaia, a
oii /enea e ia aecian-niauoey. Anee, iai?eia?, o?iaaiue caiieiaiey
aeo?iaea o?aicaeoeee i?aacioae iaeioi?ia ii?iaiaia cia/aiea eee ii
ei??aniiiaeaioneiio n/aoo aicieeei “e?aniia” naeueaei, MS SQL Server
iiaeao iineaoue aai (eee oeacaiiui aaie eeoeai) ii yeaeo?iiiie ii/oa eee
ia iaeaeaea? niioaaonoaothuaa i?aaeoi?aaeaeaiea e/eee auiieieoue
i?aaeoniio?aiiue aaie ne?eio, cmd- eee exe-oaee aeey ono?aiaiey ioeaee,
a oaeaea caoeene?iaaoue iiyaeaiea yoiai niauoey a nenoaiiii aeo?iaea. A
oeaeii iiaeii neacaoue, /oi ?ani?aaeaeaiiay n?aaea oi?aaeaiey iicaieyao
nouanoaaiii oi?inoeoue aeeciue aaeieieno?aoi?a aacu aeaiiuo.

SQL-DMO (Distributed Management Objects)

A ea/anoaa i?iiaaeooi/iiai neiy a a?oeoaeoo?a ?ani?aaeaeaiiie n?aaeu
oi?aaeaiey aunooiatho ?ani?aaeaeaiiua iauaeou oi?aaeaiey (DMO), eioi?ua
ea?atho eneeth/eoaeueii aaaeioth ?ieue a eiioeaioeee iino?iaiey MS SQL
Server e iioiio caneoaeeaatho aieaa ouaoaeueiiai ?anniio?aiey. Ii ia?a
oiai eae i?eeiaeaiey i?eia?aoaee ana iaiaa oeaio?aeeciaaiiue oa?aeoa?,
iiaeaea?aeea ?ani?aaeaeaiiuo aac aeaiiuo noaiiaeeanue iaeiei ec naiuo
aeooaeueiuo aii?inia iino?iaiey nia?aiaiiuo NOAAe. Iu oaea eiaee
aiciiaeiinoue oaaaeeoueny, /oi SQL Enterprise Manager iicaieyao
inouanoaeyoue oaeiaiia aaeieieno?e?iaaiea ?ani?aaeaeaiiuo na?aa?ia ec
aaeeiiai oeaio?a, iaeiaei ia?yaeo n yoei oioaeinue au eiaoue
aiciiaeiinoue i?ia?aiiiiai ia?auaiey e aaeieieno?aoeaiui ooieoeeyi ec
aunieio?iaiaauo ycueia. Iau/ii eniieueciaaaoeiny aeey yoeo oeaeae a
ae?oaeo NOAAe noeaia?iui ycueai oeia REXX eee PERL iaaeinoaaaei
ooieoeeiiaeueiuo aiciiaeiinoae, aeaeeioae eeannia, ioeaae/eea e o. ae.

Iiyoiio a neo/aa n Microsoft SQL Server aue eca?ai aieaa ioe?uoue
iiaeoiae: na?aa? aue ?ac?aaioai eae ciaianoii n iaai?ii iauaeoia
oi?aaeaiey, eioi?ua iiaee auoue aucaaiu ec ethaiai ycuea
i?ia?aiie?iaaiey, iiaeaea?aeeaathuaai oaoiieiaeth NII (Component Object
Model). MS SQL Server 6.5 i?aaeinoaaeyao eioa?oaen OLE Automation n
aieaa, /ai 70 iauaeoaie, iaeaaeathueie 1500 naienoaaie.

Yoi icia/aao, /oi oaeoe/anee ethaay ec ia?a/eneaiiuo iaie a i?aaeuaeouai
ioieoa aaeieieno?aoeaiuo caaea/, aeeth/ay iia?aoeee iaae aacaie aeaiiuo,
ia?aie/aieyie (constraints), o?eaaa?aie, oaaeeoeaie, i?aaenoaaeaieyie,
iieyie, eiaeaenaie, iieueciaaoaeyie, a?oiiaie, ioaeeeaoeeyie e i?.,
iiaeao auoue ioi?ieaia eae aucia niioaaonoaothuaai iaoiaea
niioaaonoaothuaai iauaeoa e auiieiaia (i?e iaee/ee i?aa aeinooia) ec
Visual Basic, Visual C++, Visual J++, Visual FoxPro e o. ae. Eae e aeey
anyeiai OLE Automation Server, i?e ?ani?ino?aiaiee i?eeiaeaiey,
eniieuecothuaai auciau SQL-DMO, ia eeeaioa n iiiiuueth regsrv32.exe
aeieaeia auoue ca?aaeno?e?iaaia aeaeeioaea iiaeaea?aeee iauaeoia
sqlole65.dll. Aio, iai?eia?, eae iiaeii i?aaieciaaoue i?iniio?
niaea?aeeiiai oaaeeoeu MS SQL Server ec MS Visual FoxPro 5.0:

FoxPro 5.0:

oSQLServer=CreateObject(“SQLOLE.SQLServer”)

oSQLServer.Connect(“ntalexeysh”, “sa”)

oQueryResults=oSQLServer.Databases(“mydb”).ExecuteWithResults(“select *
from anytable”)

?

for each oColumn in oSQLServer.
Databases(“mydb”).Tables(“anytable”).Columns

?? padc(oColumn.Name,oColumn. Length)+’ ‘

next

for i=1 to oQueryResults.Rows

?

for j=1 to oQueryResults.Columns

?? oQueryResults.GetColumnString(i,j)+’ ‘

next

next

oSQLServer.Close

Iauaeoiay iiaeaeue ieacaeanue ianoieueei iiuiie, iieiie e aeaeie, /oi
aeaaea SQL Enterprise Manager (iaeia ec iniiaiuo ooeeeo a ninoaaa MS SQL
Server) aue iaienai n eniieueciaaieai DMO.

Eioaa?aoeey n yeaeo?iiiie ii/oie

?anniao?eaay ooieoeee aaeieieno?e?iaaiey MS SQL Server 6.5, iu oiiieiaee
i aiciiaeiinoe aaoiiaoe/aneie ioi?aaee niiauaiee ii yeaeo?iiiie ii/oa a
neo/aa aicieeiiaaiey i?aaeoi?aaeaeaiey, i?aauoaiey ii?iaiaiai cia/aiey
iaeiiai ec iieacaoaeae a SQL Performance Monitor eee ia?eiaee/anee ia
iniiaa caieaie?iaaiiiai a?aoeea. A ninoaa na?aa?a aoiaeeo ooeeeoa
SQLMail, eioi?ay iicaieyao i?aaieciaaoue acaeiiaeaenoaea n Microsoft
Exchange Server aeey ioi?aaee e i?eaia niiauaiee /a?ac ?anoe?aiiua
o?aieiua i?ioeaaeo?u, eniieuecothuea auciau ooieoeee MAPI. E yoei
i?ioeaaeo?ai ioiinyony xp_startmail e xp_stopmail aeey caionea e
inoaiiaee SQLMail, xp_sendmail aeey ioi?aaee niiauaiey, xp_findnextmsg
aeey iienea neaaeothuaai niiauaiey a ii/oiaii yueea, xp_readmail aeey
/oaiey niiauaiee e aeiaeaiiuo a ieo oaeeia, xp_deletemail aeey
oaeaeaiey. Ana iie iaoiaeyony a aeaeeioaea sqlmap60.dll e iiaoo
eniieueciaaoueny a ne?eioao ia Transact-SQL, o?aieiuo i?ioeaaeo?ao,
o?eaaa?ao e o. ae. Iai?eia?, a o?eaaa?a ia update iiaeii i?aaeoniio?aoue
iaiin?aaenoaaiioth ioi?aaeo niiauaiey (aac auciaa raiserror, eae yoi
auei i?e ?aaioa n Alert Manager), anee i?ienoiaeeo iiiuoea eciaieoue
eaeea-eeai aaaeiua cia/aiey a aaca aeaiiuo. I?eaaaeaiiay ieaea o?aieiay
i?ioeaaeo?a inouanoaeyao neaie?iaaiea yueea aoiaeyueo niiauaiee e
caienue ia?aiao?ia, iinooieaoeo niiauaiee a oaaeeoeo.

create procedure scaninbox as

declare @msg_id varchar(64), @originator varchar(255), @recipients
varchar(255)

declare @cc_list varchar(255), @subject varchar(255), @date_received
varchar(255)

declare @msg_body varchar(255)

truncate table mysqldb..inbox

while (1=1) begin

exec master..xp_findnextmsg @[email protected]_id output

if @msg_id is null break

exec master..xp_readmail

@[email protected]_id,

@[email protected] output,

@recipients = @recipients output,

@[email protected]_list output,

@[email protected] output,

@date_received = @date_received output,

@[email protected]_body output,

@suppress_attach=’true’,

@peek=’false’

insert into mysqldb..inbox (msg_id, originator, recipients,

cc_list, subject, date_received, msg_body) values

(@msg_id, @originator, @recipients, @cc_list, @subject, @date_received,
@msg_body)

end

SQLMail iiaeao auoue neiioeao?e?iaai aeey aaoiiaoe/aneiai caionea
iaeiia?aiaiii ni noa?oii na?aena SQLExecutive. Na?aen MS SQL Server
aeieaeai auoue noa?oiaai iiae o/aoiie caienueth iieueciaaoaey Windows NT
(user account), eioi?ay iaeaaeaao eieaeueiuie aaeieieno?aoeaiuie i?aaaie
e eiaao niioaaonoaothuea i?aaa a aeiiaia. Eiy aeaiiiai iieueciaaoaey,
iiae eioi?ui oio aoiaeee a Windows NT, aeieaeii niaiaaeaoue n iacaaieai
ii/oiaiai yueea (mailbox name) MS Exchange.

Oa?aeoa?enoeee ycuea Transact-SQL

A iniiaa i?aeoe/anee anao auoaia?a/eneaiiuo ooeeeo eaaeeo eiae ycuea
Transact-SQL. MS SQL Server 6.5 aue ia?aie NOAAe, i?ioaaeoae
na?oeoeeaoeeiiiua eniuoaiey I?aaeoaeuenoaa NOA ia niioaaonoaea aoiaeiiio
o?iaith (entry level) oaaea?aeueiuo noaiaea?oia ia?aaioee eioi?iaoeee
(FIPS) 127.2. Yoe oanou iniiauaathony ia ecaanoiuo noaiaea?oao ANSI
SQL92 e aeeth/atho aeiiieieoaeueiua o?aaiaaiey, a /anoiinoe ii
iiaeaea?aeea o?aoo?iaiaauo a?oeoaeoo?. MS SQL Server 6.5 niaea?aeeo
aieueoia eiee/anoai /a?o e ooieoeee, ioiinyueony e aieaa aunieei o?iaiyi
noaiaea?oa ANSI SQL92 (intermediate e full), iai?eia? ne?ieee?oaiua a
iaieo iai?aaeaieyo eo?ni?u n aaniethoiui e ioiineoaeueiui
iiceoeeiie?iaaieai. Ianeieueei iia ecaanoii, ie iaeia ec NOAAe ia
naaiaeiy ia aeinoeaea iieiiai niioaaonoaey o?iaith ANSI SQL92, aieaa
aunieiio, /ai aoiaeiie.

Transact-SQL aeeth/aao iia?aoi?u aeey eciaiaiey iano?iae na?aa?a,
iieueciaaoaeueneie nannee, i?iniio?a e ?aaeaeoe?iaaiey aeaiiuo,
nicaeaiey e iiaeeoeeaoeee aac e eo iauaeoia. Niiniau iaania/aiey
oeaeinoiinoe aeaiiuo i?aaenoaaeaiu a oaae. 2. A ianoiyuaa a?aiy a MS SQL
Server iiaeaea?aeeaaaony oieueei no?iaee (restrict) oei nnuei/iie
oeaeinoiinoe.

Oei oeaeinoiinoe Iiyniaiey Iaoaieciu eiio?iey

Entity Ii?aaeaeyao caienue eae oieeaeueioth aeey oaaeeoeu nouiinoue
Primary key,

Unique key,

Identity

Domain Ii?aaeaeyao iaeanoue aeiionoeiuo cia/aiee aeey iiey Default,
Check,

Foreign key

Referential Iiaeaea?aeea nnuei/iie oeaeinoiinoe naycae Check, Foreign
key,

Trigger

User-defined Ana i?i/ea aecian-i?aaeea ia o?iaia noieaoea e oaaeeoeu
Trigger, Rule,

Stored procedure

Oaaeeoea 2.

Any eioi?iaoeey ia ia?aie/aieyo, iaeiaeaiiuo ia oaaeeoeo, iiaeao auoue
i?iniio?aia i?e iiiiue o?aieiie i?ioeaaeo?u sp_helpconstraint.
Ia?aie/aiey anaaaea aucuaathony ia?aae o?eaaa?aie. Iineaaeiaaoaeueiinoue
ia?aaioee auaeyaeeo neaaeothuei ia?acii: rules, references, check,
referenced by e caoai triggers. Iiae?iaiay oa?aeoa?enoeea /a?o
Transact-SQL naia ii naaa iiaea au ninoaaeoue ioaeaeueioth noaoueth eee
aeaaea ianeieueei noaoae, iiyoiio iu ia?aie/einy eiinoaoaoeeae eeoue
iaeioi?uo aai iiaoanoa ii n?aaiaieth n i?aaeuaeouae aa?neae MS SQL
Server:

• iia?aoi?u CUBE e ROLLUP aeey nicaeaiey aiaeeoe/aneeo cai?inia i?e
iino?iaiee nenoai iiaeaea?aeee i?eiyoey ?aoaiee;

• iia?aoi? CREATE SCHEMA (nicaeaiea eiioeaiooaeueiiai eiioaeia?iiai
iauaeoa);

• aiciiaeiinoue a?aiaiiie ioiaiu ia?aie/aiee i?e oe?aaee?iaaiee;

• aeiiieieoaeueiua o?aieiua i?ioeaaeo?u aeey iano?ieee i?ioeanna
oe?aaee?iaaiey;

• aiciiaeiinoue oe?aaee?iaaiey aeaiiuo oeia text e image;

• aiciiaeiinoue ?aca?aiiai eiie?iaaiey e caa?ocee ioaeaeueiie oaaeeoeu;

• aiciiaeiinoue eniieueciaaiey iia?aoi?ia DDL aioo?e o?aicaeoeee;

• iiaua iioeee DBREINDEX, PROCCACHE, ROWLOCK, UPDATEUSAGE aeey DBCC;

• iia?aoi? INSERT-EXEC iicaieyao inouanoaeoue iaiin?aaenoaaiioth anoaaeo
?acoeueoaoia auiieiaiey i?ioeaaeo?u;

• iiaeaea?aeea ?ani?aaeaeaiiuo o?aicaeoeee.

Iiieii iau/iuo o?aieiuo i?ioeaaeo? MS SQL Server i?aaeinoaaeyao
aiciiaeiinoue aeeiaie/aneie caa?ocee e auiieiaiey ooieoeee, eioi?ua
iacuaathony ?anoe?aiiuie o?aieiuie i?ioeaaeo?aie e auiieiaiu a aeaea
dll-aeaeeioae. I?eia? oaeie aeaeeioaee, niaea?aeauee ?anoe?aiiua
i?ioeaaeo?u aeey ?aaiou n yeaeo?iiiie ii/oie, iu aeaeaee, eiaaea
?anniao?eaaee eioaa?aoeeth MS SQL Server n MS Exchange. ?anoe?aiiua
i?ioeaaeo?u iauaaeeiaiu a dll-aeaeeioaee a oeaeyo iiauoaiey
i?iecaiaeeoaeueiinoe ii n?aaiaieth n ioi?ieaieai a aeaea ioaeaeueiuo
i?ioeannia. E?iia ?anoe?aiiuo i?ioeaaeo?, aoiaeyueo a Transact-SQL, MS
SQL Server iicaieyao nicaeaaaoue iieueciaaoaeueneea ?anoe?aiiua
i?ioeaaeo?u c eniieueciaaieai eiaea ia C i?e iiiiue MS Open Data Service
(ODS) API. MS ODS yaeyaony iiuiui n?aaenoaii ?ac?aaioee e i?eiaiyaony
oaeaea aeey nicaeaiey oethcia e iaiiaeaea?aeeaaaiui ooaoii
iieueciaaoaeueneei ?ano?nai, i?ia?aiie?iaaiey caaea/ aoaeeoa, ecaauaiey
i niauoeyo e i?. Aeiaaaeaiea iiauo ?anoe?aiiuo i?ioeaaeo? inouanoaeyaony
eiiaiaeie sp_addextendedproc ‘xp_proc’, ‘xp.dll’, aaea xp_proc – iiaay
i?ioeaaeo?a, niaea?aeauayny a aeaeeioaea xp.dll. Oaeaeaiea iaioaeiuo
i?ioeaaeo? i?iecaiaeeo eiiaiaea sp_dropextendedproc. Oae eae ?anoe?aiiay
i?ioeaaeo?a eniieiyaony a aae?aniii i?ino?ainoaa MS SQL Server, i?aai ia
aa aeiaaaeaiea eiaao oieueei nenoaiiue aaeieieno?aoi?. Aeiiieieoaeueiue
o?iaaiue caueou iaania/eaaaony ia?aaio/eeii eneeth/aiee MS SQL Server,
eioi?ue i?aaeioa?auaao na?aa? io naiy a neo/aa ia?ooaiee caueou iaiyoe a
?anoe?aiiie i?ioeaaeo?a.

A aa?nee 6.5 a Transact-SQL aioee o?aieiua i?ioeaaeo?u aeey ?aaiou n
iauaeoaie OLE Automation. Oaeei ia?acii, oaeoe/anee iiyaeeanue
aiciiaeiinoue ienaoue ?anoe?aiiua o?aieiua i?ioeaaeo?u ia ethaii ycuea
i?ia?aiie?iaaiey, iiaeaea?aeeaathuai nicaeaiea ca?aa?ia OLE Automation:
Visual Basic aa?nee 4 e auoa, Visual FoxPro 5.o e o. ae. Yecaiiey?
niioaaonoaothuaai iauaeoa nicaeaaony iaiin?aaenoaaiii a eiaea
Transact-SQL i?e iiiiue o?aieiie i?ioeaaeo?u sp_OACreate. Aeinooi e
naienoaai inouanoaeyaony /a?ac sp_OAGet-Property, sp_OASetProperty.
Aucia iaoiaea i?aaiecoao i?ioeaaeo?a sp_OAMethod. sp_ OAGetErrorInfo
niiauaao eioi?iaoeeth i iineaaeiae i?iecioaaeoae ioeaea, iaeiiaoe,
sp_OADestroy aunaiaiaeaeaao iauaeo iinea aai eniieueciaaiey.

Iaoaieci auciaia oaeaeaiiuo o?aieiuo i?ioeaaeo? (RPC) iicaieyao
i?aaieciaaoue iaaena?aa?iia acaeiiaeaenoaea e yaeyaony iiuiui n?aaenoaii
iino?iaiey ?ani?aaeaeaiiuo aac. RPC icia/aao aucia n iaeiiai na?aa?a
i?ioeaaeo?u, i?eiaaeeaaeauae ae?oaiio na?aa?o aac aeaiiuo. Eeeaioneia
i?eeiaeaiea iiaeao aucuaaoue i?ioeaaeo?o ia naiai iniiaiii na?aa?a,
eioi?ay iayaii aeey eeeaioa iiaeao ii?iaeaeaoue eaneaae auciaia
oaeaeaiiuo o?aieiuo i?ioeaaeo? ia ae?oaeo na?aa?ao. RPC i?aaenoaaeyao
niaie aeinoaoi/ii oaeiaiue niinia ?aaiou n ?ani?aaeaeaiiuie aeaiiuie aac
iaiaoiaeeiinoe aianaiey eciaiaiee a eeeaioneoth /anoue i?eeiaeaiey.

MS Distributed Transaction Coordinator (DTC) e ?ani?aaeaeaiiua
o?aicaeoeee

Nicaeaiea ?ani?aaeaeaiiuo i?eeiaeaiee i?eaiaeeo e oiio, /oi o?aicaeoeee
oaeaea i?eia?aoatho ?ani?aaeaeaiiue oa?aeoa?. No?oeoo?ecaoeey
i?eeiaeaiey a aeaea iiiaeo naiinoiyoaeueiuo eiiiiiaioia niiniaia
nouanoaaiii iiauneoue ianooaae?oaiinoue e iiaoi?ioth eniieuecoaiinoue, a
oaeaea oi?inoeoue aai ?ac?aaioeo. Iaeiaei i?e yoii iaiaoiaeeii eiaoue a
aeaeo, /oi naie a ?aaioa iaeiiai ec eiiiiiaioia (iai?eia?, a ?acoeueoaoa
auoiaea ec no?iy eiiiuethoa?a, ia eioi?ii iia auea caiouaia) ia aeieaeai
neacuaaoueny ia oeaeinoiinoe ooieoeeiie?iaaiey anaai i?eeiaeaiey a
oeaeii, o. a. eiiiiiaio iiaeao a?aiaiii aueeth/eoueny ec niaeaniaaiiie
?aaiou i?eeiaeaiey, ii naycaiiua n iae niiauaiey aeieaeiu auoue
ia?aaioaiu ei??aeoii.

O/anoieeaie ?ani?aaeaeaiiie o?aicaeoeee yaeythony i?eeiaeaiea,
iaiaaeaea?u o?aicaeoeee, iaiaaeaea?u ?ano?nia e naie ?ano?nu,
cao?aaeaaaiua o?aicaeoeeae. A yoie oeaii/ea MS DTC auiieiyao ?ieue
iaiaaeaea?a o?aicaeoeee. Oio DTC, e ia?aiio ec eioi?uo ia?aoeeinue
i?eeiaeaiea, eieoeee?iaaaoaa o?aicaeoeeth, iacuaaaony ia?ae/iui
iaiaaeaea?ii o?aicaeoeee. Ionoue

HRESULT hr; ITransactionDispenser *pTxDispenser;

oiaaea hr = DtcGetTransactionManager(

NULL,

// eiy oinoa DTC, NULL

// icia/aao aeaiiue oino

NULL,

// eiy iaiaaeaea?a o?aicaeoeee

IID_ITransactionDispenser,

// o?aaoaiue eioa?oaen

0,

// ca?aca?ae?iaaii

0,

// ca?aca?ae?iaaii

(void *)NULL,

// ca?aca?ae?iaaii

(void **)&pTxDispenser);

aica?auaao oeacaoaeue ia ia?ae/iue iaiaaeaea? o?aicaeoeee. Iinea oiai
eae i?eeiaeaiea onoaiiaeei niaaeeiaiea n niioaaonoaothuei DTC-na?aenii,
ana inoaeueiua yecaiiey?u DTC, iiaeiyaoeany ia oinoao iaiaaeaea?ia
?ano?nia, yaeythony iiae/eiaiiuie. A ioaao ia aucia i?eeiaeaiey
ia?ae/iue iaiaaeaea? o?aicaeoeee nicaeaao iauaeo “o?aicaeoeey”,
oeacaoaeue ia eioi?ue iiaeii iieo/eoue eae

ITransaction *pTx;

hr = pTxDispenser->BeginTransaction (

NULL,

// oi?aaeythuee eioa?oaen

ISOLATIONLEVEL_BROWSE,

// o?iaaiue ecieyoeee

0,

// oeaae ecieyoeee

NULL,

// ca?aca?ae?iaaii

&pTx);

// Ptr ia iauaeo “o?aicaeoeey”

Eae aeaeii ec i?eia?a, i?eeiaeaiea ia/eiaao ?ani?aaeaeaiioth
o?aicaeoeeth, aucuaay iaoiae BeginTransaction iauaeoa “ia?ae/iue
iaiaaeaea? o?aicaeoeee”. Iinea yoiai iii iiaeao ?aaioaoue n
iaiaaeaea?aie ?ano?nia. Ia?aia ia?auaiea e iaiaaeaea?o ?ano?nia ec
i?eeiaeaiey iaeiicia/ii eaeaioeoeoee?oao oaeouoth o?aicaeoeeth.
Iaiaaeaea?u ?ano?nia, o/anoaothuea a aeaiiie o?aicaeoeee, aeieaeiu
i?iienaoueny a iauaeoa “o?aicaeoeey” i?e iiiiue iaiaaeaea?ia
o?aicaeoeee.

RETCODE rc; HDBC hSrv1, hSrv2;•

rc = SQLSetConnectOption( hSrv1, SQL_COPT_SS_ENLIST_IN_DTC, pTx);

rc = SQLSetConnectOption( hSrv2, SQL_COPT_SS_ENLIST_IN_DTC, pTx);

Iinea yoiai ana ia?auaiey e aacai aeaiiuo io iaiaaeaea?ia ?ano?nia /a?ac
onoaiiaeaiiua niaaeeiaiey auiieiythony io eiaie o?aicaeoeee, iiea iia ia
caaa?oeo naia aeaenoaea.

DbExecSQL(hSrv1,”INSERT INTO…”);

DbExecSQL(hSrv2,”INSERT INTO…”); …

hr=pTx->Commit(0,0,0);•hr=pTx->Release()

Eieoeeaoeey ?ani?aaeaeaiiuo o?aicaeoeee na?aa?ii eiaao ?yae
aeiiieieoaeueiuo i?aeiouanoa ii n?aaiaieth n oieueei /oi ?anniio?aiiie
eieoeeaoeeae ia noi?iia eeeaioa. E iei ioiinyony iaiueoea naoaaua
cao?aou i?e oi?aaeaiee o?aicaeoeeyie, a oaeaea oi, /oi ioeaea ia eeeaioa
ia “iiaeaaoeaaao” o?aicaeoeee a ninoiyiee in-doubt. E?iia oiai, auciau
Transact-SQL aeinoaoi/ii i?inou a eniieueciaaiee. I?e yaiii ii?aaeaeaiee
ana auciau oaeaeaiiuo i?ioeaaeo? ianeaaeotho eiioaeno ?ani?aaeaeaiiie
o?aicaeoeee.

BEGIN DISTRIBUTED TRANSACTION

INSERT INTO ACCOUNTS VALUES (100,20)

EXEC RMTBRANCH.ACCOUNTS.DBO.DEPOSIT

100,20

COMMIT TRANSACTION

I?e iayaiii ii?aaeaeaiee i?e iiiiue onoaiiaie sp_configure “remote proc
trans”, 1 (o?iaaiue na?aa?a) eee set remote_ procedure_transactions on
(o?iaaiue nannee) MS SQL Server ii oiie/aieth ?anniao?eaaao eieaeueiua
o?aicaeoeee, ia/aoua begin transaction, eae ?ani?aaeaeaiiua n
iiaeeeth/aieai DTC, anee a ieo niaea?aeaony auciau oaeaeaiiuo o?aieiuo
i?ioeaaeo?.

Ei??aeoiia caaa?oaiea o?aicaeoeee auiieiyaony i?e iiiiue i?ioieiea
aeaoooaciie oeenaoeee. Eiaaea i?eeiaeaiea aucuaaao iaoiae commit,
iaiaaeaea? o?aicaeoeee iiiaauaao ca?aaeno?e?iaaaoeany iaiaaeaea?u
?ano?nia iiaeaioiaeoueny e oeenaoeee aeaiiie o?aicaeoeee, e, iinea oiai
eae ana iie ecaanoeee i naiae aioiaiinoe, iaiaaeaea? o?aicaeoeee
?annueaao oe?ieiaauaoaeueiia niiauaiea caoeene?iaaoue o?aicaeoeeth. Anee
oioy au iaeei iaiaaeaea? ?ano?nia ia niiauee i aioiaiinoe oeene?iaaoue
o?aicaeoeeth, iia iianaianoii ioeaouaaaony. Iinea niiauaiey i aioiaiinoe
iaiaaeaea? ?ano?nia i?aauaaao a ninoiyiee niiiaiey (in-doubt)
ioiineoaeueii iauaai enoiaea. Oae eae iaiaaeaea?u ?ano?nia
?aaeno?e?othony a o?aicaeoeee, oi iaiaaeaea?u o?aicaeoeee eiatho
aiciiaeiinoue ioneaaeeaaoue ana eo iia?aoeee e o?aiyo aeo?iaeu i
?aoaieyo oeene?iaaoue eee ioeaoeoue o?aicaeoeeth. A naith i/a?aaeue
iaiaaeaea? ?ano?nia oaeaea aaaeao o naay oaeie aeo?iae. Neaaeiaaoaeueii,
anee eiae ianoi naie a naoe, oi iinea aai eeeaeaeaoeee iaiaaeaea?
o?aicaeoeee naycuaaaony n auoanoiyuei iaiaaeaea?ii o?aicaeoeee e
cai?aoeaaao aai ia enoiaeao. Iinea yoiai iaiaaeaea? ?ano?nia eaeao ia
naie iaiaaeaea? o?aicaeoeee e iieo/aao o iaai eioi?iaoeeth i oii, /oi
aeaeaoue n caaenoeie o?aicaeoeeyie. E?iia yoiai, anee enoiae o?aicaeoeee
ecaanoai, DTC i?aaeinoaaeyao aiciiaeiinoue “?o/iiai” ?ac?aoaiey
o?aicaeoeee, /oiau neeoeii aeieai ia aea?aeaoue aeaiiua aeiee?iaaiiuie.

MS DTC niaea?aeeo eiiiiiaiou eeeaioneie e na?aa?iie iano?ieee. Onoaiiaea
eeeaioneiai eiiiiiaioa o?aaoaony oieueei a oii neo/aa, anee aeaiiue
eeeaio aoaeao nai eieoeee?iaaoue ?ani?aaeaeaiiua o?aicaeoeee, a ia
eniieueciaaoue o?aicaeoeee, ia/aoua ia na?aa?iie noi?iia eae begin
distributed transaction. MS DTC aeinoaoi/ii eaaie e oaeiaai a iano?ieea
e oi?aaeaiee. Ii eiaao ieia:

• a ?aciuo enoi/ieeao ii iiaeao oaeaea iacuaaoueny aeiaaeueiui (global)
eee ei?iaaui (root);

• eiioeao?aoeee, iicaieythuaa caaeaoue oaii iaiiaeaiey eioi?iaoeee,
o?aicaeoeee eaeie aeaaiinoe aeieaeiu iieacuaaoueny, ianoi e aieinoue
aeo?iaea, noaoon DTC;

• o?anne?iaee, ioia?aaeathuea niiauaiey io DTC;

• o?aicaeoeee, ioia?aaeathuea noaoon oaeoueo o?aicaeoeee:

• noaoenoeee ii oaeouei e noiia?iui o?aicaeoeeyi.

A ?anniio?aiiii i?eia?a eieoeeaoeee ?ani?aaeaeaiiie o?aicaeoeee ia
noi?iia eeeaioa iu i?ieeethno?e?iaaee eniieueciaaiea eioa?oaenia,
niioaaonoaothueo noaiaea?oo OLE Transaction. OLE Transaction auaiaeii
ioee/aaony io iaeioi?uo ae?oaeo ?ani?ino?aiaiiuo noaiaea?oia oai, /oi
iino?iai ia iniiaa iauaeoiie iiaeaee e iiaeaea?aeeaaao i?eeiaeaiey,
?aaioathuea iaeiia?aiaiii ni iiiaeie iioieaie. OLE Transaction iaeaaeaao
oeo/oaiiuie oa?aeoa?enoeeaie ii n?aaiaieth n ?aiaa ?ac?aaioaiiuie
noaiaea?oaie, eeoaiiuie, iai?eia?, aiciiaeiinoe ainnoaiiaeaiey
(recovery), eieoeee?iaaiiiai iaiaaeaea?ii ?ano?nia. Oai ia iaiaa i?e
iiiiue i?ioeanna XA Mapper MS DTC, auiieiythuaai ?ieue ia?aaiae/eea
iaaeaeo XA e OLE Transaction, iaania/eaaaony ii?aaeaeaiiia
acaeiiaeaenoaea n i?iaeoeoaie, niaianoeiuie ni noaiaea?oii X/Open DTP
XA. MS DTC iiaeao o/anoaiaaoue a o?aicaeoeeyo, eii?aeeie?oaiuo
iiieoi?aie o?aicaeoeee Encina, TopEnd e Tuxedo, aeey eioi?uo ii
auaeyaeeo eae iaeioi?ue iaiaaeaea? ?ano?nia. Noaiaea?o OLE Transaction
niaea?aeeo aiciiaeiinoe ?anoe?aiey aeey ?aaiou n oe?ieei niaeo?ii
o?aicaeoeeiiii caueuaiiuo ?ano?nia, e eioi?ui iiaoo auoue ioianaiu
aeieoiaiou, ia?acu, i/a?aaee niiauaiee e ae?oaea aeaeu ieioi
no?oeoo?e?iaaiiie eioi?iaoeee.

Aeiee?iaee

MS SQL Server eniieuecoao neaaeothuea oeiu aeiee?iaie:

shared – aeey iia?aoeee, ia eciaiythueo niaea?aeeiia aeaiiuo, iai?eia?
select;

update – eiaaea na?aa? iaia?aaaaony eciaieoue aeaiiua, ai a?aiy
iaiin?aaenoaaiiie caiene iaiiaeaiee yoio oei aeiee?iaee eciaiyaony ia
exclusive (aeey oaaeeoe ni.intent);

exclusive – i?e iiaeeoeeaoeee aeaiiuo (insert, update, delete).

Niaianoeiinoue aeiee?iaie ?acee/iuo oeiia i?eaiaeeony a oaae. 3.
Iniiaiuie oeiaie yaeythony shared e exclusive. Aeiee?iaeo oeia update
iiaeii ?anniao?eaaoue eae iaeee iaoaieci aeey ni/aoaiey ia?auo aeaoo
oeiia aeiee?iaie a iaeiie iia?aoeee a oeaeyo i?aaeioa?auaiey acaeiiiai
aeiee?iaaiey o?aicaeoeee (deadlock). Eae i?aaeei, aieueoeinoai
i?ioeannia, iiaeeoeoee?othueo aeaiiua, ninoiyo ec aeaoo /anoae: iiene
(/oaiea) iaiaoiaeeiie eioi?iaoeee e aianaiea eciaiaiee. Caiaoei, /oi i?e
iaee/ee eeanoa?eciaaiiiai eiaeaena ia oaaeeoeo iia?aoeey anoaaee oiaea
ioiineony e iiaeiaiui i?ioeannai – na?aa? aeieaeai nia/aea iouneaoue
i?aaeeueiia ianoiiieiaeaiea iiauo caienae. ?acoiii ai ecaaaeaiea
eceeoiae eiieo?aioeee ?ac?aoeoue ae?oaei o?aicaeoeeyi /eoaoue aeaiiua ai
a?aiy ia?aie oacu oaeiai i?ioeanna. Oiaaea aicieeaao aii?in: ca/ai
aiiaua aaiaeeoue aeiiieieoaeueiue oei aeiee?iaee e ii/aio iaeuecy
iaieoenue ia?auie aeaoiy? Ioaao i/aaeaeai, anee ?anniio?aoue
iaeiia?aiaiii ianeieueei oaeeo i?ioeannia. Iie aoaeoo i?ae?anii
oaeeaaoueny ia noaaeee iienea, ii ie iaeei ec ieo ia niiaeao iiiiiieueii
caia?aoue aeaiiua aeey caiene, oae eae ae?oaea a yoi a?aiy eo /eoatho.
Aeey eneeth/aiey acaeiiie aeiee?iaee a MS SQL Server i?e auiieiaiee
ia?aie oacu aaiaeeony oei aeiee?iaee update, eioi?ue (ni. oaae. 3) ia
aeiioneaao aiaeiae/iua aeiee?iaee ia i?ioyaeaiee ia?eiaea naiaai
aeaenoaey ii ioiioaieth e aeiee?iaaiiui ei aeaiiui.

Oei aeiee?iaee shared update exclusive

shared OK OK X

update OK X X

exclusive X X X

Oaaeeoea 3.

O?iaaiue aeiee?iaee iiaeao ?ani?ino?aiyoueny ia:

• caienue (aeey iia?aoeee insert);

• co?aieoeo – 2-eeeiaaeoiue o?aaiaio aeaiiuo eee eiaeaenia;

• ?anoe?aiea (extent) – 8 iineaaeiaaoaeueiuo no?aieoe, eniieuecoaony i?e
?aciauaiee eee aunaiaiaeaeaiee no?aieoe (iai?eia?, a eiiaiaeao
create/drop eee eiaaea iia?aoeey anoaaee insert o?aaoao auaeaeaiey iiauo
no?aieoe iaiyoe);

• oaaeeoeo, aeeth/ay ana aoiaeyuea a iaa aeaiiua e eiaeaenu.

A neaaeothuae aa?nee aeiee?iaea o?iaiy caiene aoaeao aiciiaeia aeey anao
oeiia o?aicaeoeee. Aeiee?iaea o?iaiy caiene ia iia?aoeee anoaaee
iicaieyao a ia?aoth i/a?aaeue ?aoeoue caaea/o oiaiueoaiey aa?iyoiinoe
eiieo?aioeee a OLTP-nenoaiao n ianne?iaaiiui iaeiia?aiaiiui aaiaeii
eioi?iaoeee (oeie/iue i?eia? – iia?aoeeiiiue aeaiue aaiea), aaea
oaaeeoeu niaea?aeao oieueei iaeeanoa?iua eiaeaenu eee eeanoa?iue eiaeaen
iino?iai ii iiiioiiii aic?anoathuaio eeth/o. Ii oiie/aieth yoa iioeey
aueeth/aia. A oaeouae aaca aeaiiuo aa iiaeii caaeaenoaiaaoue eiiaiaeie
sp_tableoption , ‘insert row lock’, ‘true’.

Nouanoaoao aeeaeaeoe/aneia i?ioeai?a/ea, n eioi?ui iaaa?iyea noaeeeaaeny
eaaeaeue aaeieieno?aoi? aacu aeaiiuo eee ?ac?aaio/ee. N iaeiie noi?iiu,
oi/aony oiaiueoeoue aei ieieioia aa?iyoiinoue noieeiiaaiey eioa?ania
iieueciaaoaeae i?e aeinooia e iaeiei e oai aea ?ano?nai e iioiio
aeiee?iaaoue ana ia eae iiaeii aieaa aeaoaeueiii o?iaia. N ae?oaie –
i/aiue ia oi/aony ia?aa?oaeaoue iaiaaeaea? aeiee?iaie, eioi?ue oeene?oao
eioi?iaoeeth i oii, eoi iaeiaeee aeiee?iaeo, eaeiai oeia, eoi aeaeao,
iiea iia inaiaiaeeony e o. ae. Iai?eia?, a MS SQL Server 6.5 eaaeaeay
aeiee?iaea iaoiaeeony a 32 aaeoa. Aeey ?ac?aoaiey yoiai i?ioeai?a/ey
na?aa? oiaao aaoiiaoe/anee iiauoaoue o?iaaiue aeiee?iaee a neo/aa, anee
aeiee?iaie i?aaeuaeouaai o?iaiy aeaoaeecaoeee noaiiaeony neeoeii iiiai
(lock escalation). “Neeoeii iiiai” – yoi LE Threshold Maximum a
iano?ieeao eiioeao?aoeee na?aa?a, o. a. iaeneiaeueiay ii?iaiaay aaee/eia
/enea no?aie/iuo aeiee?iaie, i?e aeinoeaeaiee eioi?ie i?ienoiaeeo
yneaeaoeey aei o?iaiy oaaeeoeu. Ii oiie/aieth iia ?aaia 200. Aeey yoeo
aea oeaeae eniieuecoaony iano?ieea LE Threshold Percentage – a
ioiineoaeueiii au?aaeaiee e ?acia?o oaaeeoeu (ii ia iaiueoa, /ai LE
Threshold Minimum, /oi iieacii aeey iaaieueoeo oaaeeoe). A ia?niaeoeaa
aiciiaeia ia?aoiay no?aoaaey aeeiaie/aneie aeayneaeaoeee o?iaiy
aeiee?iaee, eiaaea aeiee?oaony caaaaeiii aieueoee o?aaiaio aeaiiuo, /ai
o?aaoaony, ii, eae oieueei iiyaeyaony o?aicaeoeey, eiieo?e?othuay ca
aeaiiua aioo?e aeaiiiai o?aaiaioa, o?iaaiue ia?aie o?aicaeoeee aoaeao
aaoiiaoe/anee oiaiueoai.

Oi?aaeaiea o?iaiai ecieyoeee o?aicaeoeee ia i?ioyaeaiee anaai
niaaeeiaiey (iieueciaaoaeueneie nannee) inouanoaeyaony i?e iiiiue
onoaiiaee set transaction isolation level , aaea
o?iaaiue ecieyoeee iiaeao i?eieiaoue cia/aiey:

read uncommitted niioaaonoaoao o?iaith ecieyoeee 0 noaiaea?oa ANSI, o.
a. i?inoi cai?auaao ?acee/iui o?aicaeoeeyi eciaiyoue iaeie e oa aea
aeaiiua a iaeii e oi aea a?aiy, ii aeiioneaao a?yciia e iaiiaoi?ythuaany
/oaiea e oaioiiu;

read committed (onoaiaaeeaaaony ii oiie/aieth) niioaaonoaoao o?iaith
ecieyoeee 1 noaiaea?oa ANSI, o. a. i?aaeioa?auaao a?yciia /oaiea;

repeatable read eee serializable niioaaonoaoao o?iaith 3 ii noaiaea?oo
ANSI – i?aaeioa?auaao a?yciia /oaiea, a oaeaea aa?aioe?oao, /oi aeaa
iia?aoi?a select a ?aciuo ianoao iaeiie o?aicaeoeee aoaeoo aica?auaoue
iaeeiaeiaue ?acoeueoao, o. a. eneeth/aao iaiiaoi?ythuaany /oaiea e
oaioiiu.

Iineaaeiee, naiue iaaeaaeiue o?iaaiue caueou o?aicaeoeee yaeyaony naiui
iaiioeiaeueiui n oi/ee c?aiey auno?iaeaenoaey, oae eae ca ana
i?eoiaeeony ieaoeoue. Aeey aieaa aeaeiai oi?aaeaiey o?iaiai ecieyoeee
aeey eaaeaeiai iia?aoi?a select iiaeao yaii caaeaaaoueny iioeey
iano?ieee;

nolock oi aea, /oi read uncommitted, – aeaao aiciiaeiinoue /oaiey
a?yciuo (aua ia caoeene?iaaiiuo) aeaiiuo, eioi?ay ia?ae?uaaao
aiaeiae/iua ia?aiao?u eiioeao?aoeee iieueciaaoaeueneie nannee. A
iia?aoi?a select iiaeii oaeaea iaiai?eoue i?iaeieaeeoaeueiinoue
aeiee?iaee aeaiiuo;

holdlock eino?oeoe?oao na?aa? aea?aeaoue aeiee?iaee aei caaa?oaiey
o?aicaeoeee (ii oiie/aieth aeiee?iaee nieiathony n?aco aea ii i?i/oaiee
o?aaoaiuo aeaiiuo;

Oei e o?iaaiue aeiee?iaee:

updlock canoaaeyao i?eiaieoue aeiee?iaeo update aianoi iau/iie shared,
eniieuecoaony, eiaaea neaaeii eaeao iia?aoi? update, iniiaaiiue ia
i?i/eoaiiuo cia/aieyo, /oiau cai?aoeoue update ec ae?oaeo o?aicaeoeee;

paglock canoaaeyao na?aa? i?e ethauo oneiaeyo eniieueciaaoue aeiee?iaee
o?iaiy no?aieoeu;

tablock i?eioaeeoaeueii aeiee?oao oaaeeoeo (shared);

tablockx i?eioaeeoaeueii aeiee?oao oaaeeoeo (exclusive).

I?iniio? oaeoueo aeiee?iaie auiieiyaony i?e iiiiue o?aieiie i?ioeaaeo?u
sp_lock eee /a?ac aeeth/aiea oeaaa o?anne?iaee 1200 ia eeeaioa: dbcc
traceon (3604,1200). Oaeaea iieaciui yaeythony oeaae 1204 e 1205,
eioi?ua auaeatho eioi?iaoeeth i ceooaoeeyo acaeiiie aeiee?iaee
(deadlocks). MS SQL Server iaeaaeaao aiciiaeiinoueth aaoiiaoe/aneiai
iaia?oaeaiey deadlocks eae oeeeeia a oeaii/ea aeiee?iaie. Ii iaoiaeeo
ia?aue i?ioeann, eioi?ue iia au ?aci?aaoue oeeee, oaeaaao aai e
ioeaouaaao ana o?aicaeoeee yoiai i?ioeanna, iaoiaeeaoeany a noaaeee
auiieiaiey. Eae i?aaeei, ei ieacuaaaony oio naiue i?ioeann, eioi?ue
cai?inee aeiee?iaeo, iineoaeeaooth i?e/eiie caoeeeeeaaiey. Iinea yoiai
na?aa? aaia?e?oao niiauaiea ia ioeaea 1205. Anee eeeaioneia i?eeiaeaiea
eiaao ia?aaio/ee ioeaie, ioeaaeeaathuee ioeaeo 1205, oi iii iiaeao
i?aaei?eiyoue niioaaonoaothuea aeaenoaey ii eni?aaeaieth neooaoeee, e
eiia/iue iieueciaaoaeue, nei?aa anaai, aeaaea ia ociaao, /oi eiaea ianoi
acaeiiay aeiee?iaea.

Iaaeaaeiinoue o?aiaiey eioi?iaoeee

A e?eoe/aneeo aeey aeciana i?eeiaeaieyo, eiaaea na?aa? NOAAe aeieaeai
auoue iinoiyiii aeinooiai aeey eeeaioia, aieueoeinoai i?ioeeaeoe/aneeo
?aaio ii iiaeaea?aeea aacu aeaiiuo i?eoiaeeony auiieiyoue oaeoe/anee a
?aaeeia on-line. MS SQL Server iaeaaeaao aiciiaeiinoyie aeeiaie/aneiai
?aca?aiiai eiie?iaaiey aeaiiuo, o. a. aeaaea eiaaea yoe aeaiiua
eniieuecothony e eciaiythony eeeaioaie. A neo/aa naiy iai?oaeiaaiey,
ioeeth/aiey ieoaiey e o. ae. iaoaieci aaoiiaoe/aneiai ainnoaiiaeaiey MS
SQL Server ainnoaiaaeeaaao ana aacu aeaiiuo aei eo iineaaeiaai
oeaeinoiiai ninoiyiey aac aiaoaoaeuenoaa aaeieieno?aoi?a. Ana
caaa?oaiiua, ii ia io?aaeaiiua a aaca o?aicaeoeee ec aeo?iaea
o?aicaeoeee i?eiaiythony e aaca aeaiiuo (yoi oaeoe/anee oi, /oi
i?ienoiaeeo i?e niauoee chekpoint), a iacaaa?oaiiua o?aicaeoeee, o. a.
oa, eioi?ua auee aeoeaiuie ia iiiaio naiy , au/euathony ec aeo?iaea.

Eae iu oaea ioia/aee, aiai?y i neiiao?e/iie a?oeoaeoo?a, iia?aoeee
?aca?aiiai eiie?iaaiey e ainnoaiiaeaiey iiaoo ?ania?aeeaeeaaoueny ia
ianeieueei iioieia e auiieiyoueny iaeiia?aiaiii, eniieuecoy i?aeiouanoaa
aneio?iiiiai aaiaea/auaiaea. Ia eaaeaeia ?aca?aiia ono?ienoai ioaiaeeony
naie iioie. Ia?aeeaeueiia ?aca?aiia eiie?iaaiea iiaeaea?aeeaaao aei 32
iaeiia?aiaiiuo ?aca?aiuo ono?ienoa (backup devices), /oi iicaieyao
auno?i nicaeaaaoue no?aoiai/iua eiiee aac aeaiiuo aeaaea i/aiue aieueoie
aieinoe. Aiciiaeiinoue ?aca?aiiai eiie?iaaiey e ainnoaiiaeaiey
ioaeaeueiuo oaaeeoe, i /ai iu oiiieiaee, ?anniao?eaay Transact-SQL,
iicaieyao yeiiiieoue ianoi e a?aiy, ia auiieiyy eiie?iaaiea anae aacu
?aaee oieueei iaeioi?uo aa iauaeoia. Iaeiaei ?aca?aiia eiie?iaaiea
ioaeaeueiie oaaeeoeu o?aaoao iaeiaeaiey ia iaa aeiee?iaee exclusive a
ioee/ea io ?aca?aiiai eiie?iaaiey anae aacu eee aeo?iaea o?aicaeoeee,
eioi?ua iiaoo auiieiyoueny iacaaeneii io noaiaie aeoeaiinoe
iieueciaaoaeae. ?aca?aiui eiieyi iiaeao auoue iacia/ai i?aaeaeueiue n?ie
o?aiaiey eee aeaoa oo?aou aeooaeueiinoe, aei ianooieaiey eioi?ie ianoi,
caiyoia ia ono?ienoaa yoeie eiieyie, ia iiaeao eniieueciaaoueny aeey
?aciauaiey ae?oaeo ?aca?aiuo eiiee i?e eieoeeaeecaoeee ono?ienoaa. A
ea/anoaa ?aca?aiuo ono?ienoa iiaoo oaeaea i?eiaiyoueny a?aiaiiua
ono?ienoaa, ia aoiaeyuea a ninoaa aacu e ia eiathuea caienae a nenoaiiie
oaaeeoea sysdevices:

DECLARE @tomorrow char(8)

SELECT @tomorrow = CONVERT(char(8), DATEADD(dd, 1, GETDATE()) , 1)

DUMP DATABASE pubs

TO DISK = ‘\\ntalexeysh\disk_d\sql_experiments\pubs.dmp’

WITH INIT, [email protected], STATS

Aeey iaaieueoie aacu aeaiiuo aa aeo?iae o?aicaeoeee iau/ii o?aieony ia
oii aea ono?ienoaa, /oi e naia aaca, e a?oeae?oaony aianoa n iae.
AEo?iaee?iaaiea o?aicaeoeee aaaeaony ii i?eioeeio write-ahead, /oi
icia/aao, /oi ethaia eciaiaiea nia/aea io?aaeaaony a aeo?iaea
o?aicaeoeee e eeoue iioii iiiaaeaao nianoaaiii a aaco. A neo/aa
iaoiaeaeaiey aeo?iaea o?aicaeoeee ia ioaeaeueiii ono?ienoaa nouanoaoao
aiciiaeiinoue ioaeaeueiiai ?aca?aiiai eiie?iaaiey aeo?iaea o?aicaeoeee.
Eae i?aaeei, ?aca?aiia eiie?iaaiea aacu aeaiiuo i?aaiecoaony n iaiueoae
/anoioie, /ai aeo?iaea o?aicaeoeee. Iai?eia?, nio?aiaiea aeo?iaea
o?aicaeoeee auiieiyaony aaeaaeiaaii, a no?aoiaay eiiey anae aacu iiaeao
aeaeaoueny ?ac a iaaeaeth, oae eae a?oeae?iaaiea aeo?iaea o?aicaeoeee
i?ienoiaeeo cia/eoaeueii auno?aa ii a?aiaie e caieiaao iaiueoa ianoa,
/ai aeaii oeaeie aacu. A ioee/ea io ?aca?ae?iaaiey aacu aeaiiuo aeaii
aeo?iaea o?aicaeoeee i/euaao aai iaaeoeaioth /anoue, o. a. ana
caaa?oeaoeany (caoeene?iaaiiua eee aai?oe?iaaiiua) n iiiaioa iineaaeiaai
aeaiia o?aicaeoeee, anee oieueei ia eniieueciaaia iioeey NO_TRUNCATE.
Eiiaiaea DUMP TRANSACTION TRUNCATE_ONLY, i/euathuay aeo?iae o?aicaeoeee,
iieacia a neo/aa aai ia?aiieiaiey, eioi?ia iiaeii eiio?iee?iaaoue,
iai?eia?, iia?aoi?ii DBCC SQLPERF (LOGSPACE). Anee noaiaiue ia?aiieiaiey
aeo?iaea i/aiue auniea, iiaeii i?e aai i/enoea ioeacaoueny io
aeo?iaee?iaaiey oaeoa naiiai yoiai niauoey: DUMP TRANSACTION NO_LOG.
Anee ?aca?aiia eiie?iaaiea o?aicaeoeee ia i?aaenoaaeyao eioa?ana, iiaeii
aeeth/eoue iioeeth i/enoee iineaaeieo caaa?oaiiuo o?aicaeoeee a aaca ii
ianooieaieth niauoey checkpoint. Ciune iaoaiecia checkpoint ninoieo a
ia?eiaee/aneie caiene aeaiiuo ec eyoa ia aeene, /oiau ia aeiioneaoue
a?yciuo aeaiiuo. Oaeiai ?iaea niauoey iinoiyiii aaia?e?othony MS SQL
Server eee aicieeatho ii eieoeeaoeaa iieueciaaoaey. Aeeth/aiiay iioeey
truncate log on checkpoint aa?aioe?oao auiieiaiea n ii?aaeaeaiiie
/anoioie ia?aaio/eeii niauoey aeaenoaee, i?eaeeceoaeueii yeaeaaeaioiuo
eiiaiaea DUMP TRANSACTION TRUNCATE_ONLY.

I?e ainnoaiiaeaiee aeo?iaea o?aicaeoeee niioaaonoaothuea o?aicaeoeee
i?eiaiythony e aaca aeaiiuo. Yoi icia/aao, /oi anee a ia/aea iaaeaee
auea naeaeaia ?aca?aiay eiiey anae aacu, a iioii aaeaaeiaaii
a?oeae?iaaeenue o?aicaeoeee ca eaaeaeue aeaiue, oi i?e iaiaoiaeeiinoe
ainnoaiiaeaiey iiaeieiaaony ninoiyiea aacu ia ia/aei iaaeaee e ia iaai
iineaaeiaaoaeueii iaeaouaathony aeaiiu aeo?iaea o?aicaeoeee ca ana aeie,
i?aaeoanoaothuea iiiaioo ainnoaiiaeaiey. MS SQL Server 6.5 eiaao
aiciiaeiinoue ainnoaiiaeaiey aeaiiuo ec aeo?iaea o?aicaeoeee ia
i?iecaieueiue iiiaio a?aiaie (?acoiaaony, io?aaeaiiue a aeo?iaea) i?e
iiiiue eiiaiaeu LOAD TRANSACTION STOPAT eee a ieia database backup
and restore auai?ii iioeee until time. Ana niaea?aeaueany a yoii aeaiia
o?aicaeoeee, ioia/aiiua caaa?oeaoeieny iinea yoiai iiiaioa, aoaeoo
ioea/aiu.

Aiciiaeiinoue ieaie?iaaiey caaea/ ?aca?aiiai eiie?iaaiey ai a?aiaie e
ionueee niiauaiee ii e-mail a neo/aa oniaoiiai/iaoniaoiiai caaa?oaiey
?anniao?eaaeanue iaie i?e ianoaeaeaiee SQL Executive.

MS SQL Server 6.5 i?aaeoniao?eaaao aiciiaeiinoue ca?eaee?iaaiey
ono?ienoa, ia?aeeth/aiey ia ca?eaeueiua ono?ienoaa a ea/anoaa iniiaiuo,
aueeth/aiey ca?eaee?iaaiey e oie/oiaeaiey ca?eaeueiiai ono?ienoaa oaeaea
“ia eaoo”, o. a. aac inoaiiaee ooaoiie ?aaiou na?aa?a ii ianeoaeeaaieth
iieueciaaoaeueneeo cai?inia. Ca?eaee?iaaiea e aeoieaene?iaaiea ono?ienoa
aeey ?aaiou n MS SQL Server iiaeao auoue oaeaea auiieiaii n?aaenoaaie
Windows NT, a oaeaea ia aiia?aoiii o?iaia (iiaeaea?aeea ?acee/iuo
RAID-nenoai e o. ae.). Ii-aeaeeiiio, neaaeoao i?aaeiieaaaoue, /oi
?aaeecaoeey ia?aiai yoaia eeanoa?iie oaoiieiaee WolfPack aoaeao
iiaeaea?aeeaaoue MS SQL Server 6.5 a ioeacionoie/eauo eeanoa?ao ec aeaoo
oceia. Iiyaeaiea neaaeothuae aa?nee MS SQL Server aeieaeii iaania/eoue
?aaioo na?aa?ia a eeanoa?a eae aaeeiiai ae?ooaeueiiai na?aa?a.

Transfer Manager eniieuecoaony aeey yenii?oa/eiii?oa iauaeoia e aeaiiuo
AAe ia MS SQL Server iaaeaeo ?aciuie aiia?aoiuie ieaooi?iaie, iai?eia?
iaaeaeo i?ioeanni?aie Intel e Alpha, a oaeaea iaaeaeo ?aciuie aa?neyie
MS SQL Server, a /anoiinoe ec aieaa ?aiieo a aieaa iicaeiea eee iaaeaeo
?aaiioeaiiuie (eiathony a aeaeo 4.o e 6.o). I/aiue /anoi i?iaeoe?iaaiea
iauaeoia aacu aaaeaony n iiiiuueth ?acee/iuo a?aoe/aneeo n?aaenoa, ii
i?iaeoiay aeieoiaioaoeey iiaeao o?aaiaaoue no?oeoo?o iauaeoia n
oi/iinoueth aei iia?aoi?ia DDL. Aeey iieo/aiey ne?eioia, iienuaathueo
nicaeaiea ioaeaeueiiai iauaeoa aacu aeaiiuo, iiaeii eniieueciaaoue
eiiaiaeo transfer ec eiioaenoiiai iaith iauaeoa eee aua?aoue
niioaaonoaothuee eeann e eiy iauaeoa a Transfer Manager. E?iia yoiai,
niaea?aeeiia aeaiiuo iiaeao auoue aua?oaeaii/caa?oaeaii i?e iiiiue
ooeeeou bcp (ni. oaae. 1).

Oe?aaee?iaaiea

Iaee/ea ?acaeoiai iaoaiecia oe?aaee?iaaiey a ethaie na?ueaciie nenoaia
oi?aaeaiey aacaie aeaiiuo iaoneaaeeaaaony iaiaoiaeeiinoueth i?eaeeaeaiey
aeaiiuo e ianoai eo iaiin?aaenoaaiiiai iio?aaeaiey, /oi yaeyaony
iniaaiii aaaeiui oaeoi?ii i?e iino?iaiee aeo?ei aeaiiuo a nenoaiao
i?eiyoey ?aoaiee, ?aca?ocee i?eeiaeaiee io ecauoi/iuo ooieoeee
/oaiey/iienea i?e nicaeaiee io/aoia e o. ae. Nicaeaiea ?ani?aaeaeaiiuo
i?eeiaeaiee n eniieueciaaieai n?aaenoa oe?aaee?iaaiey iieiaeeoaeueii
neacuaaaony ia ioiineoaeueiie aaoiiiiee naeoia, iiauoaiee
ianooaae?oaiinoe e i?iecaiaeeoaeueiinoe. O?aaeeoeeiiii a iino?iaiee
?ani?aaeaeaiiuo nenoai aeaiiuo nouanoaotho aeaa iniiaiuo iiaeoiaea.
Iaeei ec ieo iniiaai ia ieioiie oeaeinoiinoe aeaiiuo (loose consistency)
e ?anniao?eaaeny iaie a ioieoa, iinayuaiiii MS Distributed Transaction
Coordinator. I?ioieie aeaoooaciie oeenaoeee aa?aioe?oao eaeaioe/iinoue
aeaiiuo a ethaie iiiaio a?aiaie ia anao oceao naoe, iaeiaei iaiaoiaeeii
eiaoue a aeaeo, /oi yoio iiaeoiae o?aaoao iaee/ey aunieinei?inoiuo
eaiaeia ia?aaea/e aeaiiuo e iinoiyiiie aeinooiiinoe eaaeaeiai ocea.
Ae?oaie iiaeoiae, iniiaaiiue ia neaaie oeaeinoiinoe (loose consistency),
aeiioneaao, aiiaua aiai?y, iaeioi?ue a?aiaiiie eioa?aae iaaeaeo
aianaieai eciaiaiee a i?eaeiae e eo io?aaeaieai a ia?aca. I?eeiaeaiey,
iniiaaiiua ia i?eioeeia neaaie oeaeinoiinoe, yaeythony cia/eoaeueii
iaiaa /oanoaeoaeueiuie e aeinooiiinoe oceia, a oaeaea i?iioneiie
niiniaiinoe e iaaeaaeiinoe eaiaeia ia?aaea/e aeaiiuo. Oe?aaee?iaaiea a
MS SQL Server iino?iaii ia eniieueciaaiee eiaiii aoi?iai iiaeoiaea.

Iniiaiuie aeaenoaothueie eeoeaie a i?ioeanna oe?aaee?iaaiey neoaeao
ecaeaoaeue (publisher), aeeno?eauethoi? (distributor) e iiaeien/ee
(subscriber). Iineieueeo oe?aaee?iaaiea yaeyaony iaiouaieaiie ninoaaiie
/anoueth MS SQL Server, iineaaeiee iiaeao aunooiaoue a ?iee eaaeaeiai ec
ieo. Eiioeao?e?iaaiea e oi?aaeaiea eaaeaeie ?ieueth inouanoaeyaony ec
SQL Enterprise Manager /a?ac oaea ciaeiiua iai SQL-DMO eee n iiiiuueth
iia?aoi?ia e o?aieiuo i?ioeaaeo? ycuea Transact-SQL. ?aieeeaoeeiiiie
aaeeieoeae a ieaia ?ani?ino?aiaiey e iiaeienee yaeyaony ioaeeeaoeey
(publication). Ioaeeeaoeey ninoieo ec iaeiie eee ianeieueeeo noaoae
(articles). Noaoueae ioaeeeaoeee iacuaaaony ioaeaeueiay oaaeeoea eee aa
aa?oeeaeueiue e/eee ai?eciioaeueiue o?aaiaio. Aa?oeeaeueiia
o?aaiaioe?iaaiea inouanoaeyaony auai?ii niioaaonoaothueo iieae oaaeeoeu,
ai?eciioaeueiia – i?e iiiiue oneiaey where eee niaoeeaeueiie i?ioeaaeo?u
ai?eciioaeueiie oeeueo?aoeee (CREATE PROCEDURE – FOR REPLICATION).
Oaaeeoea iaycaia eiaoue ia?ae/iue eeth/. Eae oieueei ia ecaeaoaea
nicaeaiu noaouee, ana oe?aaee?oaiua iauaeou ioia/athony niaoeeaeueiui
i?eciaeii a iaeiii ec iieae nenoaiiie oaaeeoeu sysobjects. E?iia yoiai,
a oe?aaee?oaiie aaca aaaeaony aua o?e ni?aai/iua oaaeeoeu.
Syspublications a ioaeaeueiie no?iea o?aieo eioi?iaoeeth i eaaeaeie
iiaie ioaeeeaoeee. Iia naycaia ioiioaieai iaeei-ei-iiiaei n oaaeeoeae
sysarticles, niaea?aeauae eioi?iaoeeth i noaoueyo e eo
i?eiaaeeaaeiinoueth ioaeeeaoeeyi. Iaeiiaoe, iineaaeiyy, a naith
i/a?aaeue, naycaia ioiioaieai iaeei-ei-iiiaei n oaaeeoeae
syssubscriptions, aaea niaea?aeeony eioi?iaoeey i oii, eaeei
iiaeien/eeai aae?aniaaia eaaeaeay noaouey.

Oe?aaee?iaaiea a MS SQL Server iniiaaii ia aeo?iaea o?aicaeoeee
(log-based). Ia eaaeaeoth oe?aaee?oaioth aaco aeaiiuo ia
aeeno?eauethoi?a caioneaaony i?ioeann iiae iacaaieai log reader, eioi?ue
/eoaao aeo?iae o?aicaeoeee ia ecaeaoaea, auae?aao ioooaea ana
caaa?oaiiua o?aicaeoeee, iiia/aiiua e oe?aaee?iaaieth e ia?aaeaao eo
aeeno?eauethoi?o, ia eioi?ue n oiai iiiaioa aiceaaaaony any aeaeueiaeoay
ioaaonoaaiiinoue ii aeiaaaeaieth yoeo o?aicaeoeee aei iiaeien/eea.
Ecaeaoaeue, oaeei ia?acii, aunaiaiaeaeaaony io anyeie caaiou ii
?ani?ino?aiaieth o?aicaeoeee e ia ?anoiaeoao ia yoi naie ?ano?nu.
Eaaeaeue iiaeien/ee ianeoaeeaaaony ioaeaeueiui iioieii aeeno?eauethoi?a.
Eeeaio, ia?aui caionoeaoee sp_replcmds ia ioaeeeoaiie aaca aeaiiuo,
?anniao?eaaaony ath eae log reader, ana inoaeueiua iiiuoee yoi naeaeaoue
auciaoo niiauaiea ia ioeaea. I?ioeaaeo?a sp_repltrans iicaieyao
iieo/eoue nienie caaa?oaiiuo o?aicaeoeee aacu aeaiiuo, aua ia
ia?aaeaiiuo aeeno?eauethoi?o (eaeaioeoeeaoi? ?yaea, no?aieoea e ioiaoea
a?aiaie iinooieaiey). sp_replcmds niaea?aeeo aua eioi?iaoeeth i naieo
eiiaiaeao, naycaiiuo n yoie o?aicaeoeeae, e e eaeie noaouea ioaeeeaoeee
iia ioiineony. Log reader /eoaao yoe iia?aoeee, ii?aaeaeyao
niioaaonoaothuea ei sql-eiiaiaeu e ieoao eo a aaco aeaiiuo
?ani?ino?aiaiey (distribution database) ia aeeno?eauethoi?a. Aaca
aeaiiuo ?ani?ino?aiaiey eiaao oaaeeoeu MSjobs, niaea?aeauoth
eioi?iaoeeth i o?aicaeoeeyo aeey oe?aaee?iaaiey, naycaiioth eae
iaeei-ei-iiiaei n oaaeeoeae MSjob_commands, eioi?ay ?acaeaaao eaaeaeoth
o?aicaeoeeth ia ioaeaeueiua eiiaiaeu. Eaaeaeay eiiaiaea aeieaeia auoue
ia?aaeaia ii?aaeaeaiiiio iiaeien/eeo, /oi ii?aaeaeyaony a oaaeeoea
MSsubscriber_jobs. Ia ecaeaoaea i?i/eoaiiua o?aicaeoeee ioia/athony eae
ia?aaeaiiua ia ?ani?ino?aiaiea, e oieueei iinea yoiai iie iiaoo auoue
ioooaea oie/oiaeaiu i?e ?aca?aiii eiie?iaaiee aeo?iaea o?aicaeoeee (ni.
auoa). Iai?eia?, i?ioeaaeo?a sp_repldone, ii?aaeaeyy o?aicaeoeeth a
aeo?iaea aacu ecaeaoaey ii ?yaeo e no?aieoea, iiia/aao aa eae
?ani?ino?aiaiioth. I?ioeann neio?iiecaoeee (sync task), iaeei ia
ioaeeeaoeeth, anyeee ?ac i?e iiyaeaiee iiaiai iiaeien/eea nicaeaao
iaiiaaiiue nieiie (snapshot) aeaiiuo ia ecaeaoaea, iiaeeaaeaueo
oe?aaee?iaaieth yoiio iiaeien/eeo. I?e yoii nicaeathony oaeeu noai
aeaiiuo e, nianoaaiii, niaea?aeaiey (bcp-oeia), eioi?ua aoaeoo ia?aaeaiu
iiaeien/eeo i?e ?ani?ino?aiaiee aeey iaania/aiey ia?aiia/aeueiie
eaeaioe/iinoe aeaiiuo.

Ia aeeno?eauethoi?a nouanoaotho aua aeaa aeaea i?ioeanna:
?ani?ino?aiaiea e i/enoea. Caaea/a ?ani?ino?aiaiey nicaeaaony aeey
eaaeaeie ia?u “oe?aaee?oaiay aaca/iiaeienaaoayny aaca”, a caaea/a
i/enoee – aeey ia?u “ecaeaoaeue/iiaeien/ee”. ?ani?ino?aiaiea
(distribution task) i?eiaiyao i?i/eoaiiua ec aacu aeaiiuo
?ani?ino?aiaiey sql-eiiaiaeu e aaca aeaiiuo iiaeien/eea. I?ioeann
i/enoee (cleanup task) oie/oiaeaao ana auiieiaiiua ?aaiou (o. a.
o?aicaeoeee) ec aacu aeaiiuo ?ani?ino?aiaiey /a?ac iaeioi?ue
iano?aeaaaiue eioa?aae (retention period) iinea oiai, eae iie auee
aeiaaaeaiu aei iiaeien/eea. Caaea/a i/enoee iiaeao auoue nicaeaia
a?o/ioth i?e iiiiue sp_addsubscriber, a caaea/a ?ani?ino?aiaiey – eae
sp_addsubscription (sp_subscribe). Ianiio?y ia oi /oi i?aaiecaoeey anaai
i?ioeanna oe?aaee?iaaiey iiaeao auoue caienaia a eiaeao i?e iiiiue
auciaia niaoeeaeueiuo o?aieiuo i?ioeaaeo?, yoa /a?oa eniieuecoaony ia
i?aeoeea e?aeia ?aaeei e aeaaiui ia?acii a oeaeyo ioeaaeee. A iau/iuo
neooaoeeyo iano?ieea e oi?aaeaiea oe?aaee?iaaieai inouanoaeythony ec
a?aoe/aneie n?aaeu SQL Enterprise Manager e ieaie?iaueea caaea/ SQL
Executive.

Ana caaea/e ?aieeeaoeee ia aeeno?eauethoi?a ?aaioatho iiae oi?aaeaieai
SQL Executive (msdb…systasks) e iiae aai eiioaenoii aaciianiinoe.
I?ioeann auiieiaiey ethaie ec ieo iiaeii eiio?iee?iaaoue a ieia task
history. Aeiiieieoaeueiui n?aaenoaii eiio?iey neoaeeo SQL Performance
Monitor, eoaea ia?aaeaaony iaiaoiaeeiay noaoenoe/aneay eioi?iaoeey i
oe?aaee?iaaiee (sp_replcounters). Niaaeeiaiea aeeno?eauethoi?a n
ecaeaoaeai i?ienoiaeeo ia iniiaa DB-Library, a n iiaeien/eeii – /a?ac
ODBC. Oaeei ia?acii, a ea/anoaa iiaeien/eeia MS SQL Server iiaeao
aunooiaoue oe?ieee niaeo? ODBC-aeinoeaeeiuo ?ano?nia, e eioi?ui,
iai?eia?, ioiinyony ae?oaie Access, Sybase, Oracle, DB2 e o. ae.
Oe?aaee?iaaiea a MS SQL Server iniiaaii ia eioaa?e?iaaiiii ?aaeeia
aaciianiinoe (ni. Aaciianiinoue), neaaeiaaoaeueii, iaaeaeo
aeeno?eauethoi?ii e iiaeien/eeii aeieaeiu auoue onoaiiaeaiu
aeiaa?eoaeueiua niaaeeiaiey (trusted connections) n eniieueciaaieai
iieiaiiaaiiuo eaiaeia (named pipes) eee ioeueoei?ioieiea. Anee na?aa?u
iaoiaeyony a ?aciuo aeiiaiao, iaaeaeo aeiiaiaie aeieaeiu auoue
onoaiiaeaiu aeaonoi?iiiea aeiaa?eoaeueiua ioiioaiey. A neo/aa iaaieueoeo
iauaiia oe?aaee?oaiuo aeaiiuo ecaeaoaeue /anoi niaiauaao n
aeeno?eauethoi?ii ia iaeiii MS SQL Server. Ioiaoei oaeaea, /oi na?aa?u,
o/anoaothuea a oe?aaee?iaaiee, aeieaeiu eniieueciaaoue iaeie e oa aea
eiaeiaua no?aieoeu.

MS SQL Server iaeaaeaao iaoe?iuie aiciiaeiinoyie iano?ieee i?ioeanna
oe?aaee?iaaiey. Iu oaea oiiieiaee i ai?eciioaeueii-aa?oeeaeueiuo
o?aaiaioao oaaeeoe a ea/anoaa noaoae ioaeeeaoeee. Ioiaoei, /oi aeey
eaaeaeie noaouee eiaaony aiciiaeiinoue iacia/eoue e oe?aaee?iaaieth
oieueei iaiaoiaeeiua oeiu o?aicaeoeee. Iai?eia?, iiaeii cai?aoeoue
ia?aaea/o iiaeien/eeai o?aicaeoeee oeia “delete” a ?aieao aeaiiie
noaouee. Aieaa oiai, ia eaaeaeue oei o?aicaeoeee iiaeii iano?ieoue aeae
iieueciaaoaeueneeo aeaenoaee ia noi?iia iiaeien/eea. Iai?eia?, i?e
iinooieaiee iiaeien/eeo o?aicaeoeee anoaaee e oaeaeaiey iie aoaeoo
io?aaaouaaoueny, eae iau/ii, a ii i?eoiaea o?aicaeoeee oeia “update” ia
iiaeien/eea aoaeao aucuaaoueny iaeioi?ay o?aieiay i?ioeaaeo?a. Iaeioi?ua
ia?aie/aiey a oe?aaee?oaiuo aeaiiuo auaaao iaoeaeaniia?acii ia?aaeaaaoue
iiaeien/eeo. A yoii neo/aa iie iiia/athony eae not for replication.
I?ioeann neio?iiecaoeee eae naiue aei?iaie a niunea o?aoeea
i?aaeoniao?eaaao aiciiaeiinoue ?o/iiai auiieiaiey neio?iiecaoeee eee
iieiiai ioeaca io neio?iiecaoeee aeaiiuo e ia?aaea/o eneeth/eoaeueii
o?aicaeoeee. Nouanoaoao e ia?aoiay aiciiaeiinoue: iiaeien/eeo n
ii?aaeaeaiiie ia?eiaee/iinoueth aoaeoo iinooiaoue oieueei iaiiaaiiua
nieiee aeaiiuo, a ia eo eciaiaiey.

A caaeneiinoe io aaeieieno?aoeaiiai aeoeaioa MS SQL Server iicaieyao
i?aaieciaaoue iiaeieneo ia noi?iia ecaeaoaey eeai ia noi?iia
iiaeien/eea. Ia?aue aeae iiaeienee (push subscription) eniieuecoaony i?e
oeaio?aeeciaaiiii ?ani?ino?aiaiee, eiaaea iiaeienee nicaeathony
“auoaeeeaaieai” noaoae ia oa eee eiua na?aa?u-iiaeien/eee, eioi?ua iiaoo
ia eiaoue naieo aaeieieno?aoi?ia. Aoi?ie aeae (pull subscription)
i?aaeiieaaaao ecaanoioth aaoiiiieth na?aa?a-iiaeien/eea, aaeieieno?aoi?
eioi?iai ii?aaeaeyao, eaeea ioaeeeaoeee aio i?eieiaoue. Ii oiie/aieth
ana ioaeeeaoeee nicaeathony ni noaoonii aaciianiinoe “iaia?aie/aii”, iie
aeaeiu e ia ieo iiaoo iiaeienaoueny ethaua ca?aaeno?e?iaaiiua na?aa?u
iiaeienee. Ia?aie/aiiay ioaeeeaoeey iiaeao auoue auienaia oieueei oaie
na?aa?aie, eioi?ua eiatho ia yoi niioaaonoaothuea i?aaa.

Aii?inu aaciianiinoe aeinooia

Eae iu oaea ioia/aee, aiai?y i i?aeiouanoaao eioaa?aoeee n iia?aoeeiiiie
nenoaiie, MS SQL Server eniieuecoao a naiae ?aaioa na?aenu aaciianiinoe
Windows NT. Iaiiiiei, /oi Windows NT ia naaiaeiy na?oeoeoee?iaaia ii
eeannai aaciianiinoe N2/A3. MS SQL Server iiaeao auoue iano?iai ia
?aaioo a iaeiii ec o?ao ?aaeeiao aaciianiinoe. Eioaa?e?iaaiiue ?aaeei
i?aaeoniao?eaaao eniieueciaaiea iaoaieciia aooaioeoeeaoeee Windows NT
aeey iaania/aiey aaciianiinoe anao iieueciaaoaeueneeo niaaeeiaiee. A
yoii neo/aa e na?aa?o ?ac?aoathony oieueei o?anoiaua, eee
aooaioeoeoee?othuea, niaaeeiaiey (named pipes e multiprotocol).
Aaeieieno?aoi? eiaao aiciiaeiinoue ioia?aceoue a?oiiu iieueciaaoaeae
Windows NT ia niioaaonoaothuea cia/aiey login id MS SQL Server i?e
iiiiue ooeeeou SQL Security Manager. A yoii neo/aa i?e aoiaea ia MS SQL
Server login name e ia?ieue, ia?aaeaiiua /a?ac DB-Library eee ODBC,
eaii?e?othony. Noaiaea?oiue ?aaeei aaciianiinoe i?aaeiieaaaao, /oi ia MS
SQL Server aoaeoo caaiaeeoueny naiinoiyoaeueiua login id e
niioaaonoaothuea ei ia?iee. Niaoaiiue ?aaeei eniieuecoao
eioaa?e?iaaiioth iiaeaeue i?e onoaiiaeaiee niaaeeiaiee ii iieiaiiaaiiui
eaiaeai eee ioeueoei?ioieieo e noaiaea?oioth iiaeaeue ai anao inoaeueiuo
neo/ayo.

MS SQL Server iaania/eaaao iiiaio?iaiaaoth i?iaa?eo i?eaeeaaee i?e
caa?ocea ia na?aa?. Nia/aea eaeaioeoeoee?othony i?aaa iieueciaaoaey ia
onoaiiaeaiea niaaeeiaiey n aua?aiiui na?aa?ii (login name e ia?ieue) e
auiieiaiea aaeieieno?aoeaiuo ooieoeee: nicaeaiea ono?ienoa e aac
aeaiiuo, iacia/aiea i?aa ae?oaei iieueciaaoaeyi, eciaiaiea ia?aiao?ia
iano?ieee na?aa?a e o.ae. Iaeneiaeueiuie i?aaaie iaeaaeaao nenoaiiue
aaeieieno?aoi?. Ia o?iaia aacu aeaiiuo eaaeaeue iieueciaaoaeue,
caa?oceaoeeny ia na?aa?, iiaeao eiaoue eiy iieueciaaoaey (username) aacu
e i?aaa ia aeinooi e iauaeoai aioo?e iaa. Eiaaony aiciiaeiinoue
ioia?aceoue ianeieueeeo login id ia iaeiiai iieueciaaoaey aacu aeaiiuo,
a oaeaea iauaaeeiyoue iieueciaaoaeae a a?oiiu aeey oaeianoaa
aaeieieno?e?iaaiey e iacia/aiey noiaeiuo i?eaeeaaee. Ii ioiioaieth e
iauaeoai aacu aeaiiuo iieueciaaoaeth iiaoo auoue iacia/aiu i?aaa ia
auiieiaiea ?acee/iuo iia?aoeee iaae ieie: /oaiea, aeiaaaeaiea,
oaeaeaiea, eciaiaiea, aeaeea?aoeaiay nnuei/iay oeaeinoiinoue (DRI),
auiieiaiea o?aieiuo i?ioeaaeo?, a oaeaea i?aaa ia aeinooi e ioaeaeueiui
iieyi. Anee yoiai iaaeinoaoi/ii, iiaeii i?eaaaiooue e i?aaenoaaeaieyi
(views), aeey eioi?uo neacaiiia inoaaony ni?aaaaeeeaui. Iaeiiaoe, iiaeii
aiiaua cai?aoeoue iieueciaaoaeth iaiin?aaenoaaiiue aeinooi e aeaiiui,
inoaaea ca iei eeoue i?aaa ia auiieiaiea o?aieiuo i?ioeaaeo?, a eioi?uo
aoaeao i?iienai aanue noeaia?ee aai aeinooia e aaca. O?aieiua
i?ioeaaeo?u iiaoo nicaeaaaoueny n iioeeae WITH ENCRYPTION, eioi?ay
oeo?oao iaiin?aaenoaaiiue oaeno i?ioeaaeo?u, o?aiyueeny iau/ii a
syscomments. I?aaa ia auiieiaiea iaeioi?uo eiiaiae (nicaeaiea aac,
oaaeeoe, oiie/aiee, i?aaee, i?aaenoaaeaiee, i?ioeaaeo?, ?aca?aiia
eiie?iaaiea aac e aeo?iaeia o?aicaeoeee) ia yaeythony
iauaeoii-niaoeeoe/iuie, iiyoiio iie iacia/athony nenoaiiui
aaeieieno?aoi?ii na?aa?a eee aeaaeaeueoeai (nicaeaoaeai) aacu aeaiiuo
i?e ?aaeaeoe?iaaiee aacu aeaiiuo. Aaeieieno?e?iaaiea iieueciaaoaeueneeo
i?eaeeaaee iau/ii aaaeaony a SQL Enterprise Manager, oai ia iaiaa a
Transact-SQL eiathony o?aieiua i?ioeaaeo?u (sp_addlogin, sp_password,
sp_revokelogin, sp_addalias, sp_adduser) e iia?aoi?u (GRANT, REVOKE),
eioi?ua iicaieytho inouanoaeyoue aeaenoaey ii nicaeaieth iieueciaaoaeae,
iacia/aieth e ioiaia i?aa i?e auiieiaiee ne?eioia. Aeiiieieoaeueioth
aiciiaeiinoue aaeieieno?e?iaaiey i?eaeeaaee i?aaeinoaaeytho
?anniio?aiiua iaie auoa SQL-DMO.

Iaeioi?ua aii?inu eniieueciaaiey MS SQL Server a
Internet/intranet-i?eeiaeaieyo

Eae iu oaea ioia/aee, SQL-DMO yaeythony iaeiei ec iaeaieaa iiuiuo
eino?oiaioia aeinooia e eioi?iaoeee, o?aiyuaeny ia MS SQL Server, e
?aoaiey aaeieieno?aoeaiuo caaea/ ec eeeaioneeo i?eeiaeaiee.
O?aaeeoeeiiiua aii?inu eeeaioneiai aeinooia e MS SQL Server aeinoaoi/ii
iiae?iaii inaauaeenue a eeoa?aoo?a eae ii ioiioaieth e n?aaenoaai
?ac?aaioee Microsoft Visual Tools (ii e?aeiae ia?a i?eiaieoaeueii e
Visual C++, Visual Basic, Visual FoxPro), oae e e i?ia?aiiiui i?iaeoeoai
oe?i Borland, Powersoft e o. ae. I?ia?aiiiua iiaeaee, iniiaaiiua ia
Microsoft Jet Database Engine (Data Access Objects), Remote Data
Objects, DB-Library, ODBC API oi?ioi ecaanoiu e oe?iei eniieuecothony.
Iiyoiio iu aeoeaioe?oai iaoa aieiaiea ia niiniaao ?aaiou c MS SQL Server
6.5 /a?ac Internet.

A?aiaia noaoe/aneeo no?aieoe iauyaeaiee e ?aeeaiu ieiiaaee – ao?iia
?acaeoea aeciana a Internet i?aaeiieaaaao iaiin?aaenoaaiiia o/anoea
eeeaioa a niaa?oaiee naeaeie. Aiai?y ia eniieueciaaiee MS SQL Server i?e
iino?iaiee aeoeaiuo Internet/intranet-i?eeiaeaiee, iu niiaa aeieaeiu
ia?aoeoueny e i?aeiouanoaai aai oaniie eioaa?aoeee ni anaie i?iaeoeoaie
naiaenoaa Microsoft BackOffice. Ia yoio ?ac ?a/ue iieaeao ia Internet
Information Server (IIS).

Iiieii eniieiaiey CGI-ne?eioia MS IIS i?aaeinoaaeyao ?ac?aaio/eeai
aiciiaeiinoue nicaeaiey n iiiiuueth niioaaonoaothuaai i?eeeaaeiiai
i?ia?aiiiiai eioa?oaena (ISAPI) i?eeiaeaiee a aeaea aeeiaie/aneeo
aeaeeioae, caione eioi?uo i?ienoiaeeo a ioaao ia eiiaiaeo eee auai?
eeiea ia Web-no?aieoea. A ioee/ea io CGI, aaea eaaeaeue ne?eio
eniieiyaony eae eiie, iaaeaee Web-na?aa?, i?ioeann, /oi auno?i
“nuaaeaao” ?ano?nu aeaaea aeinoaoi/ii iiuiie iaoeiu i?e aieueoii
eiee/anoaa caoiaeia ia na?aa?, ISAPI-i?eeiaeaiea auiieiyaony a aae?aniii
i?ino?ainoaa Web-na?aa?a, /oi, anoanoaaiii, iiauoaao nei?inoue ?aaiou e
nouanoaaiii yeiiiieo iaoeiiua ?ano?nu. A caaeneiinoe io neiaeiinoe naeoa
e i?eeiaeaiee, dll iiaoo auoue i?aaecaa?oaeaiu iaeiia?aiaiii n caioneii
na?aa?a, eeai iiaea?oaeaoueny/aua?oaeaoueny ec iaiyoe ii ia?a
iaiaoiaeeiinoe. E iaeaieaa ecaanoiui n?aaenoaai ?ac?aaioee i?eeiaeaiee
ia iniiaa ISAPI ioiinyony aoiaeyuee a ninoaa MS IIS Internet Database
Connector (IDC), a oaeaea naiaiaeii ?ani?ino?aiyaiue dbWeb.

Microsoft dbWeb i?aaenoaaeyao niaie oethc iaaeaeo 32-aeoiuie
ODBC-?ano?naie e MS IIS. dbWeb i?aaeoniao?eaaao nicaeaaaiea noaiu,
niaea?aeauae iienaiea aeaiiuo e naycaiiuo n ieie Web-no?aieoe. Ii
iiaeaea?aeeaaao eniieiaiea cai?inia a ?aaeueiii ?aaeeia a?aiaie ia
iniiaa “pull”-iiaeaee ioaeeeaoeee, iicaieyy oai naiui nicaeaaaoue
aeoeaiua Web-no?aieoeu. Microsoft dbWeb no?oeoo?ii ninoieo ec aeaoo
iniiaiuo eiiiiiaioia: dbWeb Service e dbWeb Administrator. dbWeb Service
yaeyaony oeie/iui ISAPI-i?eeiaeaieai, eioi?ia ia?aaaouaaao
iieueciaaoaeueneea cai?inu, iai?aaeyaiua iinaoeoaeai no?aieoeu /a?ac
a?ioca?, e oi?aaeyao niaaeeiaieyie iaaeaeo a?ioca?ii, ODBC-?ano?nii e
IIS. E ooieoeeyi dbWeb Administrator ioiineony nicaeaiea HTML-no?aieoe,
niaea?aeaueo ?acoeueoaou auiieiaiey cai?inia ia iniiaa oaea
oiiieiaaoeony noai, n iiiiuueth eioi?uo inouanoaeyaony oi?aaeaiea
ioaeeeoaiuie aeaiiuie. Noaiu ii?aaeaeytho nai cai?in e no?oeoo?o
no?aieoe. I?e yoii ia o?aaoaony ciaiey HTML eee ISAPI, oae eae a ninoaa
dbWeb Administrator aoiaeeo eioa?aeoeaiue ianoa?-iino?ieoaeue noai
(Schema Wizard), eioi?ue a o?aaeeoeeiiiie aeey ethaie i?ia?aiiu-ianoa?a
iaia?a iicaieyao caaeaoue iiey iienea ii iaoiaeo Query-by-Example (QBE),
aua?aoue iiey aeey ioia?aaeaiey a oaaeeoea no?aieoeu ?acoeueoaoia e
ii?aaeaeeoue ia?aoiaeu ec nienea caienae a ioaeaeueiua no?aieoeu,
niaea?aeauea ?acaa?ioooth eioi?iaoeeth ii oaeouae caiene. Iano?ieeie
niioaaonoaothueo naienoa iiaeii ?ac?aoaoue eee cai?auaoue iia?aoeee
anoaaee, oaeaeaiey e ?aaeaeoe?iaaiey. Aeey i?iaa?ee i?aa iieueciaaoaey
eniieuecoaony nenoaia aaciianiinoe oie NOAAe, e eioi?ie i?ienoiaeeo
aeinooi.

IDC aoiaeeo a ninoaa MS IIS. N iiiiuueth auciaia ooieoeee ODBC API ii
iaania/eaaao i?yioth naycue iaaeaeo iieyie HTML-oi?iu e niioaaonoaothuei
ODBC-aeinoeaeeiui enoi/ieeii aeaiiuo. Aeey aeinooia e aeaiiui e
ioaeeeaoeee ia Web IDC eniieuecoao oaeeu aeaoo oeiia – .idc e .htx. Oaee
n ?anoe?aieai idc (ni. i?eia?) niaea?aeeo anth iaiaoiaeeioth
eioi?iaoeeth i niaaeeiaiee n enoi/ieeii aeaiiuo, oaeno cai?ina, a oaeaea
nnueeo ia niioaaonoaothuee htx-oaee. Oaee n ?anoe?aieai htx (ni. i?eia?)
neoaeeo oaaeiiii no?aieoeu, ia eioi?ie aoaeoo iioaeeeiaaiu aeaiiua ec
aacu, a oaeaea yeaiaiou ioi?ieaiey a aeaea noaoe/aneiai oaenoa, a?aoeee,
aeaeai e o. i. MS IIS ?aniiciaao ?anoe?aiea .idc eae aucia httpodbc.dll,
eioi?ay n/eouaaao http-caaieiaee ec oi?aaeythuaai aeiea ISAPI aeey
ii?aaeaeaiey ia?aiao?ia cai?ina. Httpodbc.dll /eoaao e ?acae?aao
idc-oaee, oeacaiiue a URL. Eiy enoi/ieea, eiy iieueciaaoaey, ia?ieue e
i?. eniieuecothony aeey iiaeeeth/aiey e niioaaonoaothuaio ?ano?no ODBC,
iinea /aai httpodbc ia?aaeaao ia auiieiaiea SQL-cai?in e iieo/aao
?acoeueoaou. ?acoeueoaou eniieuecothony aeey iaiieiaiey caaioiaee a
aeaea htx-oaeea, caoai iieo/aiiue HTML-aeieoiaio MS IIS ia?aaeaao
a?ioca?o.

SQL Web Assistant, aoiaeyuee a ninoaa MS SQL Server 6.5, a ioee/ea io
aeaoo oieueei /oi ?anniio?aiiuo eino?oiaioia, ia yaeyaony
ISAPI-i?eeiaeaieai e ?aaioaao oieueei n MS SQL Server. Web Assistant
eiaao eioa?oaen ianoa?a (wizard), o. a. ninoieo ec ?yaea
iineaaeiaaoaeueiuo oi?i n aii?inaie, ioaa/ay ia eioi?ua, aaeieieno?aoi?
iiaeao nyeiiiieoue a?aiy ii auiieiaieth ?ooeiiiai HTML-eiaee?iaaiey e
iieo/eoue aioiaoth (a HTML-eiaeao) no?aieoeo, niaea?aeauoth ?acoeueoaou
iioaeeeiaaiey i?iecaieueiiai cai?ina e aaca. Iieo/aiiay no?aieoea ia
yaeyaony aeoeaiie a no?iaii niunea yoiai neiaa, oae eae ioaeeeoaony i?e
iiiiue push-iaoiaea, o. a. iaiiaeaiea i?ienoiaeeo ii eieoeeaoeaa na?aa?a
e ia aeiioneaao iaiiaeaiey ni noi?iiu eeeaioa. Iaeiaei na?aa? iiaeao
i?iecaiaeeoue iaiiaeaiea (ia?aaaia?aoeeth) no?aieoeu ia o?eaaa?iie
iniiaa eee ia iniiaa ?anienaiee caaea/ iiae oi?aaeaieai SQL Executive.
Ianoa? ?aaioaao oieueei n aacaie aeaiiuo MS SQL Server e eniieuecoao o?e
o?aieiua i?ioeaaeo?u sp_makewebtask, sp_runwebtask e sp_dropwebtask. I?e
iaiaoiaeeiinoe iie iiaoo eniieueciaaoueny naiinoiyoaeueii a eiaeao
Transact-SQL. I?aaeiieiaeei, iu eiaai eaoaeia oiaa?ia eee ni?aai/iee
eo?nia aaetho e oioei, /oiau ana eciaiaiey a iai aaoiiaoe/anee
io?aaeaeenue ia Web. Aeey yoiai iu ii?aaeaeyai caaea/o ioaeeeaoeee:

sp_makewebtask @outputfile = ‘c:\rates.htm’, @query = ‘select kod, kurs
from rates’,

@procname=web_rates, @resultstitle = ‘Eo?nu aaetho’,

@URL = “http://www.microsoft.com”, @reftext = ‘Microsoft Home Page’,
@whentype=9,

a ia niioaaonoaothuoth oaaeeoeo “aaoaai” o?eaaa?

if exists (select * from sysobjects where id = object_id(‘dbo.tr’) and
sysstat & 0xf = 8)

drop trigger dbo.tr

go

create trigger tr on dbo.rates for insert,update,delete

as exec sp_runwebtask @procname=web_rates

go,

eioi?ue aoaeao aucuaaoue ia?aaaia?aoeeth no?aieoeu anyeee ?ac, eae
oieueei a oaaeeoeo aoaeoo aiineoueny eaeea-eeai eciaiaiey.

Active Data Objects (ADO) a aeinoaoi/ii a?oaii i?eaeeaeaiee neoaeao
VB-eioa?oaenii e OLE DB. Eo ?ieue aeaeeony iniaaiii aaaeiie a ?acaeoee
eiiiiiaioiiai iiaeoiaea e oaoiieiaee oieaa?naeueiiai aeinooia e aeaiiui.
A aeaiiii neo/aa iu ?anniio?ei eo eniieueciaaiea a Microsoft Active
Server Pages (ASP). Aeoeaiua na?aa?iua no?aieoeu i?aaenoaaeytho niaie
eino?oiaio aeey yooaeoeaiie ?ac?aaioee na?aa?iuo Web-i?eeiaeaiee,
eioaa?e?othueo a naiai ninoaaa HTML-eiae, VBScript e eiiiiiaiou ActiveX.
N eo iiiiuueth a oaea nouanoaothuea ia?aaioee eaaei iiaoo auoue ano?iaiu
o?aaiaiou eiaea ia VBScript eee JavaScript, a oaeaea auciau
niioaaonoaothueo iauaeoia ActiveX. Iiieii aaciauo iauaeoia (Application,
Request, Response, Server, Session) ASP iiaeaea?aeeaatho iiiai/eneaiiua
eiiiiiaiou ActiveX, eioi?ua oi?iuatho nicaeaiea e cia/eoaeueii iiauoatho
ooieoeeiiaeueiinoue aeoeaiuo Web-no?aieoe. N?aaee ieo ian a ia?aoth
i/a?aaeue aoaeoo eioa?aniaaoue eiiiiiaiou, iicaieythuea i?aaieciaaoue
aeinooi e aacai aeaiiuo, o. a. ADO. Iai?eia?, ioaeeeaoeey ?acoeueoaoa
cai?ina iiaeao auoue auiieiaia, eae:

Eo?nu aaetho

Eo?nu
aaetho

Eiae Eo?n

Eioa?oaen ADO ec aeaiiiai i?eia?a i?aeoe/anee aac eciaiaiee iiaeao auoue
eniieueciaai i?e ?aaioa n MS SQL Server ec VB, Visual FoxPro e o. ae.
Oaeei ia?acii, n iiiiuueth ADO iiaoo auoue iino?iaiu iieueciaaoaeueneea
eiiiiiaiou aeey ia?auaiey e na?aa?o aac aeaiiuo eae ni noi?iiu
“oienoiai” (Win32), oae e ni noi?iiu oiieiai (a?ioca?) eeeaioa.

Caeeth/aiea

MS SQL Server 6.5 i?aaenoaaeyao niaie iiuiue iieiiooieoeeiiaeueiue
na?aa? aac aeaiiuo, ioee/athueeny aunieie i?iecaiaeeoaeueiinoueth,
auno?ioie inaiaiey e oaeiaiui eioa?oaenii aaeieieno?e?iaaiey. Iiae aai
oi?aaeaieai iiaoo ?aaioaoue aacu aeaiiuo a oe?ieii aeeaiaciia io o?iaiy
n?aaeiaai caaia i?aaei?eyoey aei ?ani?aaeaeaiiuo aac ianooaaa
ei?ii?aoeee. Aeinooi e MS SQL Server aiciiaeai ec aieueoiai /enea
n?aaenoa ?ac?aaioee eeeaioneeo front-end, ianoieueiuo aac aeaiiuo e
ioeniuo i?iaeoeoia. MS SQL Server ecia/aeueii i?eaioe?iaai ia
eioaa?aoeeth n ae?oaeie na?aa?aie MS BackOffice, /oi iicaieyao
iaiin?aaenoaaiii ioaaoeoue ?aoaiea eiiieaeniuo caaea/ aaoiiaoecaoeee
o?aiaiey e ia?aaioee eioi?iaoeee, yeaeo?iiiie ii/ou e aeieoiaioiiai?ioa,
iino?iaiey Internet/intranet i?eeiaeaiee e o. ae. MS SQL Server ?aaioaao
a eae a o?aaeeoeeiiiuo eeeaio-na?aa?iuo ieaooi?iao, oae e a
iiiaio?iaiaauo n?aaeao. Iaeiei ec iniiaiuo eino?oiaioia i?e nicaeaiee
?ani?aaeaeaiiuo iiiaieiiiiiaioiuo i?eeiaeaiee yaeyaony Microsoft
Transaction Server.

Nienie eeoa?aoo?u:

1. Nenoaiu Oi?aaeaiey Aacaie Aeaiiuo #1/97 no?. 30-50. A.A. Ooeaiei.

2. Microsoft SQL Server 6.5. Eiiieaeo aeieoiaioaoeee.

3. MS SQL Server 6.5 Unleashed, by David Solomon, Ray Rankins, et al,
ISBN 0-672-30956-4.

4. Microsoft SQL Server 6.5 DBA Survival Guide, by Mark Spenik & Orryn
Sledge, ISBN 0-672-30797-9.

5. Hitchhiker’s Guide to Visual Basic & SQL Server, by William.R.Vaughn,
ISBN 1-55615-906-4.

6. Clustering Support for Microsoft SQL Server. White Paper.

7. Eanoa? O. “Iniiau Windows NT e NTFS”, Microsoft Press. “?onneay
?aaeaeoeey”, 1996.

8. Transaction Processing,by Jim Gray & Andreas Reuter,ISBN
1-55860-190-2

9. E?oaeeinee Ae. “Iniiau Visual C++”, /anoe IV-V, Microsoft Press.
“?onneay ?aaeaeoeey”, 1997.

10. Inside COM, by Dale Rogerson, Microsoft Press, ISBN 1-57231-349-8.

11. Ooeaiei A. “Microsoft SQL Server e aeoeaiue Internet”. Iaoa?eaeu
Oi?oia “Eioi?iaoeeiiiua Oaoiieiaee’97”.

A ?aciuo enoi/ieeao ii iiaeao oaeaea iacuaaoueny aeiaaeueiui (global)
eee ei?iaaui (root).

Eiiaaea auaeaeytho aua aeiee?iaeo intent. Iaeiaei intent ia yaeyaony
aeiee?iaeie a no?iaii niunea neiaa, yoi iaoea a oeaii/ea oaaee/iuo
aeiee?iaie, i?aaeoi?aaeaeathuay ae?oaea o?aicaeoeee i oii, /oi oaeouee
i?ioeann iaia?ai i?iecaanoe yneaeaoeeth ianooaaa aeiee?iaaiey aei o?iaiy
oaaeeoeu.

Iaiiiiei, /oi iiae a?yciui /oaieai (dirty read) iiieiaaony neooaoeey,
eiaaea o?aicaeoeey O1 iiaeeoeoee?oao caienue, o?aicaeoeey O2 aa /eoaao,
O1 oai a?aiaiai ioeaouaaao eciaiaiey e O2 ?aaioaao n caienueth, eioi?ay
?aaeueii ieeiaaea ia nouanoaiaaea. Iaiiaoi?ythuaany /oaiea (unrepeatable
read) aicieeaao a neo/aa, anee O1 /eoaao caienue, O2 aa eciaiyao e O1
niiaa i?i/eouaaao oo aea caienue. O1, aeaaaeaeu i?i/eoaa iaeio e oo aea
caienue, oaeoe/anee aeaeaea aeaa ?aciuo cia/aiey. Oaioiiu: O1 /eoaao
caiene, oaeiaeaoai?ythuea ii?aaeaeaiiiio oneiaeth, iinea yoiai O2
aeiaaaeyao eee oaeaeyao caiene. Anee O1 iiyoue i?iecaaaeao auai?eo ii
oiio aea oneiaeth, iia iiaeao iieo/eoue iiiaeanoai caienae, ia
niaiaaeathuaa n i?aaeuaeouei.

PAGE

PAGE 25

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Оставить комментарий

avatar
  Подписаться  
Уведомление о
Заказать реферат!
UkrReferat.com. Всі права захищені. 2000-2020