You are on page 1of 82
D. RAMMOHAN Restaaten throvgh Got Cee: 9700309908 Sdeck database sight clrac on it amd seleck westore db Gereal Jab Cehnakan fos xestxe Jo database + Patabose mame we have Peovide Jo Pont in tine: go Stop restoration at panticden fine © From dhtabase. We can seleck db lish . it gres copy h dakotase, © From cevicg Th he kmao Pah bscowse backup fle clice ok. Options Jab Restore options GH over ile the existing dobslase . 2b Yeplaces old dato with ten, deta 1 Presewve the xeptiakon selting « fh Ne check this oplion along with Ls tables some Stowe) Proadues Uke gables , steved ProcedueS all QUtomabtcally Come With — back up. 1 Prompt be foxe Kestoring each backup A ftex Complchng full back UP yestoralt on!) FL Prompls then / gen ofl differential Sk prompt soem. e TH Reskick access to the vestued dakobase , a TF we dort want Endusex to comect , ve check thd : opben by changin Paths ne proide secunly 1 Poink an me, westorattaon Restosakkon df Uotabase Upto Specffic time , re use © Pont fn tine vestorobon — by verg ‘stop— ot’ ¢lause Syotox Restore — Log database name from disk = ‘ peth ’ with skopak 2 ‘to/io/ 2010 15:25:50" Recovery Process : Lhes ever Syl sewer ~estorts 1 Scans leg file om Checks any Un committed data ts thee, ik ts bying to commit tbe cata to mdf means Eraclty gethy, > Foil fwansactons. once the database t%& Xecovered then it stoxts chtabase for uses aceening Pefinibon . Getting dak fiers syslem files Cidf) & called ~ecorer » 2 mainkans gypchentsaben beeen mdf amd Lg? Recoreny options . With oul secovery PrccesS no chtabeses 75 adesstly to Users - hifth secovesy :- upto Last transecbons ft gels from db. Lites no vecowy +; Pokobase LL nob be occewed Until sestovation — completed vith “Sband by <9 dle cam ndt do omy modificotors. Gust we cam «un select Commands means aS Operations Sry We Can penferm. a 3 _aAvtomotion _* » SteAN ( Cell : 9704309994 Avtomalton means schedoling the segulen mambonamce actitie> a the foam dh jobs ca) Meinkenance plem- Yb avtemcle task on salsenven | it USES sql senen Agent Sewices Creating a New job. Expand = aL sewer Agent — wight clicks on jobs ond Seleck New fob. Genevsl Job Name we have te Provide name few fob. ones: Sa ib default cunex 4p alt envyommnent.s Cokegory S Whak type dh job sWebare select From chopdamn | mostly we select * patabose Man tenane” De Soapbon we have bo prosdben Some esexiph on about job , this & ophonol”” Enabled fb Ne check ow feb enables By we UNchece , gob Will disable Steps Jab fleck New Step name we hore Protde nome & Backup Type Wanseck - sql sowpt Ruwas Adminastex Pivolage Pensons only wens jobs . OM which db ithas bork ki Mosby Database command .: we have Provde beck UP Command and Clice pane fox Checking errs . Ex: beceup db dbname bo dse = SG.) 2. path ~ bok” Advanad con sucess i; Nhek we haw to do obtes sce ve howe spect fy. - on failuve 3 once fob & faled | Fem welry oltempls it wetvies specified 1y df hres. Reby abbempls 3 ,means St by fox abe then | tt sends fetlwe veport to Uses. Rebry fokesvel + How much bme ft has ty toke fox vebying ASlex \baauPp we need to Vert fy. ~ Schedules Ab bei time tt has to Perfo this fob. we one spec fying here to sql sewer, New : Seleck New schedule ” Nem 5 we have to Provide name fw schedule Ee = Dolly back up Scheduletype : | rbtly we Use type as Yeconing Alests & Netficobons hab sylsevver Needs to do when job is fatled fb we want sends nobfakens to ow Email ev Pages GO Net send C yehoo Mexsenge® cory Greggle talk) Saxget Te b o Process oh wibog Scxiph iN oresenven omd tk can tangeted means execuled in multf Server Sin wallime Alewbb | Nat ficabens wil be Pen fone by 34 party tolls - They maintans centaliged Sewers to monibos evey thing and sends mail to alt Server Vex . ASiey creoking Job | Ne can Penform tart and Stop dk job by cliceieg on job. 2h. We Can migsol. fobs fiom ane sewers bo Othex sewer. Right clic an job > Go to scépt Jobas —, cory the Job an connecting te arstey sewer. BS Sa Modigy any Job Steck job > Goto prperbes Sdeck edit wy scheduko P tAMMOHAN Jobs Socom QD ave clove Faluee [k) wd Play BJ means fob onnng a wetey. Viewing Job Hiskoxy. select the job and & bo view History | Vere it : Qives complele in formakien about job : Hew many times this job sums. Whelha job is Sled 7 Gs) Suces OW cktols Le an get fran here, . rouble Shadting Jobs. on Failue — expand job ident fy hous meuny abeps passed and hao . thamy Steps failed . Each and every failuee step hes to ofn and ~ wead weasom fos fotluce. a 1 * Gecvsity D, RAMMOHAN Cell: 9704309094 Bn Sql aewes we maintan 3 Searity Lavel.s \. sexes Level Rs Datalase Level 3. object Level Login is used to comeck to the We hove 2. types df logins. Windows begin Slsewes login. Kitedaas login Sql a Sindaws senveg ony DBAS and othey adminstatas Use the Legiins - They Gn Connect bo chbabase sere directly - The gaine, account used to Connect to tuindows also. logins wll stoxe Tm Achve df Provide best seconily Hiadous account Nectony | indows lag tng Sql cewex Log ” GF for the End user Who Comneck from aplicabon server ond gets chin From, Catalase senven En ths olt lagros stored Th “Hestey? detabase doy “syslegins: table En Providing seats Ue hove to Conside¥ 1 Authentt cakan 2. Authos? satan 3+ Encryption. Authentiatton Evexy login When. Cernnec ting to eewes it has to validot’ st te vold coo mdb. Zt has te Volidoks bo. Whe thes tncews and wisewes logins. Ihew ore atyps Windows mode Authentication and Mixed rede = Authesbcels, Windews mode Th we check/enable this mode it allows only winckws leging only When legin Netidoles iF chet, Fo Ackive divectly only 6 Mixed Mode - Bk alleos windows and sylsowen logins» when ever ony logit a outhenticates grvat ik chects in ActVE 4 Wvectory tg ndt ferrd then fk checrs ta SaLlegine” tobe establish connection. > Dedabase Level Ne need a Uses acco to access the chtobase. LSet need ® jl Legin acaant amd | User account Gn sqlseren we have a Concepk * Usa mapmeg? to Compeck — legin acceamt ith Ute account fay accerng ° * the databose - 2b & Caled 4-4 User mapping Per databson, Di $ ference. > Login account G a Sewer level objec , tt has snr Level PenminsionS wheneor Urn accomt o a database Level cect ot har ott database Level Rermisions. Meh Do ” D, RAMMOHAN — Cell : 9704309994 Creals login Every Login has 4 propsties Lego nome , pomnord , defavit database, defaut Leanguage. legin name and pasword tre hanes te provide Whak ev Be wank . Default db & to which dotabue tt devectly cennechn When ever login comecls tt ivectly acces defaut dh Defaule Language. genevlly English. le Can see al lagine unden' Securit; Vo creole New login — Urcky logins. Rigbt click on gin Select Creale login. Gerevol ab Login name 5 ie have bo Protide name for ow legion Select eSttexs — Utnchus Sql Seven authentication Pastries , confism password + He howe bo. Provide Ofc Pass Word Palicy Tf 4uN secpol. msc. He get secenily settings there Wwe See wWhak Pdlicy ve axe basing Secs Like Possneidl length, Pass inovd Strength . time Period) , Comple xily then ou Password — be come Complex. 2b the chee they ophan ic opplies ott dettings Wo Ex force pasword Expisak on The passiordd = exper ables Some time period beer most change parsrord ot next login. (when uses login Beak time, salseren Prernpts a Mewage fo change possiind , °F we check this Pefoulk dolebase : Moastes De faul k Langooge English cick oK- Sewer Roles Jeb 24s admin He hat Highest privilage , he cn do any #” Set upadmic Thid le ured to Goofiguie setup Uke & Mreosng , weplcaten , —thacl Paaly tools, Seven admin Disk admin , He Gan odd/ delete Sipege C disks) Process admin + He can Configuie sewer He. Monibex oll Psocess and he can KIL amy Process Db cveotos We con Creale chtobarce , alles 5 dup db - He con Perform backup and vestuation Seanty odin - He an add newlagine , delete laging Balk adiun | Brodex kwon bak Programs sex Mapping: Job | 2b We wank to accexs dokcbse and bo perfenn operctons He wapped lagin accomb Wilh Uses account - . a mapping Can be come by Std Csecunily id) Li have pepevals Every login od. By using this Me Can say bosth SCCounls axe mapped . Secucbles tab Go and belect MAE Ds the be ~Stotus gob Ratabase «des Ob seconly adn, db- aonev db- coboverdes dt - writes db - deny dale ‘reodex : db- deny date wiles + db- BS admn Ab- bace up aperatey db- access ad mio objecls Bei SPS wi Jobles Ne give Execcle, Alten Perintniore only He can Creole and d¥op User accourt. He can de any ‘thing of database . He can yun only selecl commands We Gen modkifcotens, He dan Tnsewt , delete and oPpdele dato. Yrevenbng ead Permissions Preventing Insest cllele § Update He can Create /altes/ dyop objects 2h te wank be tote backup we Need the vd . D, RAMMOHAN i Cell: 9704309904 Objeck Levet powmissions Giving Perumintsione bo user on obj Proceduses, fimchons, Views eke ecls Dico Tabler stored », Gronk - Geving | Peamansion’ to uses oN Paakcubr objets With grant - By vsing giank User Con gre permission . to sth usexs. By vsng D- sqb- Do creole {agin Creole lagin Login pane - Jo add legia accont. Syohos ep- add leg sp_add login ‘andia.’ ‘sndiaina’ ¢ Mostex’, i033 Capbr wal! Usex name “Parsnoic “defautt db ‘default Loe i Jo assgr scenes xcle. | Eyotar \ sp-add Sw xdle member ‘Lagin pane.’ Cycle name.’ » & sp add Sw ve member '-text User? “sysadmin” Jo dyop 8p — dwop sev Ydle membe% —‘logioname’ Cxdlename’ Jo osing database rd. . Sp-add xdle membex “Usexname’ ‘de name? 7 Ge sp-add vdle membex * yams” © dbounex’ a to Befautt sheema & dbo (user dey } Sys velele Syston objels D. RAMMOHAN Coil : 9704309994 Jo creals. schema Select database -» go to Seah > seleck sdhenas Hghl cee and select Creole ren schema: Enes ypttan Ve anc. decoding deta Lith am Lunderstandable formal amd ending acsoss the Netwosk, hen f veaches bo USe~ We Can cConvest fit to inderstandeble -fomak. Gn oxden bo - prortde high seanily do deka ne are Hike &n Mosioing for sending dala Gom one server to another sewer we have “Dota enceyplton” oplion. Pinctples Piociple> are objecls ) go when Le axe ghieg Permt aston.s &e login accomt, USex account ete., Pavilages/ Permissions Haw .. we axe, grorkng Paiviloges to acceas 0b) ecls, Ex:- Sewer xdles , DBYdles, Grant), ¥evoke deny Securables Fo which objeckh we ane Prov ding Secomly Ex :- Servers , DakaborxeObjecls Uke, Tables, sp eke, Jo otign Peamisicn on object Grant Exec on objek te Usevnome Grant “Exec on objech te Usecnamne With guamt Jo crake login ty windoos Gseale login legin name. Foor windws Enhencements in Secudly From Recs. Bn 2000 Sesvet |, Tf we Hank to wetweve Gmy cok” tt token t1me , from Saléewer 2005 onwands chem: Antse duced Schemo Shenae & a. Ssbuchxe ‘Intewally to giup objects. » Hhen We one Searching the olajects FF ne give Schema” TE seonches foatly . using Schema We Sganize deta, iO Proper ender by grouping objects Ss. suppde be have S000: objects wetvete. amy abject \f He wank to . he hove © Scan atl Objeck tn Sl 2000, here cwnership Concept & thee. tt tatatin? ; 5 Fyrom ROS be ave Creating Schema fnaide the database | %f we! wank Search auny Posticuler Object ” te searches fa portialan schema 56 seaach lie ceomediy Fost Select «x from msdb. dbo. back up history ; = default Schana.. ' Dek - D. RAMMO: Jo create New vole. Cell: 70300000" Tp we Wank to grant Some Penni Ssionn to panticubn ses. We Creole mew de bo access thok objets and We gsant Penmissions Select cltabase inky Secinily — gete xdles, mght click amd select neo xdle Geneval Rele name. We need to psoide User name Ex:- Web User Onnes Select Abo Secusables, : By add - Seleck object types in thok Aeleck Phe objects te. Slored procedures able then Garant execule Penmimions Fes tables Gwank alten and Updole Penminsions . Digital ceslifrcotes Cer fcale i Pothing lot o dialog box , ft odk to display Seuroble and Non Secuiable tems - Ee Lahen eves | Ne login. deaplays Uke o wannin in « Message " Shis Poge leave Non -secwable “lems. Te pevides Security Orxphoned veexs Usex accousts with out Cercenponding login accents in + the destinotan cases Called oxphanedl sexs pole Uses U6e8 account dete Sfolelens SOU AWE Dettinakon somes Se¥rg migration, all Useracceusts tm database Will be migrated to othex Zewex . —the legin accounts will nd be migrated as they stored in Syolaging table of Mosler databose §n Active drsectory . oN deslinaber Sewn these accombs alt os asphaned Uses " Sk of databases [hole database from’ one wer bo another Sewes & called Miguab on Sitvakons ; 1) Launch \ Deployment \ Go Lve\ on boos ckog When eves database move From “Tek epvixonment to Produch on envivenment & DB xefresh. once database iM Producten Faces any Problem, ott Psaduction data moves back to Proce & called DBwefeeal. Reasons ( then we face amy bog to dotabse 2. an MGT Pojecls some times PreXous old — produchon dota to Test Envivonmenk. LAS Me Need to copy development Cony Testing sores 3 Moving fien oid hordwcte fo! New hard wore. Exey gover hat specite Lip peviodl” Eo. When evex ( End of Ue ) System Life & End” ue need to Copy User data and system data to New semen. & 4 Moving the! databosss bebueon ‘the Sewers localed © 1 dep ferent geographical —Locatiens s Aielation Ensbead of maintaining multiple Sewers Lith lens Scolabilrly » we move thm foto ome seer WKH high Scotebtlly — and hégh perfowana . Sores | Serer Somes Sewenly [el Lol Le tigh scalebky Seney He cam cldely menttes alll things an Single sovver bet pen formance tuning Ne Cann Pen form, G! Vistvuali soban . 5 * @mbleadl H mentaing moe ‘Instances » We maintain one, bigserer and dene ‘instances fin that . Sleps in migration \ ee 3 4 G Wansfex laging Tansfx Jobs Teansfes Packeges. Toke backup OF the dotobare bans fer the files estore the dk on Other Seren | Check database srzek ab owney Com pat abililg Ss both database Servers, Fed and fy Onhaned Usexs. Kecovery node a Steps to Perfoming mignalion. Peat wrossousee 1)" Stars fey the legins. Befose wo ving database , by vsing Stored Pacedure Scspt ovt the logins and Kept aside, aftey Coeetbne database on Secondeny Sexves . We need bo Copy Sorpt and sm Sp help_ vev logien Te Scapls ovt all logins inclodeng Possnorcl C Enesyple Fovwat )- elect all logins cad ¥equived logins, copy Them Mes to Gonnect to setond semex. Paale ib and un the — scxipt Created Same login and) pusnosd Ml be BR Teansfes the Jobs. From Sl Senven Agent —> selat Joh > wight Clee on ich amd select scxipk febas “eyleveate Ee, New ‘quey Edttor bindow . Copy the Scsipk Go to Secondory Sesves. inde Past the Sewpt and xu. Same Job & migzated) . 3 Dransfex the Packages Oheve ane atypes of Packages Dts Pockoge. ohis belong to 2000 , Rom sqlsenvern 2005 there & regegy Do Buprst even though We cre maintaining wn Fox brane tgrng Packages We vse Expost and import Fen Management > sled legaay an this sdeck vis . Sew ) Package —> seleck Expert and praide Name Faceage . ' to datinakion senven. copy the file from Sousce Senves Fsom destinaton seme Management —» Legacy + pts > Select Tempest pac > open the dvve Where We copi PIS, tect Package > Clrck open SE o® geing to atteoch pts Packoges. S519 Pactoges He hare to comect to Tobeqitten Sevices under . Stored Packages Unda Msdb sis Packages Will be there, Cemrect to Dokegakon aves -y Ge to Stowe Packages > Urdes mapa > vighk click on Packages Wigord appears Selece — E.pent Pocage » Select Package locaton : Etthes Salsewex cory File syslew . sqlseoen tth In Semen sb maintoins Package 47 File (btSx) formal . copy the Package te olkey Sever le system ™means it Copies Package. Profde path pane Now conneck to Secondeay Seren Integuabon Beavices, —> Go to bored Packages 5 inchs, edb wightclice 4 On Packages ahd geleck ‘i pow le Package. Bex ik 4, Backup and estore ON: Fivsk Semen Wackup db sompe to dist = Pe Copy TiS file fan Gat sevvey bo Secondary Sener Now Go to Secondary Sener estore trragh Go? Select cotabase 5 wight click oni 5 Go bo -westous cotatase , Provide details bo wzed and Chek ok 5 check db stze | quren 1 Compabalibilily & vecowny Model Sfen chtabose -» Go bo Propenties Jo change db cura Exec Pe change dbawney ‘sa’ 6 Fincl and fix ophaned) Users Xb find ‘SP - Changs - users — legion sepa’ Yo fy Sp-charge VaXs — begin “Opeble one! “Legging Uses Miguating S4slem cltabases D, RAMMOHAN Cell : 9704309994 Sql to oeocle Htegion Ke need 2 DBAs 12 DBA [sho has Knowledge om beth Ne ane Pyng Scheina fio text fle. once alt objyecls Se weady We mae scnce to deshrabon by wang Sinpoak amd — Export Right click on dotobose > Goto task > Gunaale Scapls Utzard aprons Choase objec tyes Seleck schemas! tables Scapk to File hii deve | Prokde name then Cle finish sb generates the script for stsuctuse. With the help dh) csoclk DBA afles Schema & weady we moe dota by uring fmpat and — Expos. cksign sane comertions 3 | i. **_vPgvedetten ¥ De RAMMOHAN Cel: 9704300904 . Changing Sewer — feom aldvension to new Version ty Glled Upgiadetan &- Rocete 2008 . 2005 te | 2008 Exbancemenl, to sqlsesves 2005, Back up Copy only) mincor , Postal backup Restoreton ; online vestorction Secentlg Porcipls, Pemminsions ecurabless and Schemas, High ovat abil : Ds "ies Reptcabar : Rance cboeal Mitb Opdlatable sucsplions Adlininishaltan : Ds Detabose.s “SeSounce. chtobase Enhancements 50 Syl sewer 2008. Need fox opgtadeitict Tp we ase NorKingiusith old version, We Plan to highn | Verson then we ge for upgrading he have to check Oldvemicn steed procedures , Packages Will Nun oon Higher Verwon @G&>NdE. Ts these ony Gomptabilil; haves, Lhethen Coe thee we hare onaly: ge Types df Upgsadatan 1. Em place Upgsadettasy R- Side by side En plce vpgeacktor She saree & becoming destinaton here: Wehare bo YN SlSewer Roow setup on Roo5 machine , It & gery to imstall alt Componente ovtemeb cally from mosten db ALL 2005 SxpPpasb files Convest Ynto cog Suppextoble Finally it becomes complete Syl 2c08 Soma. gk taker 6 to 8 haw depends on datalose cite. aehelage ; Every thing & Avtamolic Disadvantages a TF any Problem accu while Lpgtadng be. Sere Above procaduwes , eveythigs stops in middle he cask wo) back chenges - sthen Hal Sewer Kill be 2065 and Halk 2008 : Se Ss Os oe D. Col roy 2. we dont have any Cont WA Process 3 Source database sever divect y effecting 1 tf any Problem occurs Ne Cant get 20058 tenven Glao 1 Deum time & wequived op sqlsewer & nut ovailable tO users 5 Selecléd date, se elec bases be canit uPgroce é SEWER Name — stl not Change. Sie by side We hae new Sebup with higher Vemicn all Process online uty complet — manual Psocens Ne Cam UPginde &ffechrg business they 2 We have Fall conket om Op gsadeng amd tsouble shodting 2 Crey thang Ne. tore, one by one . Safest Kind oi 2pPrcach Advantages ‘ \ We ane nok diskabing Exshng Seven. Ke one toking a Copy and Pasting on destnation seiven . Re Very minim — chau tine Sequeed for vecheectny Seven fom Roos bo Reog 3 Selected * Ualdbos Ss” can | Mightels 4 Complete Manual process ae fall ConbA on LPgsadakon SB - Serer rome ill be Changed Feom> Source. to destmabon Senven les to plan fer urgudetian. ghee & a tod called “Upgiade Advise” ‘ Gt onclyges © Before stanting upgrading , we wun this tok t anolyges | database Server and components ond gre swesul b s 4 ™ akok Whew thee ts chance dh getting Waves Wwe have to ‘nstall this todl from sql saver Software 7 Zk presen’ Under 2ke Entesprise \ Sexvexs \ edist\ Upgrade adviser \ SaLUA Sebup. met Steps 1 installing | upgsace Advisor % |. Rum 2008 Upgiade odices . RB Accept the Meense ogeecment 2: Nemes » Enstalloton path, Biak cost we can Check 4. Complelé Open upgiade Advisos 2 dotesmol components 1. Leuech £. leusch upgimde wept viene Click on Amalysis Ki tend) 1 2b Ident Bes sql components » Pts package Entegvaton servi a Avthentcabon we bove to seleck whch mode Ke ane vaing fox connecting. || — 3 D. RAMMOHAN Coll : 704309894 ft osts fos Sewer Pasometexs Ciuhich databases We Wont bo Select) S Arelyge Tyace files fh we check ft analy ge team files Cprofilen ‘ovt pst ) B Arolyze sl batch fles \ fh we chea , tt analy ge batches We need to provide Peds 4 DIS Panameters We have to seleck on Nhich DTS ba to onaly ze, amd peavide. path O DIS CN Sewer oms files . 5 S3S fPaxawetern ¢ Semmarsy AStes onalysis. we Yove to click Lanch yepat vrener Red x vneans ene diately We hheve fre Nellaa O Kearaag Mentoge Extos Messages “alsewen 2009 meta dala sewices Packages ane. ok Supposted Bim 20g Ve ae Stowng Meba ch in vesource db Conveste alt pis Packager Into file formeak , Keep Some whee and iwpat on desbneks on sscidless4 \ ZR. Sqlsewen 200 DIS derignen componeols axe *equred bo” edrt Dis Packages: Sdluban - se have to Install ft flabtltty [MOHAN % High pveilabtrty Pp. RAMMOHAD ft & a technolegy Used to xeckro the chur bine chtobese | down time of Sewer . Maximum don tre allewed by clerk woo aganicebon 1S ISminutes Pex monty. Meximum dataloss allazd © 6 to 15 Tm downtimwe have 2 types ' Panned down bime &. onplanned daun time - Dheve axe certain techndbgies 10 Sql eevex Legshipping oldest techndggy Pb Mivxeting Clustering . Logshipping Shipping of Lag Files. fiom one! Sewer! by arches senver By Using 3 Sobs backup , Copy and yestovation Sob ib Conbnoudy Synchronize 2 sewexs: Frequency Sf logshiging by default fs 1s minutes O8 Mirtoting Melo taining B synchronized Copies of datahcsas. thin dy Available fiom salsexven goos SewiGe PECK 4A on Kiads. Hee 7k Uses Network Communtcaten method End Pomt Clustexing Grvoup of Semexrs dong with post neobes and in rans fouing dale. Goobining eS Srgle unit Log shipting “ Logsbipping 1s 0 Psocess oh trans feving Transactions log flks | feo one Serves bo another. a: & very oldest techrdlegy. .. fb mately Loks on 3 Jobs Back up =ob Copy Job Restoxaken gob We have to maintain B Sevens I. synchvonizabon ee > pirmeaydio i Seaorday dll Reker Pasty Pmary server Seoandery Seve “Things needed fox log shipping \. Dsewexs , Piinary and secon deny L. Back up fles Stoved in local path Le call Hisas Network shared path. fn Primoay 2D Need atlocaton in Second ay SOwer bo copy files Psocess . os What evex Changes made on Primary dotakae, Should * effect on Second ary database - 7 Backup gob un on Pamasy , TE keep on sCanning Log File . evey IB wirtes and collect att backups and Shae in a Network Shanxed path = Copy fob yw on Secondary sewet , it ComeS to the D. RAMMOHAN Cell : 9704309094 Netwoxtk shared poth and copies files into path tn Secendoty Senven Restoration gob Executes from thts Puli of Secon deay serves. Pee sequistes fos Logstipping . |) Database has to be always th ful vecevery Model Other ransaction -lag taking Will nd iwovk- 2h Secondary Sener has bo keep fry” xestove Mode . Ne have © 2, modes fos keeping Secondary Sever No wecoveay ond stand by mode. Th wee keep in ~estore @ No vecqexy mode 1b Will Yt cllao amy user to do modificadions . Andither mode gt stand by mode Lith in Time GP betuzor. Copy and xegtration Le Gam yan Select Commands LF amy Seleck command takes more than (6 anfootes then cory/ vesteveben jobs has to weit. so balk lagshipang fells Advantages Nedtve Sql Seven techndlag y , Les expensive Very Gay to Setup. £6 Supposts — Moltrple Secondeay Senven Secondary clatabase Can keep in Stand by mode Disadvantages Manuel failover, No avtomattc feslaven & thee . Both Gewexs nevex be In Synchyoni zed Possibility, OF Mave doun bine, ee High dota loss Cenfigntog Leg shining : select dobebare —> Right click on db —> Go to Properties, check wecovery modl > if tk t full then clice on Tonsacbon logstpping sleps C1 Grobe ths ot @ Pamany dotobose in leg shiepiny C GH acts a Pky Seen amd oll back Up fobs x Urcky this sewn. Back up Seltings Weed to spectfy 2 paths 1 & Netwok poh and Other & oat palh, 6 Nebwotk path y He Keep this o6 Network shane tH Some then serven So thak Painony and Secondary Seowvens Cam acters thes Path. ZTE We Womb we can Keep in Secondary semen olso > Local pak ? &t stoves beck up les Delele ftes olde¥ than Ohio We col ae rxekekenbon Pentods Supp 3 We give, - Ta hows , ables tak bine ¢t oUtonat cally deletes older fle. Aleve TF no beck UP occas ith in Dp We spectfy thors, tf af alt no boc wp occa With fo thé thax ft WI send an alest to ems $ * dob name te displays he can cham ge Schedule Ke “cam chomge. Secondary sexvew solting s click Caneck amd select the dababase SEVER Name. the ace os ow Secondary SOEs Gor Conying and Vesterattcn dala. D. RAMMOHAN : 9704309904 Teitialize Secondary Rotabase —* © ke Gil back up of Pri may and veskxe into Secorcheay Dh option tokes Full back: OP ACW fern Prmasuy Server Th on Secondaay So thet infbat Syndovonixabor Sh detabases itil be there. QO steve an ey shng back up fF thene of Primany io to Secendoay ts any ee cece 2 thE opbon MB Pang tali Lee thesp ene] the eeconday chrabase its inital aed We heave clseody created Sec any bockup’s Restore optons button soda boven , no meed A De the ne SPEC§y Lacotions fog Copy files gab Beskan foidew (dF and Lag files fox coped files he how to pride Path For storing, copied files Velete copied Gles aglox TF we speosy 24 hows xelenton | perio d FE deletes olde Fles. : dob name amd schodole Bebting Ne Can siecify here. Restese. Tramacton leg dab Bn restoring dokabae we have 2 modes © No ‘ecorery mode Tr will oct alicwe bo acters Users. Arie af a von “tad by mock Tt allows uses to wm select commands , bub > tf th& Seleck toket more. frre Le hae to wail inkl St ComplekeS then only ue can -«ratove. thats shy tf We use stand by msde Ne enable below opson TI Disconnect users in database When yestomg back UPS Foxcebly we one disconmecting wears | Pelay ssestonng \beacup ak least Hen We ane Providing exbsa tine Sol Veltdations . Thory” table 4m Primary deleted accfdentty then ie, beeale leg Shipping ge to Secendasy serwer “copy that table from Secondary to Pa rmaay 59 thak time Hene ome disadvantage & there ,Ne hae halt mov tine ” for Sestoral on 7 Ex: fax novel vesterction fob default tine (b takes & He minle . agen in delays veskoring amotio 30 ininules Like thé Aust 'F ho Yestore occws with 12 — echedeling Popertes ne can Change - Oy the secohdery sewen Configuation Completed Uhouy Gy We Wank Monies Semen We can Configure then click ok Ovex Process in bogshippne . Suppose omy database crash happened Hhak ¢ Check & hast tomsackon happens d Whar 7.3 Leask back up taken Whak Bb Last traneechon Coped 0, RAMMOHAN Whet f5 Lest Fe xestoved Ag tex this U Pisabe alt log shi Pring jobs| from Secorclary server Re Edeot | what & last transack on be fore Cxash Check hdhen there loock. & My PHBL be take tail tog 3 Mecnvallty Copy tre files fron Netwow Shore poh 4 Restore all coped Gles one by! ome im te Same ovcen, S- » Chang e the Stots J th opbon Restore database database Now Secon deay Beer b ~seady OF TRE Severn ay wriy Tame ith Se-coneny GS Aad the opPlication team tp Change. Connection shiny Bequest comes to Secondary Senor T Th every thing & Fine » Fe config we oll tea shpoieg Bobs by making Secondary Soren oy Patmoay Since Logshipping . in 7 Te BB Mitroxtng * D, RAMMOHAN | Gell: 8704300006 From sql server 2005 onndids se Hicsosoft come up Lith a Tew technelogy to overcome. disadvanteges in Legshippeg We Com coll DbMisonng a5 Sicessos > Enbacement OF Legshipping . Db Mivsoving : Logsh* pping + Transackenal Sep cation - Som feahuies closteving ' Re§rottion ;- Hatotaiaing 2 Synchronized copies of datobows, } only one copy of database 45 ovetlable to users. Hon Tt oxks We 2 Sewer — Paindpal Sener and Hinor Server. One more. sewer Called witness Semen _& optional ihre Bower Pricpa Hivier dabobare dobabae t Paine pal Sencar Mirstor seven In Miwioing be use Networe (@rechantsin > Communi cation When ever tron saction Comes to log File tk Senmnedicdelly Sends lo nek saver” thee tean saction Fally Committed and ocknasledgement Comes to Peinctpal semen. that changes NOW Comitled 2a Painctpal Semen Gleo so bhab the two Sewers ane in foi anchoknt-zabon Fem 2005 fos Changing Neko Connection shiny o Mew techrélegy called 3pNs tntvcduced Ne mention ZR SenenS MOIMES in| connection ist¥og 446 Jxst senen avilable, ol xeqests pes thine otherwise with Wm eseconds by wane. Prlomatic faslewer concpt tk goes to secondeay senven, Steps fa Mueyeting d "Sake Full backup oliowed ky legbackup, und vesteve | then on MixKos Senven R. ona Yiel gyochvonizatran completed , Whol even ° beansackens cemes to Pincipal Sevven it sends to , niswor . thene Tk fully comnitts Pemmanentaly ond Sends equal — thak ? Committed then it Commits In Poimaay j als amd sends ectnasledgement to Uses. Bo We Use Network Conrmurtcation Poy Establishing Communicaben bukieen sonce ond deattnaton . Lsing Pxktocdl , Patnumbex along KIT end point ? Psotcodk = TUp/ap . Pxtrumbes — soo End Pook Minos End pink ‘idolt fies where to Pick data amd . hihee fo eed lot. 2b moe chia Sa the boo OF packw:-s | Ay Whale ever bahsackon's ome to PSnctpal Semen Smply -noes to Mi Sey Ml Heaxt beat Checking In owder to Adenttfy the Gexvexr %S online Gd ndt St Geboa sly Pinging every 15 Seconds both Pincipal and wrthess senven ay any Seivex foils to: +espord 4 Conse cobve Ping operctrang SE osbome® thak semen iTS. dawn jand. sends odtiC to Hesor . Naw Th moke mito, as Psrcipal Witness sewer & vsed fev Aulermatre farloven omd 8b mdivtains — QUosum fCommunicaben belweey Saver) On sent log Postion When Mivsox Gemven down the PEMCH pS Werks or Skingle Semen Compre Cabrag With Mtthess senen bul tre feansacken Will be mimitled only 10 Principal ome leg file Called Master Come. online} the cata in Unsent leg Portion & applted on Hixon Seven Hexe it maintains oN Sent leg Potton. hen WIS FB rencring yochs n0u5 D, RAMMOHAN RA yodxoncus Col 70s eyochs onous When evex ony beansaction Comes it has folly Committed en beth senexs bo thot deta base Wil be Sm full Surcnontted , bot vey haste wait ta Lot dy tre for the Process 20 Penfdmancee & dau ene, P\ Synchronous . luhen even ‘tvansacthons comes to PpanctPal . tt Sends bansacton Io Mttor database and that transaction 35 Committed ‘Smmedialely ‘io Psncipal tcepwex TE WHI dt Wott fos ackrndledgement fren wewey and Sends acknowledgement +o uses. dene Avtomobic fotloren Ta Paible . 1 or @ minvtes data loss may happen bob Rrforronce & high Modes of HIweving 1 Brgb ovailabttly mode & High Pex formance mode SS might afety /prtectan mode High avcilabilry . Aynchyous = Nith — Avtemattc failover . The databases aoe fol Synchenited here and iE ‘Performs 2 Prtomake fuileven as Witness Genven & thexe * No cdta loss aid No down Hime bak Pen formance. ML be chum - MOHAN High Ppes-formance ern aroaandses Asyrchsorevs With oot witness cenvenr | As Nithes f& edl thine he have te planned manual FeS\ oven Pen formance. te Nigh Hee ft sends cht ty wees and dont west for Scenawledgement Mini mal downtime happens cacaund Srrinules. High Safely / Pedlection, — suncheonous Ltth out if Here data G fully 4yechyor Zed . @F Minwes rd Pint py Semver dawn outonal cally Other Seven also dam ax Quovp te masfbl teh OMT etl biel Commniont Galton | theas By defewtt rior gree to High Safely mode ASle 6 to g hex. Ib etablsh | fyi Eynchnoni taken berwecr Senvens then he can change te High” Perfomance Oypes of Failover Avtometic fail over The aystern Nil take cone oF = Fefluxes . Manval fail oven Manvelly we hare to do foiloven fern Pérctpal to Minos © Hteor to Pkipcipal . Key LSOG TD sqacapt we can Pep for. Altes dodabase dbname cet Pastnes Fatloven , Forced feSloven We we cling Pailoren Force billy even though cata . Ids & thee. ohn re ents AB by scipt onl J Altes database detabasename set paxtnex Fos) oven Nith force. allew - dataless, ~IMFigusog Winodog Pre wequsites \. Dakebase shovid be in Full ecoryy redel . Ro Goth miier amd principals: database Sovas shovid have Same name 3 Both sowexs | &havid be corfigued wth Fenn FaDn - Folly @ulifed Danan Name Sleps to Configure Miveroing - ' dake Foil bockup of database followed by one log ack up 2 Tenses te files +o iwor Semen . ST Restore, the [Pol backup flowed by log backup with Mo Becoreny opthon , 4 Go to Dotabase Propetes and chick 7 Mtwaing Tab). tk D. RAMMOHAN “| Cell : 9704309904 Configure Secustly Lh zou Witheas Sewen Select No Name of Principal Swen Intance Port Numbes 5022 End point MES of au Now connect fo Miwat senven Nome of the «Mister cexven Pest mu bex 1 5022 amd . End) point : Click — Fintsh Stokes tn Mivioving Syochrent tieg Syrelreamited = Suspended ANG Failover Dib Comected . lly. eyrchseag 3Me@ ome ©) SoSpencecd both server then aepeniing mob happening Fempocortly We ee! Suspended Mer. Pending Feiler We ol seady done failover) muner ie accepbng Sov taken Mca Moloing nt xeady fox DIS commected Completely vemovedt - ay Before Folloven ,sbe fs in Hitsworing ° \ Copy logins and assign same Permasions om Mis ox Senver BR. Create fobs on mMtwor sown dtcoble Spbs. ” 2 Ty there Ts any Packoges wate sue the Same . Packages coy to Messor . 6 4, 15 thae axe any Minked Sevveys ‘UronsRs thak 5. check whethex cotobase 1S -sek for ~eplicolion : 6. Moke Sve Salsexver sonininds ON Same semvicg Accom in both semexs. | 4. Before S rinutes of ching Folloven | change * the Mode of Miwoing flown ~ High Penfwnane be _ High Safely" to enaue gynchiom gotion Fail over Process Thee {S 3DNS stitch, USA Gon chernge and pont thot = NetWork sStch Yo Howey senveg a ° i WH + rb je Con tntimale Network bean to change Comectan sbirg to Move vequest to Miner Server | i ak x fon * . RAMMOHAN 7 _Repltcatfon € | 'b. RaMMOHA! Replt catton Migvatten of data from one sewves to anothes. gt & © Process of maintaining wmullttple icoptes of dato. at ba Ponesfol data migxobion techntqve . In +seplt cation | Selected data and database objects Coables, SR, fna.tnderen) can move. : Be while veplicabreg data ue have a! Choice OF Filhenng dato, Selected dableé , ~onlevel ond Cohimn loeb we. Can Filtex deka and m§gvole Ex i. Set * fiom Emp Whase @J » Beco He can wignals dota beween tHebexoxenaus seney Sql to ovacle . Ovacle to sql tt auprats: Realtime usage ER pea Maxket pf | Boneh [Heed ofsce [5] eau 1 Brench If one change happened fm Headapfica it has to be ‘immedtately opdele on all bianch sewer. Similarly if any Change happened in branch tt has bo effect on hed of fe, Ro Dn xatluey vesesvelion hy Bank transackron § omy teargactton happend ab bas to opdake on at cenvers thes ige Tckele/ money mismatch occus. Replicattan mainly HoskS on Neus PaPeY “Tevinindlagy Replication. Sexminclogy Tt bree Neus paper “Texminolegy Poblishen CNews. Pring Penson) have publi cation dekobase in that Acticles means Joblee Stoxed PsocadixeS amd funckans Peking oveilable few mguhi-. Bisbiboboy (Paper bey > TE & -+woin Sewer to collect all date from publication data base and dist¥bote that to Subscribes. Eative veplicalion 1S conbolled by dishibutor ewer only. SubscSbex © End usey hho weads Papen) ib seceives all data and Skywes * We hove data 1 subseption dababase Several agents (Jobs in seplication) to colleck and to dish%bols data Process Le only RsewetS axe theve then We go fox Local istibutes , means both publisher and dishibutoy on " Same Sewer. Meintasning publishes and dishtbute. an Sepeval: : Serves ve colt th as Replication rodel.s Cems Sexvex \- Poblishex , Subsextbey ee publishey Subsotbe x Publishes, subsewbex and a local distibutoy iS and emo dishtbuloy (I-Gh Publishes dlistibuey — Subsottiey ee ee ee 2 Central publisher rulttple cuhstber! cone to many 5 hee dtshibo tox may be Load Coxd vemote Cis | setae IH states » Faisramtor {1s Poblther Foetio ~leserccs Pushes Les 4- multiple poblishey and Centsal Subse Abex neve ie ts best to Use vemote dishibubox Eri. Bolauare housing . |-axcheival db SCE toe O Gacheivel process rneans Calllectiing data fron di-fyevenk Sexvers S Hybid — combinebon of any 2. medals Casic type One may seplication means publisher to sobscvtbey Byway sepltcation means Poblishen to SubScrx%ber amd Subscibex to Publish again. DyPes of sepltcatton. 1 Snapshok D, RAMMOHAN Cell : 9704309904 BR: Tansacttonal 2. Mexge : 4. Transactional ttt opdatable subsesiplons Crom 2005 Opherds SMP shot Cone nay weplicabon ft ts going te gathex all data from |) publishes sewer and at a Single shot moves to Subscvbes sexvex an It copies fivst Stsuctuse then ft moves data inte thet stwuctuse - Changes effect ak o time only . Exi- , Book stove , Dhraygh oot the year soles au fixed by the end of yess he may give Some discount , that Paice changes Effect ot that time only. Aron sacttonal Cone way ) Bettal data coped to subscfbex , then changes Fsom Publishes effecks on sabscxiber segulorly Mexge CBy soy xepltcaben AStex Copying initial data . Fox every Sminvlis time iokewal > Cue coll thie as Lakency tn tm this Ee i- Suppde Wehave Siowsin publishes and Brows In Bubscsibex , on updoting we have @ ¥ews book We Cant Soarnette which transaction happend vecent S¥ansackonal with updakable subscaptions Tetttal meving complete database, charges fran sobsex key also effecting. here Conflick will nok occa ae Ane REG Ag Sie nfoemodion, by vSing LEN Lime we came be Krew which transactton happend vecentty , rathos ic D. RAMMOHAN | How seplfcation %s Working Cell: 9704309900 Snapshot At atime fk moves data fray one Sewex bo othey Senex St needs 2 sepltcatian agen& — snapshot agent and dishibolfan Ggenk. Snapshot agent xuns fea dishtbutoy sexsves Sk Connect to poblishey qavey and establish aynnec tion between 2 sewexs, Srapsiek agent identifies the cain that cdlecled for sePlicabon Sh Locks cll objects ‘and generate. schema So thak No USer cay access thal objects 1 2t fs gory Yo stose with . Sth extension Céchern fle) and Stes Schema % Spopshok Folden. Shem tt Copies ecards bol eth sep extension LONE Todexes ade thine | thon With sid Extension | Tagexvs + Wg extension ef data Copeb Steucte called “Srapshok generation” fe.) 28¢ YE takes anon 8 hours G5 gerevding — snapshat Pi shibutoy agent util alsays Nok fsom distibuloy to subscbes 4b Establish Connection “between 2 Sewers hihat eves Changes Comes | SEL. Civabs amber Schema then cata. age Ssanéacttonal Enttial ~+eplicakon is same by using 2egenls . Afley Sropelst- gerevoted by wsing “tog weader” agent Changes Conbrexdly moving Foam Publisher. Fay mening Changes iE hos ke sean leg ble, only seplicated objechs tt stoxes in dishibuben database « Feoro diskilbuk« to subsosber — dishibuben agent moves dato Mexge 4 te have Sagenls , Entel srapshdt & genemabed ater 9 that heb ever changes made am publishy amd Subser' beg ° WEL merge by Usmg — Mexge agenk. shen sactonal iutth updals Tr uses — snapshdt , disttboles “amd logveader agen’ . Lith fb Uses another agent Called lathen evey along : quece by vsng Ping . 2 Psvale Nekark 2p.» Ensuring ‘intesnal Connection bebweer node Y Qunum PP 6: ge check Clustering Services Stoning Properly Ger nd Be MSRb pdt WP have Gofigue this sowie fom windeas Grevre Whether tk oS Standard wand: and Yorning or nck 6 iodo Clustering Lindows Nating fine es pd we check by Pinging . T Sqlsewven Clastemeg ‘Syl Serven ts Noten Gry nd Desbyg clustes Nowksng From sun type Cluadmin check Nodes and esourcea : Remove / shot dawn’ onesenera ond check Otter Seven ts UPC nt. cl toting Installatron Gt & Goat Eke Newmol Enataltation . ie have to ‘netell Mees Mivco soft Cleetenng Senex before tnatalihon Components to Snatall Sql sexven datobese sexvices Dy Create a sql sewex failaer cludes T§ We ‘nate’ Hecs then this ophon tl be enabled. Trstomce Select default ers Named instane, Vivtuel Server Canfiguation » Tt displays Vivtual server nein , fP addvess , Networe, oddxess Netwove to vse Cluster group selectron In fs seleck — Clocten GELP CT Quaum dave J cx Sql sewer gscvp Clustex Node Configuicbon Lt displays Availoble nodes rvequed “mode he have by deck Remote Accamt infoxmation iN mMOHy Defy arouses CF EERE FRR ee RRP OF ae wey teterrence coring Peete Application usexS Wil complain that query is taxing move Tin, (os) not execoting . ASO DBA we ‘hove to Look ‘into the que fox bwouble shoot Stoxt with blocking . Fox this puspose we hove to (See > So check blocking Fst of all Locking Locks , Blocktng & Dead locks Bracing 8: we have to Understand Locking & a mechantim hich cam Provide. Concursenay and Consistency dk dota . Developers implement this mechar Basic bypes of Locks \s Showed Lock. R update Lock 3S: Exclusive lock Shaved Lock ($) 3- To ® Low Level Lock , Lavally apply on table. When thie Llocn apptied dt allows Uses® to do only Select ope Sead only data. vations means We can’t do amy Updation® of data. Updele Lock (U> 3- while, updeling t apples Lock on Updated: Poxtion , “femainine dobe will be accessed to users. ot Prov, de consiatency . Exclusive Lock (x> 1- bail this Lock *emoved Ne cont access dotabose (ov) toble Doving ~‘ertovattion this lock stil be japplied on chtabase. Chats bhy Le cannot able bo access dotohsse until the ” xestoralicn complebds fe t highest level lock. Here Concevysency te hess cund Consistency t&& vexy high. loocw oxdex 3- Lithen eves Highesb locks axe there 6 foxtinlex Level , SQisewver outomad cally escolotes to next level Rowlevel Clow level) v Page level Y Sable Level v Databuse-level C High Level) Tmstesd of applying owe locks yoy Lows on vow level, Tt lone whole Page - Instead dk gon lowe ova Page level Te locks uibile Toble Uke wise’ move table Locus oxe theve tk lax® @nbive database. Thh prow ye cal” ob lock esclatten Lok Escalation - he Process of Escalating locks feom Low Level to high level ts colled Lock escalation. Lsolakion. _¢- ” Tsdaton means Imdependent , one bongacton Should nat hot fy othey bangackon Op th te individual stotemunts lie select rUpdeke We go for locks. but fn Sleowves Bvexy ting done With bangad’ te Fos locking tvangactons we ge for Isolabkon Levela . Tsolation Level ¢ Tt ts a Peopexty that can sek the? locking behavicux of the transaction . S¥pes OF Isolation Levels Tn sqlsesvex 2000 Ye. haye \ Read committed Be Read Un Committed 3 Repetable Sead . 4+ > Sesitaltzable From 2008 on wads We hove 5. Snapshot Lsdlaton 6. Read committed Srapshet Tsolaben Revelopers vile these Ext Begin Trolations Set trensacttan Isolation level ‘ Read — commited’ ft check What” %& behe vious of the transact ons. whelhos to do transactions Poralltely cox not aOHAN RAMI 9904 Dodi eT Reod Committed §- | SE & degauit Level tholation. while tventnclion fs xunoing it cpplies Shared lock - St will net alle user todo | any medi ficaltons- once ead opexatroms completed lock releases 60 that USexA® Can access. Pexfiuman™ wise tk effects for dotrg amy modificokons Uses has” to naib Dota t% much consistant , concursercy Is Low Read Uncemintttedl (No Lock) ¢- : Ge & Leek vsestricked Lone - these ts no lock at all. ,, While Update Process & ging an ke Gn read) opzotons. ue get dt fyexent ead cperotrons fxom one elect to» other select we coll this as” Ately ¥eads”. ° The output each amd evexy UUme ts Chasnging x. Me call this cS “Non- vepaloble” reads. Refeatoble vead (UPdale Lock) 2- . St iS ging to apply opcble lock bo UPbte Putin 9 OF daka- we can xetvteve old dato until Updating > completed: Apiex Updlalton competed Le get consistant dais go ve cam eliminate Dilg veads amd Non-‘epetable-? Veads . Here one dean back ts there Phantan weads while Updelr Locke tf there We can do ‘nsext and delebon on oles data. so out po wey be Sn. Con, Siptant Mw K fn this cose we have to kat RAMMOHAN Sesabee,| 4- Pca e70«s0e004 GE is mac estwcted Level eolation. at Exclusive Lock Cx. No other unlil lock seleased is high applies transactions Wil Pesfinm No Conaavency ak all Consstenay Snapshot Fscletion 3 - himat ever data locked We axe Storing as srapshdt Locking . Ne call LE WI be fn bempdb occess be foe tis as “You version stove” tn locked data We can owmally, Locked data cam access from You Version Stoxe Until modi frcatrone sg en access beth dotas while modi fyi "J- once these modi fcatans Completed Me Cam access new date. Reacl committed Snapshot 3. ab is making” amothes copy of dota , aUowing sexe = to access Poratlely. Wy BLOCKING ¢ hong time Locking 18 called blocking. When J, and JL tying fo access. same oalject, Ty hes Exclusive (> Lock > Te ‘has bo wast Unttl T, selease that loa. Process SHS” Long time Lasting to velease lock & called bloces amy one Process seit Sees to ‘esol Blocking \ Gdenthyy axe these any blockings on Sawer. ®& Uderkify the processes Involved in blocking Find oot What eoch process ts doing inside Senex + check with apptcalten team. 5 Finally KL amy one Process Jo identify , Run sp_who an this check “ blocked by” Cdlumn cos) Run select x f4om sys Process Wheve blocked ¥o All Sofoxmation, of process Stoved IN SyS Proess table Gn that we have, a blocked adlumn. Hhen eves blocked colurnn — gveates than co, Ie indicctes blocking on sewer. Be Gyspwecess gives SPid Céewert Pwocessid) aleny with blocked column umbes. Seid blocked 5\ ° 52 85 53 oO BY 2 55 BR Hee 52 & blocked by 55 ond 55 by SR 3 do check , What each Process %5 doing We xun D&Bcc Input buffex With spPid DBCc Input boffe* C52) DBcc Tmput boffex (55) arwdpeaag $2 ts update and 55 75 Select , ue WU SS GT Suppose 5a ts Updeke and 55 is delete ke have. Contact appl{catfon team 4 Aftexappltecttan beam Approval. KNL amy Process 5 Zo Kit Process, We xun Kitt Sp id Gx: KI 55 Dead Lock, 4. hen two process fq conflick bith each ottex and they cannot wove furthex . Situation 4 able ( Sable 2, oBAN Hexe one process ts tayiog to Pay Lock that wesouxce hos olveady lock . until! loc & weleared both Process eve to hot 9b Cant go fexther Situakton 2, Ti meds 20mB and to ned IOMB. — Yotal avoilable memoy & 26 Hb only bhile 3 executing due to Same weasons tt Went to Suspended mode . thek vesouces -nchk weleased by a Whey an Tt Weibing For wesource Leads to dead lock her even dead lock encountered et epsects Pesformance, aaa internally Ident? fies dead loo Infirrmohon e hop ) otk MoniToR continously ~sun every 5 Seca. 2 tb Fdentifies any deadlock tt cheers the vesouces , What ? ose the transacttong , Ptr Ke the Proce hich takes eas time to yo! back and tt becames Deadlock victim One mde mechanism f& there, developers sek Picdties While desioging teransachon Set dead lock pefostly high Ulow smedtumy igh means ft never become deadlock Vichim Supphe oT, & Sy having high Posty means then it Check oll back time » even it & obo Barme time they TE Csqlserven rasdowly KH! omy one Pso Coss - To idenbey dead loce Membr Ve enable teow then Salsenven ts Being to wtle dead lock. th fay tobe log fle. weer Fog & Suse Uke autich. 1204} Captose fofowmah on Cophye Iformaken Sieg moker In Text Fonnak "AML Coraphiad) Formal on8 to Use, ? we have 9 Melbods fin enobling © trace tag 1222: 3605 ft sends oti scaly, 5 FOS There ots Cl2o4 d/Ci2225/ C3608) wry We Can configure this on Std Lp panainders =F 1204 Pt se Pacem, . Recommendations to verde dead Loa Cavesy opbmisoton) + Dork Use Excomtve TsSlekons, keep bansachon th shat * L5e Groupkby amd |) Nhae and baving clause . Ke ik “tha U. KAMMOHAN Cell : 9704309994 Pesfosmance Monitos ¢ Ry USING His tol He ore going to identify the Haiduaxe vesouices , flo usage CPL Usage , Memoy YSAQe Jo erable Performance meonitos From sun Command, Supe Reef man inst te) Pers mon Jo add countex Cle add butten [F] Select What countess we wank | Yong te Propesties We can change Slo amd width. Cpo wlaked camters ¢ Te Processox Stme, Pracessot tfine. olunys hab to be Less than oy. Te TE 1S mone than Tow, then tt stask sending alests CPUvsege 15 high Here tt ident FES how much PkOCe SSor time dS. OP Whdle. seyves “le Privilaged Time Hee tt identfies Iho much time Proce Sst Spends ay Non Sql opexations . Lt bas tobe lewsthan ao y. AV3 Queve Length \ St has to be hessthan 9) > pete Procency The Welling Peocess 15 cto bel) leas than 3 pen Ps9Ce Ssax . Memosy ‘elated Counters . Memosy divided nto i> System Memory +, OD solsewex Memosy SYSlim Memnoxy Memory : Avetlable bytes fe checks haw much Memory ft shoud clways, 1S fee in operating Syslero. . > 2ONB. TE TiS Lew than 20ne, them theve 1% ong Soffcient Ram on Systern Memory + Pages / sec. How rneny Pages one placing Tt has to be !hess than 50 Memoxy consumption & mote . to bop ten (system Memory ) Move than 464 Yneam SQL sewer boscex anager She amount ef Ram allocated to Salsewex is Suffictent wo not. we check here . Page Life Expectancy WWhak evex Page. comes to buffer , tf ableast stay Sitinuhes 4% & Lewstfan sintin means lary witey Anvores ond Evesing buffer Pages: Hee tt tndrcabes Ray Site & Ping te fol. We need to Yncvease RAM to RU sonex Buffex cache USE vatto - Has many ‘ead operatfons Hiettng boppes Memon and Yow mamy Wiing disk ne check heve - ule value has to s 4 be wore than goth otterifse tH ‘odt Gles Loss RAM | From san gre > inte Volume. get ny TF we change Site to Cheb Fast otal server Memory , | Hon wach memogy allocated SLEENEX to pee-forn | opesakrans Naxget Sesves Memory Hon much memeqy eqlsowex looking te Pevfomn opesations Sotol Sesver mermosy always haw to be greates than Jaxget Seeves Memos y- Lary wetes / sec Lory witey always in sleeping vhen ever RAM fa ful! Te Cleanup Pages - When eves cpu tsidle then also tt Trokes amd clean op Pages. the coupley Value had to be lows than 20 Hmes/sec Other Wise ne hae be thoy the Size of Ram. Poges weods/sec and Pages ritesisec Tr hos to be more than aoa fiom beffes. Risk To selaled counters Disk Writes /sec , eads/sec, Wb time, sead tine and Pages weade/sec abt these operations has to Complefe ith fn 8 nll? Seconds Disk 2jo flow RefawlE “ste f Kb , Pege transfer fy splitting inb 2 pale ame, block site. coke tronsfex Si) be vexy he have to evr ES ORRN'S disk size, Gell : 9704309994 From Un > Bype disk mgmt- msc ight cle on tt amd seleck fosmat 6 changes Sze. From kb to Gt kb Disk time. ff axe over usieg \lisk — handrane felluce, May occurs, The volue hag to be hess than 50% Tp tk & Meare ther Bo, ty to split Usage of disk ANevage Bise queve length Te Checks fers execubing hots many queves ave wating TE hos bo be Less than 2 Pr Hind. hood selaled Counters . ( Geneval Statistics) Batch wequest /sec Te sqlsewvex Wink even vequest we one Pesing Th tronsfoxs Go the Seem oF batches. 3 4b %s Less than loco OK, Tf move +than 1000 Problem an SWE, TE means sql sewer Paundting move Load. Compilations /sec ft & has to be.“ Lewthan lor Oy batch sequests . p ae 3 D, RAMMOHAN Profile ie Cell : 9704309964 tr Ga client tod: fb Captuxes alt the bhak sql server doing copes ab data “nformatton about AO the -feerey dk toce file 19 system eae i Feom Sods , seleck Pdf len Connect te Senven oubPuE & Staed Enable Fle xoll over fin thek Select New tence Provide -pame and th hee Evenls to be captuxed Using Profilex RPC + completed Batch staxtt Batch completed SP Stoabement Startting SP: Statement completed Show xb query plan. Remole Proceduxe call CRPCD bithen appl cation sending wequest to backend we call tb sb Remate Proceduse call. We one bracking RPC completed quey bo identigy Leng winning quevies, nde cpu usage which effects Pes fosmance . Botch staxting / compleked . Bokches Cqroup dh. transactions ) we enecole fo frd Which & Causing Problems Ne. ident fy When batch started haw many Stakements one there tneide , When babch Completed ; SP: Stotement Stasting / completed lahat cae statement thak cauting Problem we ‘idenbfy Shot XML quey plan We Can See Execvtton plan of quesy fiom profiles Steps to von prosex From “Management studio mend select Jodie io that Cvek Profiles BH) From Pex formance Yoke Seleck pschbtlex then connect to Sesvex From — ftle menu Seleck New trace Geriexol Job Jwace name + tte hove to Provide ame fox the doko. thak t 0 be captured. ; Yeace Provider name , Provides type and venuton $b dtsplayen From ous Sql Somer Installation . Use the template defarlb Tb Keep as! template stondad . ftxst tk secuds oll evenbs mest me it ask be use the templets. Welcan sloce ‘doba: ‘tn tOOISee Sh Fle Los divectly Sloving So the “fern of table» Ne can save on andter Serer also by . comectirg to olhex server. icine! 4 a RAMMOHAN ma : 9704309998 Seve to File + we have bo Provide path where © save Sek mex file size CB :- by defoult th will be sre Enable file voll ovex Orc 5B Completed while data captesing th stawts a New File - Sewers Process braw data Save to table » Ne have Seleck om Whi ch server cond on Which deababase we have to stove trace. Seb Hoxton Yous Cin thousands) Ereble trace Stop Hime Avtomab cally “He can truncele the dak He Can stop teace by Providing time here. Events Selection cob felecb evenly Eris Dp ne Selece RPC We find thak b Text dalao}, Rp Fram shtch opplcabon tk & Coming , what type dh Usen bihich hopin ik & USiPg + CPUUSage | ead and Lib opota duvakons | client machine Dame on Which dabolnw fk & CF fectiog ol thee delatle Ne can get ke this Seleck Bakch competed , sp, Stoketnent stavted Fear Penforamen Tab Select Show plan xmL Ftllten tng options Wo westick the date copbning ve have Fite sing options fH TES a mumxte Ne hove ¥,<, = TF tk is a Shag dato type we have byke , unlike fx .- duvaken > 5 min ft captures quexy which baking rmose. than Sminulas Ex. Dbrame - ke Maslex fe captuses data that Coming to Masley databese only, Froally We RUN Dred key clicking bution once He tdentt fy avery Cavsing Problem , We Place this quesy tO Eqleewex and checks BkecdHan pan A A x ‘umdexeS D. RAMMOHAN Clustered Index ;- Cell: 9704309994 All Values arranged WO Peopes O8de%. 8b Gntatiy ovfgiral Values - hile Creating Yt boke long time end Wher “ebseiving data tt & vey fas. Non clusteved Index t- Creaan jill be vesy fasl Pointing osgiinal Value Tndex - 2b motntoun only pointes Bt _ogein depends on idlustexed in vebseiving doko fb takes take. SF the table doesmol Gontein omy | Chstered ndues We call {6 oe Heap table Mechntsin in dncex Endexes folios B-tyee stvuctuve Catviding Values) 1-200 calla cot level \- 100 1O1 - 200 an for, form 2 pal 1-50 Si-'0o lol-\50 15\ - 200 ae JN wel 7 1hiae ideatga, MBIT Vb-2607 MOF be e Sits 1-0 \-25 26-50 Defrrition . she Leaf nodes of Clustered Tindex contefan og Nolues: dhe leaf nodes db Non clustered Index cees VES: Net contain orginal Vols ft Contoin pointes thot Pointing to oviginal dala. Ea above example, (F ue Honk seach 125 ‘it Stonls fren 2 half then lol- (60 tren St goes to lol-1gs . it Sinplifes Search y lihtle using Srdexes due to Continous changes tp data OF table tt lends “wits Makching doin bee Goble and 4 Imkx. As a oer we have to majotain dinder effeciently, Fsagmentaltan Fragment ottam means mussing data in Indexes wed tables Ge shows Wrong data not Exact dota. Fo. fod jacfeagmesbattan « le usd > Dace show “Contig C"bablename’ ,Sndexnome” ) Tn the vEPLE We considen mainly Scan density and Logical Scan Fragmentation . densily means the ~alto oF best comt vs Actol ca? Beat count means hen ve Created means than 2Enca t& now. Scan densily shold be alimys gueter than ao% , lane” than go means Frogmentat an: - Logical Scan feagmentabon & Hew rnuch 7. Inckxes che there ‘it displays. ft shoud be very Less Scan Index and Actual court O-5 & Ffne . 5-20 ve have se organite means Feomvanging andexes Im Pvopen osdex. Mose than eo means ~*ebiild we heve to drop index and vecreate index agsin. From 2005 onnerds this pecc ft veplaced by Duv Select «x from sys.di-db Ind» — Phystal stols Cruit, Nuit, Mol Molly nuit > | Qe, Nott Nott > Nou, NOLL ) @akabate id, Sable/object td, Trrdenid ; Paxtion muinber, ‘made Fram oot por , we have bo See ong. fiagnentation tm Rac Sore 0-5 & Fine, SRO Keatganize and above 2077 xebet Reoxgani-¢ce / Rebuild Reowarhte te vonline whee os Xébuild ts voprlne he have to artange ‘indexes Properly in “eougan' te. Completely dvoppieg index and vecuealicy new incex Sn ebuild Wo Ne ovgantte “Ne Use command DECC Index defrag CDb name — Tablename Tockx name >) Fos sebuiiding BBCC DB xeinde x CTeblenaine tinnde x name FY Gacor y DBCC Commands Dotebare consislancy checking . DBcC Sal Pexf Clog spa) fe shows log file Used *h 4n Sql Server DECC ShiiOk Fle C Filename’. “Toxget Site) Te -weduces stze of log. File MOHAN DECC Trace on C Flag mumbex> Doe ae do enable baw file we Use this. Decc update steks , pecc Memory stats DECC Chece dé. _C datobose Name ) Tt Scans abl database tables amd displays — allocation exsoxs ond Consistency esnois f ak oll tt have: Do fix these eros ve have 3 oPphons ith ~sepedi< — Fos minoc errose Lath wep fast ~ 2F Pages have rose exso Th sepmsate ) with sepa alles cataloss - tb fixes Mojoc errors Gb Courses dakor Id. Ne rup it on Neekly e) Monthly boss. QMVSC Dynamic Management View) ‘DMV & a@ View , Ne can customize celts and apply fiters TE gives Cumenk “eaults- Whee of Decc He get standard Yesvils oly we cast Customize PE Ne use this pmvs to find CPU Usage , Memory Usage i. Long xunntiog quevieh , back Up and ~estoxatian Percentoge . Completed ekc., . cpo usage Select x From Sys -dim_exec-~equest order by Cpu time Memory usage 5 Select » ftom Sysdin - exec - Sessions ovder by Marry use,’ Semion means , once USes Conneck bo SqiSenver Perfo Opencitions and disconnect thts tobal Lime We call ag ESS ED Jo See Inck» Usage ; Seleck * feo Sys dm ~ db — Ince - Usage - Stats Dh dex D. RAMMOHAN Cell : 9704309994 AHOMMAA .G =: i @OBDEROE + Uod- af up ae wewU eee oY » D. RAMMQHAN Cell: wrocnaes BTEC HO

You might also like