0% found this document useful (0 votes)
25 views

SQL Serevr

Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
25 views

SQL Serevr

Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 30
Module 1 Introduction to SQL server For medium scale applications > Best suited non-cluster environments » Supports © ~Max 64 GB of memory + Max database size is 524 peta bytes * 4 physical processors + Upto2 node cluster Max 50 instances In non-cluster Workgroup | For small scale application Web: BOL: Provides a secure, cost effective and scalable platform for public web sites and applications Developer | For building, testing and demonstrating all SQL Server functionality. Supports same features of Enterprise Edition Express _| Isa free edition for lightweight web and small server-based applications Scalability and performance of the each editions in SQL server: pra ith Fest Hlame Datacenter Entered Web Wortgroup Advanced BRIS ore | Serees Numer of CPUs OS 8 4 4 2 t 1 1 | ‘Macrum os, 28 ‘54GB eB 408 168 168 168 | spemor wteed maximum | Maomum $2898 S206 etbose se S28 sur ose woo woot > SOL server supports 2 types of environments 1) Stand Alone environment ‘© For small scale applications Ravinder (SQL DBA Training with 6+ real time experience) Page 3 RPM mack m2 © Only ONE production server 2) Cluster Based Environments '* For Medium to large scale applications «Minimum two production servers are required ‘* Banking, Telecom, online applications need cluster based environment. Q: How to find Clustered or non-clustered SQL server Environment? oonethdg mO> ee Lserecrrarts) Poo! is meen alae —nen-cuseral MO> ornd Tou — cluytertd selack Servenpactenty CLsclustones ) OlP! O= 769, Stand Alor i eupaid, Heol choke, Rona Jive Bore Stemd yy SOL Server Ravinder (SQL DBA Training with 6+ real time experience) Page 4 Cluster Environment Architectur MEDIC: TRae coomb cake REL offer somites (8b, Paysele > SQL server is collection of four Major services © Database Server (Database engine) © To work with database © It works using SAL commands © Report Server © Togenerate reports ©. Report is an interface used to present data or information + Integration Server © Toimplement ETL process © To implement export and import activities * Analysis Server © To build data ware house. ® SQL Server according to Books online. BOL shows the following servers and their respective services. Ravinder (SQL DBA Training with 6+ real time experience) Page 5 sat server SQL server Agent Full text Filter Database Engine SQL Server Integration Integration Services Services SQi server Rervices Analasys services sal server Reporting Services > In summary we can say that every server has their own services where database server has 3 main services. © SQLserver (Database Engine) © SQlLserver Agent (For Automation) > © SQL Full text Filter Demon Launcher SQL Server in a Machin: Schema SH Objects Serverl reentrant atria erent Ravinder (SQL DBA Training with 6+ real time experience) Page 6 Hierarchy: * Machine » Instances (50) * Databases (32,767) Schemas Y Objects (32,757) oe ‘SQL Server 2000(8.0) Shiloh v > 8,00.194 (RTM) 800.384 (SP1) 8.00.532 (SP2) 8.00.760 (SP3) 8.00.2039 (SP4) vyvy ‘Service Pack: Collection of hot fixes and new features, * Database compatibility level:80 pak only © Multi-instance support > Beha Looe SQ_LSenverr SoP| * Sstsecurity feature — ONS inaXemce. Clustering support up to4 nodes => Encouypt qe docovypt dako - SQL Server 2005(9.0) Yukon 9.0.1399(RTM) 9.0.2047 (SP1) 9.0.3042 (SP2) 9.04035 (SP3) 9.0.5000 (SP4) vv v vv * Database compatibility level: 90, © Clustering ‘©. Enterprise Edition -- 8 Node a ne Ravinder (SQL DBA Training with 6+ real time experience) Page 7 © Standard Edition ----- 2 Node SQL Server 2008(10.0) Katmai 10..0.1600 (RTM) 10.0.2531 (SP1) 100.4000 (SP2) 10.0.5500 (SP3) vvv vi WP ° DTA (Database engine Tuning Adviser) ee + Index tuning wizard = h © Profiler (To trace server activities) § 5 ©. Activity monitor £ i. & o sac {surface Area Configuration) =» CarnPlole- Semtorr conbipure Ge ae > 10..50.1600 (RTM) * 10.50.2500 (SP1) > 10.50.4000 (SP2) * 10.50.6000 (SP3) > Database compatibility level: 100 > Clustering © Enterprise Edition:16 Nodes ©. Standard Edition: 2 Nodes SQL Server 2012(11.0) Denali > 11.00.2100 (RTM) > 11.00.3000 (sP1) > Database compatibility level:110 > New Feature: Ravinder (SQL DBA Training with 6+ real time experience) Page 8 Always On (HA/DR) Column Store Indexes Contained Databases User defined Server roles Database recovery advisor Instances: * Separate copy of same software product is called an instance. New/Updated DMCs (Dynamic Management Views) — “they done dapendantan oer vnatente al” att © We can install 50 instances per machine in non-cluster and 16 in cluster environment ‘* Every instance has their own binaries and folders. Every instance has ody Ahoddt tral arngie-Wo ana iver + Services #3 Services ot Sal Server sb SQL Server Agent ‘SQL Full-Text filter Daemon Launcher © Folder 1 Folder MSSQL.1 + MSSQL10.InstanceName- + MSSQL10_50.InstanceName---2008 R2 ‘ MSSQL11.InstanceName 2012 Types of Instances: > SQLServer supports 2 types of instances © Default instance © Named Instance Default Instance: > Its name equal to system name. > only ONE default instance per machine > its service name is MSSQLSERVER Named Instance: Ravinder (SQL DBA Training with 6+ real time experience) Page 9 > Its name is equal to SystemName\instancename > Its service name is MSSQL$instanceName > We can have 49 named instance per machine. € ary Client Server connecti Questions: While connecting to the server, what are the possible errors, users get ? Ans: Possible Errors 1. Error: 26 > SQL Browser not started > Firewall on, but server or port is not added to exception list > No connectivity between client and server 2. Error: 28 > Instance TCP/IP was disabled Ravinder (SQL DBA Training with 6+ real time experience) Page 10 SRLsereraom NM Gyeusthe 9-0 SQLSemNEN QoS. Nek Prorrd BU WO SELS291071 10094, renitey - MARAIS Sslewr9 0 NACorroc BEL 3. Error: 40 > Instance is not running 4. Error: 18456 > Login failed. (Invalid login or password) 5. Expired Timeout > Network issues > Servers busy » In Server max sessions are open > Noavailable session memory = ubakena. Ro minim Seectemondt& wer gery > ofs + Windows 2003 with SP2 Windows 2008 Server —*? > RAM :21GB » CPU :1GHz for 32-bit and 1.6 GHz for 64-bit version. 2 GHz is recommended. 4 > HDD :5GB EEE eee ee 3 :611 MB for database engine(493 MB+118 MB) sPacotrondotay ine” a8 > sal Native cient =rcormn ble> Client & Sve — os dota» why.cTRae 45 System Requirements: poe OB. > Net FrameWork 3.5 with SP Setup support files > Windows Services «€Wmi(Windows Management Instrumentation] ‘* DTC(Distributed Transaction Coordinator) & 5 ‘© RPC (Remote Procedure Call) (A> 1E:6SP1 or later version EUMB 1 pondotiy OS Ble 4p Cfo gal SH Service Account: ‘ eiaks Pon Kavicos-mse It isa separate account for SQL server services. ALL &w-Fn ob thom only oe SOL Server used this account to communicate with windows, other servers etc. Cant Shrest- Sal SQL server uses two types of account sere, 2)Local System Account (.\Username) 2)Domain Name (Domain\username} vvv © It supports Multi server jobs Ravinder (SQL DBA Training with 6+ real time experience) Page 11 “Backup into network share * Replication across domains etc. Installing SQL Server: SOL Server supports two types of installation + Stand Alone installation(Non-clustered) “Cluster based installation Stand Alone installation Checklist: 1) Creating Service Account > Right click on My computer --> Manage > Local users and groups > R.Conusers > New user Name: SQLAccount PWD:SQL@123 Uncheck "User must change password on next log on" Create 2)Open DVD or dump ~->double click on Setup.exe 3)In “installation Center" Click on installation whee cizardk Sntvelutad 9 dork anwar - COME. Seowilea ta, dour Stop Pe ®ratallaliong Serd 4 ceaconshet oto cindms servan kam: Ravinder (SQL DBA Training with 6+ real time experience) Page 12 $5501 SewerTaaalaion Center Tar SQLServer sandstone instalation or 2 fetues to an wing wa anooee Lunch wae install SQL Serer 2008 ina non-ltered emironment ot ad eto eiting SQL Sener 08 nctance Monerance NewS Serr fuilove custerintation Teak Launch seat installa sngl-noda SQL Saver X08 feilovercates Resources aia ‘i nodeto 2S Serve Iver ster Launch wiead toa. ede te an esting SOL Seve 208 flver ster. Options BE] Umntomt ser Sra CA} Launch a wizae to upgrade SL Server 2000 or SQL Sever 205 to SOL Seve 208 ‘Befere you upgrade, you shoud rn the Upgrade Aviso to detec potent problems Sach for product upeates Sereh Mierosolt Update er SQL Serve 208 product updtes 4)Click onn "New SQL server Stand-alone installation" 5)Under "Setup support Rules" click OK Setup Support Rules Setup Suppo Puls deny problems that might occu when you ntl SQL Seve Sep oppor les. Fares must be coredted bette ety con continue Setup Support Rates Operon completa ated 6. Falnd0. Waning. Skipped. 2a ETE Sayan] (ee) 6)Click Install under Setup Support Files. We have discussed that these files are installed for every time we install SQL Server. These files take space in system drive. eet re meme antec ne Ravinder (SQL DBA Training with 6+ real time experience) Page 13 Setup Support Files Cc nal to inst Setup Suppor fs. To insta or update SQL Server 2008, Hes are requis Pru ey Th loning coroners eter Sever Ste Gea Tes [eee ——— Set Support es [lsc sien ie | 7)Under setup support Rules click next —— eunaaninansaniaonnmcenes Ryan eo ns _— : wok fromat BUY cc aee 8)Under Installation Type select New installation Ravinder (SQL DBA Training with 6+ real time experience) Page 14 Next ern ‘Setup Support Rulos edger a ac mon See act Fetes Senin et ceenconiel ban Pith. Wage. Seta [Diener tense 10 seossnaree [a teenerore | waterproof [Q tommwcy attra ta tenmnion Lo seem cartnreperton ty | tomar rm ere Mente 1 remand 1 crosesnmmeree unt [O sower se eaomsert, texathate [a cacntoncetn ‘amet [2 waeatoee set Sou Sport Pos ee iste! ree ance rade ton fm ame lokam = [Q stooinaree i [o tovoterwe teat [Orin = poe seee to Ravinder (SQL DBA Training with 6+ real time experience) Page 15, Sens aes Product Koy ara ann tn Sa = Eee oo License Teams orate, ume nm ave re Coser MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS ~ ee MICROSOFT SQL SERVER 2008 ENTERPRISE EDITION - ‘Release Candidate (RCO) re cena terns ran ap taart batain tro Coxprain (cbse wer yo [heverect neste snyo0 Pasorent tes They aya hecrrek nae, brad ioe, wat race i ndncnetanyo races tar, Ter sho EH Bopicae frrcommemeetvumninntonan taney a ot Ce pi} eens a isd) Ravinder (SQL DBA Training with 6+ real time experience) Page 16 ees Setup Support Files, Do real ee age Tae ret etsy re ‘Setup Support Rules act es ly etn tin tn oni 2 net lb aetna Peete oid : seupsurgotdes yea rns Fate, Mare Ben coigagteaaeets aiatast conte (Drama ince) eel 2 vee artes eat ID reonercoreenpsr meee ‘at | memarnun Scoe Sethe bane en Ex [2 hewacrnaaser et | [2 cecmeereerte i eo foal | 2 cows tomnconse bat | [a veo teeny tacit | 12 caunncmisiton te | [2 sonar fed | 1 1b stern Ravinder (SQL DBA Training with 6+ real time experience) Page 17 Sey Featire Solection Ravinder (SQL DBA Training with 6+ real time experience) Page 18 Bike Secor tcimomtenpnan cesar tate need Benda ve tod rns ed so ea aa Poe tae Ravinder (SQL DBA Training with 6+ real time experience) Page 19 thats, Po secumitg. Aierema deo 2LOSTF a, halls, Qddpble © (Ko ConRxOrahion Ws 2 = iil nner 1008 Database Engine Configuration ‘Spey Database Engine authentication securiy mode, ainistatrs and doe ected seu Suppor Res [Recount rising [Bis Diss | FUSTREA] Pott Key ree ae Speci he authentication made sd admit fr te Dalaba Engine Festr Seteton Authors Mede Instance Configuation Disk Space Reuitements Serer Cofigurstion Database Engine Configuration ‘Anabss Services Configuration Reporting Senice Configuration {ro and Usage Repoting Intalation Rules Readyto lsat Iesaiton Progress Complete Windows atbenicaton mode | © mines Mode (Sal Sever authentication and Windows suthenticsen) Buin SOL Seve system adinivtor account Ener pase | conten power Specs SQL Server administers stegtrestemen og ators hon man a Ravinder (SQL DBA Training with 6+ real time experience) Page 20 150. Sn 2008 Soap Error and Usooe Reporting ebro ea etaradr ‘een scot Nee ‘Ent Sestunemest yada ungated Inameatoetneion wie terres Miznacteceesange eer etasiotesate a seneenoe asta, Iednatnencalonss ‘eae oetoashurseatatetsie boron ofgtteray shane eterno es eneen nc CGR Readies setces omens ee fren Jrstallotion Rules ‘ip argregrys mnt as santa Fer etn i mses eee Somerton = — timsewacnvom [i aa Pooranecnertaran | jmnaecvenaon test trons [9 lconienmnecoem tas ‘mh | camaarsiesaretortetrie et Sipe | inewmpencncongnenoratoncs tam rednanenes |Qtewreancosatecoertumetitaae tad lemicrancce Beer en Sroncon Ele eels Ravinder (SQL DBA Training with 6+ real time experience) Page 21 CTR Ready to Install soopoeete ‘ence tone cena sarc eataentng a emo Instaibtion Progress ewencrtnreon fovcnanearees ah forth $a NH Lae PSone pet ‘ercetnesan Saaentnmecatgre Ravinder (SQL DBA Training with 6+ real time exper Ear Installation Progress Concent ins ieaan aon imine —— ‘ia pracnasan een “Installation Progress Nencatn Somienwertqee | |@ Bawertatcins | Reperten feroes Cnd ge an, JO eater beckons Crrecortey [Seranes sound [Owns fora 12 sents ‘aatacnnapee ce. [Q owetercaener | tonometer ese [9 oocrans owe [9 overatanienscrosasy ent [eo weometacinercentennss te 1D hota tne ‘ane | [2 vcore foo | [O'eesone tates ‘em | i [@ moc tnromest Ravinder (SQL DBA Training with 6+ real time experience) Page 23, rere Complete yar seen wnt ct, seescorttdn ‘Arar na bee eM (Seana tease 2k senna anak 281 Samrat aaa lent ta ae an rent ot a Der rw srssm ne ce eee ee eee FAQ and Scenarios { Question: What range of ports can belused for SQL a eee For Database Engine we can use 1433 to 1954 AQ GREE Soma ee in wwbfible ‘© Dynamic ports Sia ports Frdema -SE 4OMB. bdr oho CL Royer We. Seavila TL ther Aerve\ [ Question: What is un-attended installation or silent installation? ‘Ans: Continue installation until we reach "Ready to Install" step. Notice this page showing configuration file path as follows. i ee Ravinder (SQL DBA Training with 6+ real time experience) Page 24 te SQUSear Seg THIS Ready to Install naan ‘erty the SQL Server 2008 fetuses oe tates Setup Suppor Rules Prose key cenre Terms Fest Seecton Inctance Configuation DiksSpace Reuiemens Serer Configuration Database Engine Configuration Analyse Sener Conigrtion Reporting Sences Coniguntion roc and Urage Repoing Insliion Rlas Ready to Ista Insalavon Progress Complete ea tinsall SCL Save 2008: tion Entepsse ation: Ines 6 Genet Coniguatin a Faster Datebore Engine Senices SOL Server Repication Fot-TeaSexeh Anat Servicer Reporting Services Busine usigence Developant Stadio Cant Tool Connectivity Intestin ences ent Tos Bacttds Commpatiy lant Tea Ox. SQL Serer Backs Onine Managernent Toots Basic Configuration fl Sn Peaioaoh SCL SeverdOO Setup Saotsap\Log\OIS04H_ THSRAConrgueTOneT > Goto configuration file path and copy it into required folder or network shared folder where you want to install SQL Server > Cancel the setuy n order to work with unattended installation > Edit configuration file as follows. © Set QUITE="True" © Set SQLSYSADMINACCOUNTS="BUILTIN\Administrators” «Add [ACCEPTSQLSERVERLICENSETERM " + Remove ADDCURRENTUSERASSQLADMIN parameter * Remove UIMODE * Remove INSTALLSHAREDDIR, INSTALLSHAREDWOWDIR,INSTANCEDIR After creating the configuration file save it and run the following command from setup folder "\setup.exe "/configurationFile="" Installation Issues: Scenario 1: Generally while installing SQL Server if there is problem with WMI server then SQL Server Installation fails. Ravinder (SQL DBA Training with 6+ real time experience) Page 25 i 50 Server 2008 Setup 3] Setup Support Rules tage hes ran ttt tr ehet yr ra 24 ae tng Ut abet mat ees ‘Setup Suppo Rules Sper. Payent 12, Faldo. Wereg®. Sead PII casehcen, air aes Memasesparten notin oan baad 1S sre smrentrntcr tase 1 era nensomace renaartonn vee en Fa RO TR IR TIT 5 |] orecectes i sree oes eat i 1 setersce cater ventric caratety asad 1D dermsreanas tice teowe RUB Danes vEabpence em. Resend 1Q HecomePesatven exe 1B wesw ance eset 1 cnt 163 hcktan acute tenses | [@ crerwowessinics aud | 1S wosatovertet ea | Solution: We can solve this issue using the following code. Copy the following code in notepad and store as "winiinstal.bat" or any with .bat, then double click on the file, WMI service will install automatically. After running bat file click on Re-run button in the same page. WMI Error Solution: Copy the script in notepad from the URL and save with "wmi.bat” Double click on the file, WMI service is installed then continue setup. http://social.technet, microsodit. com/Forums/systemcenter/en-| sbe-29a3-Acfa-bOO7- 2aff1$8ccd11/wmi-fix-script-for-windows-xp-and-7. Question: | am installing SQL Server in D: drive where 20 GB free space is available. But in system drive (C} there is 100 MB free space, setup continue or fail ? ‘Answer: > When we install sql server for the time, then it requires 744 MB free in C drive. oem sir en A RE Ravinder (SQL. DBA Training with 6+ real time experience) Page 26 > When we install second instance Setup support files need 118 MB free space in system drive. Hence setup fails. How to stop and start SQL server from command CmD soc Adeninikoahs - 1)Restarting default instance and vi > To stop or start sql server service © net stop mssqlserver © net start mssqlserver > To stop or start SQL Agent service net stop sqlserveragent © net start sqlserveragnet 2)Restartiing named instance and Agent Services: > To stop or start sql server service © net stop mssqlSinstancename © netstart mssqlsinstancename > To stop or start SQL Agent service © net stop sqlagnetSinstancename © net start salagentSinstanceNtame How to Check Set Go to Programs os ke afhaah-vor 9 sal Server 2008R2 [>« Configuration Tools SQL Server Configuration Manager Select SQL services Check the name under "Logon As" for required SQL Server instance. For example in the following figure we can see NT AUTHORITY\NETWORKSERVICE. Account ? v vv Vv vv Ravinder (SQL DBA Training with 6+ real time experience) Page 27 euweagI . en ie Aten Ver, Help @e/ZiDSIT| D999 Bic.sneineyaten sonics G0 Sea eee SOLED {530 Fats Dnenn anche COU. Met I arHORTRLOCASEE Esl seme ARR tonne lees Gel Sere ea Series SSE econ tees sk Seeger ee DSSS one lees Mme ‘ee Activity: In this activity the participant learn how to check service accounts by using SQL server configuration manager. Go to SQL server Configuration Manager and note down service account of instances Instance Name ‘Service Account How to display Version, Service pack, edition etc... Ans: version => celack @@Ver2\o0. servic Pook. > cleo Son propaty C! paeduct- Lovel!) @ Editon, select Sovergrapedy(! edition) Ravinder (SQL DBA Training with 6+ real time experience) Page 28 Ravinder (SQL DBA Training with 6+ real time experience) Page 29

You might also like