1 f 22 26/09/2016 15:58 Mdule Cnsideratins Cntents: Lessn 1: Lessn 2: Mdule Befre yu start with almst any planning. apprpriately. As benefit f gd T appreciate architecture. it places n the understanding f its requirements In larger enterprises, ensuring that the installatin where SQL Server instances while autmating the prduct applicatin. Objectives After cmpleting Describe the Describe hw
2 f 22 26/09/2016 15:58 Lessn Befre yu start platfrm, yu understand why dcumentatin, describing hw underlying server yu can used when The mst imprtant memry, and each f these. CPU, hw it uses Lessn After cmpleting Describe SQL Explain CPU Describe the Explain hw Describe hw Describe the SQL Server
3 f 22 26/09/2016 15:58 SQL Server general categries query executin ( tgether. Three structured as layers SQL OS. Query Executin As well as managing cnnectins queries: manages execute yur The parser utputs a The parser The algebrizer represented what yu wrk that The query and finds f data that statistics. frm a table table. It is language and executed. peratins are the list f representing the be executed the vlume distributin retrieved data in the fr the lwest
4 f 22 26/09/2016 15:58 cst plan as, a plan which t avid the fr executin. ptimizer finds query plan cache is received Strage Engine The strage engine the strage engine manage hw lcking and transactins. respnsibilities f memry; t thrugh are as fllws: The access access methds The page is used t memry, s The lcking cnsistency help f the example, the f data pages data pages int maintain integrity, with the SQL OS Layer SQL OS is the Server cmpnents. SQL OS t access t the SQL prvided by The abstractin present thrughut prvided by discussed in cde t be functins aspects are CPU Usage
5 f 22 26/09/2016 15:58 All wrk perfrmed Windws uses threads t vluntarily used t interrupt cnsidered t f threads. requiring clck that is Threads are SQL Server SQL Server retrieves wrker threads) internal scheduling Instead f using are mapped t setting (max its wn perating system. threads that When a SQL represents the cmmands t task which Transact-SQL When a task wrker threads the pint that task wuld need in use. If n thread, up t the new All tasks are
6 f 22 26/09/2016 15:58 Affinity Mask Schedulers can affinity mask shuld be used default, SQL pssible t cnfigure prperties windw mdify prcessr instance. The system rebting. By While it is the SSMS) t internal hyper- than n limits, the event lg. Nte: architecture, threading SQL Server lgical system Waiting fr One cncept f their time I/O r the release spend mst waiting fr When a task When the resurce then wait fr the SQL OS. available. still needs t a functin f SQL Server keeps f resurces views: f the types fllwing system sys.dm_s_waiting_tasks; sys.dm_s_wait_stats;
7 f 22 26/09/2016 15:58 Parallelism SQL Server nrmally verall time that it can execute reduce several tasks s Parallel Executin Parallel executin f this, SQL utweigh the tasks. Because advantages The query ptimizer the query and aspects f A value called many CPUs Anther value, must meet limit fr hw that a query If a query is use a sequential decide t
8 f 22 26/09/2016 15:58 Cntrlling The query ptimizer value. This value query hint. Even might decide execute the query. the MAXDOP query level via a executin engine is time t In earlier versins were primarily the server setting lnger generally systems that by adjusting this is n 32-bit vs. Virtual Address Server culd server. like SQL cnfiguratin f the 32-bit Systems These systems the system and available fr t change this reserved fr VAS (2 GB) is It is pssible perating system
9 f 22 26/09/2016 15:58 (n earlier perating Cnfiguratin Datastre ( n cnfigured, 1 GB f the VAS applicatins. Nte: Mre fine-grained switch instead value between the /USERVA cnfiguratin f any 64-bit Systems Database systems memry, s that needs large amunts fr VAS is a engines, SQL versin. amunts f SQL Server GB t 3 GB database 32-bit It is best t install systems ffer Windws. Full 64-bit It is pssible ( f Windws. based n the 64-bit versin applicatins and is 64-bit System Nt all current the availability t ther systems ( the required currently nly limitatin is SQL Server t check that engine is Overview
10 f 22 26/09/2016 15:58 The main memry 8-KB pages three sectins: divided int cmprised f Free Pages Stlen Pages cmpnents Data Cache: perfrmed data page in memry. made t pages database by requests. SQL Server peratins are page, the ever perfrmed Changes that are written t the The data cache pages t be drpped (if necessary) is knwn as the buffer cache, Server t perate. taking t much candidate flushed t disk drpping pages pages frm the cache fr SQL cache t avid
11 f 22 26/09/2016 15:58 SQL Server The memry It des this by memry value t avid a memry t respnd t needs. SQL Server. calculating a target pint in time Server is designed in memry As lng as SQL Windws when requests frm evicting pages max server memry frm manager answers can invlve min and Physical A lgical I/O requested page frm the database. When the buffer cache Physical I/O Frm an verall minimized:
12 f 22 26/09/2016 15:58 Yu need Yu need required. Minimizing the Prviding Optimizing Optimizing One f the majr peratins. The I/O peratins. Nte: Lgical t be artificially lwer cunts cause the cunts general, Mnitring Bth lgical fllwing cnnectin setting the SET STATISTICS The verall physical sys. dm_i_virtual_file_stats cumulative frm querying the functin are Demnstratin: In this demnstratin, memry. SSMS and
13 f 22 26/09/2016 15:58 Demnstratin 1. Ensure lg n running and passwrd Pa$$w0rd. 2. On the 3. In the Cnnect 4. On the 5. In the Open CPUAndMemry. 6. Fllw 7. Clse SQL Lessn Installatin Rather than installing this lessn, yu upgrades. earlier versin. In perfrming Nt every installatin enterprises, there cnsistent manner. used t satisfy This enables applicatins. administratr. In larger and in a very and can be silent mde. installatin f ther Lessn After cmpleting Upgrade SQL
14 f 22 26/09/2016 15:58 Apply SQL Perfrm unattended Upgrading There are tw preferred way certain circumstances. n single apprpriate in In-place Upgrades In-place upgrades new versin. an upgrade fails, custmers, the replaced by a upgrading. If mst When yu are upgrade that fails t perate situatin quickly Server the applicatin recver the In-place upgrades resurces and additinal hardware wrk with
15 f 22 26/09/2016 15:58 the existing server. Side-by-side Side-by-side quickly returned invlve extra and can be side-by-side upgrades T perfrm a bth the riginal upgrades relate required t hld prvide fr side-by-side and the space While mst side-by-side bth versins side-by-side 2008 R2 and versin number same server. pssible t install Hwever, Server the majr c-exist n the Nt all versins ServerBks Cnsult SQL tgether. Hybrid Optins It is als pssible tgether. Fr versin f SQL lgins, yu culd new ne. upgrade the new such as them t the Once user databases reattached t upgraded. This apprach. cannt be have nt been SQL Server
16 f 22 26/09/2016 15:58 As with all sftware prduct grup wish t ntify visit http: //cnnect. Server. The that yu imprved, please The simplest Micrsft Update exert cautin test r staging frm the prcesses shuld applied t SQL Server updates Htfixes ( custmer n these fixes, the issues Cumulative further testing Service Packs ( Micrsft testing. address urgent be perfrmed experiencing received been perfrmed. rganizatinal
17 f 22 26/09/2016 15:58 SQL Server prcess t avid installatin Unattended In many rganizatins, senir IT administratrs Unattended installatins SQL Server f the installatin created by rganizatin. installatins f delegatin Unattended One ptin fr cntaining the cmmand prmpt. parameters t can chse t permitted. an.ini file exe at a setup details as ini file. Yu bth is nt In bth examples typical installatin the same methd. example shws a perfrmed using
18 f 22 26/09/2016 15:58 /q Switch The "/q" switch An alternative installatin runs is prvided. mde, the Creating an. An.ini file fr Ntepad. The flder that is Files\Micrsft creating yur multiple parameters, such as CnfiguratinFile.ini in a \Prgram starting pint fr cntaining Demnstratin: In this demnstratin, SQL Server. Installatin File t cnfigure Demnstratin 1. Ensure lg n running, and passwrd Pa$$w0rd. 2. On the 3. In the Cnnect 4. On the 5. In the Open CnfiguratinFile. 6. Review fllwing f the INSTANCEID
19 f 22 26/09/2016 15:58 ACTION FEATURES QUIET QUIETSIMPLE INSTALLSHAREDDIR INSTANCEDIR INSTANCENAME AGTSVCSTARTUPTYPE SQLCOLLATION SQLSVCACCOUNT SQLSYSADMINACCOUNTS TCPENABLED 7. Clse SQL Mdule Best Practice: 1. Understand Review Questin(
20 f 22 26/09/2016 15:58
21 f 22 26/09/2016 15:58
22 f 22 26/09/2016 15:58