Volume, Corporate, and Educational Sales

Size: px
Start display at page:

Download "Volume, Corporate, and Educational Sales"

Transcription

1

2 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig, Optimizig ad Maitaiig a Database Admiistrative Solutio Usig Microsoft SQL Server 2008 (70-450) LearSmart Maual Copyright 2011 by PrepLogic, LLC. Product ID: Productio Date: July 8, 2011 All rights reserved. No part of this documet shall be stored i a retrieval system or trasmitted by ay meas, electroic, mechaical, photocopyig, recordig, or otherwise, without writte permissio from the publisher. No patet liability is assumed with respect to the use of the iformatio cotaied herei. Warig ad Disclaimer Every effort has bee made to make this documet as complete ad as accurate as possible, but o warraty or fitess is implied. The publisher ad authors assume o resposibility for errors or omissios. The iformatio provided is o a as is basis. The authors ad the publisher shall have either liability or resposibility to ay perso or etity with respect to ay loss or damages arisig from the iformatio cotaied i this documet. LearSmart Cloud Classroom, LearSmart Video Traiig, Pritables, Lecture Series, Quiz Me Series, Awdeeo, PrepLogic ad other PrepLogic logos are trademarks or registered trademarks of PrepLogic, LLC. All other trademarks ot owed by PrepLogic that appear i the software or o the Web Site (s) are the property of their respective owers. Volume, Corporate, ad Educatioal Sales PrepLogic offers favorable discouts o all products whe ordered i quatity. For more iformatio, please cotact PrepLogic directly: solutios@learsmartsystems.com Iteratioal Cotact Iformatio Iteratioal: +1 (813) Uited Kigdom: (0) LearSmart Cloud Classroom: Video Traiig s Mauals

3 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Table of Cotets Abstract...9 What to Kow...9 Tips...9 Domai 1: Desigig a SQL Server Istace ad a Database Solutio...10 Desigig for CPU, Memory ad Storage Capacity Requiremets...10 CPU Requiremets...10 Memory Cosideratios...11 NUMA...11 Hardware NUMA...12 Software NUMA...12 How to Cofigure SQL Server for Soft NUMA...13 Storage Cosideratios...13 Maagig Disk Storage...13 RAID ad SQL Server...14 I/O Throughput Cosideratios...16 Data Compressio...16 Plaig Capacity for tempdb...17 Optimizig tempdb...19 Estimatig the Size of a Table...20 Estimatig the Size of the Heap...20 Desigig a SQL Server Istace...21 Namig Covetio...21 Surface Area Cofiguratio...22 Memory Allocatio...23 MAXDOP...25 Collatio...26 Desigig for Physical Databases ad Object Placemets...28 Filegroups...29 Data Files...30 Data File Pages...30 Log Files...30 FILESTREAM...31 LOB Placemet...32 LearSmart Cloud Classroom: Video Traiig s Mauals

4 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Full-text Idexes...32 Desigig a Migratio, Cosolidatio ad Upgrade Strategy...33 Multiple SQL Istaces...33 Plaig for Upgrade...34 Cosolidatio...35 Domai 2: Desigig a Database Server Security Solutio...36 Desigig Istace Autheticatio...36 Choosig a Autheticatio Type...36 Logo Triggers...36 C2 Audit Mode...37 Logi Auditig...38 Desigig Istace-Level Security Cofiguratios SQL Service Accouts...38 FILESTREAM Security...39 SQL Server Aget Services...39 Credetials...39 Istace Level Permissios...40 Server Permissios...41 Usig Keys ad Certificates...42 Ecryptio Methods...42 Eterprise Key Maagemet...43 Securig Ports...43 Securig Edpoits...44 Desigig Database, Schema ad Object Security Parameters...46 Pricipals...46 Basic Security Steps...47 Uderstadig Roles...47 Schemas ad Applicatio Roles...48 Applicatio Roles...49 CLR Security...50 Service Broker...51 Desigig a Security Policy ad a Audit Pla...51 Policy Based Maagemet...51 Evet Notificatios...54 LearSmart Cloud Classroom: Video Traiig s Mauals

5 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig a Ecryptio Strategy...55 Special Cosideratios for FILESTREAM...55 Domai 3: Desigig a Database Solutio for High Availability...56 Desigig a Failover Clusterig Solutio...56 The Clusterig Resource Group...56 Cluster Setup Cosideratios...57 Desigig Database Mirrorig...57 Whe Should You Choose Mirrorig?...58 How Mirrorig Works...58 About the Mirror Database...58 Mode Beefits...58 Steps to Mirrorig...60 Susped vs. Stop Automatic Page Repair...60 Sapshots for Reportig...60 Desigig a High-Availability Solutio Based o Replicatio...61 The Distributer Aget...62 Types of Replicatio...62 Work Load Cosideratios...64 Choosig a Solutio Type...65 Recoverig from a Replicatio Failure...65 Sychroizatio...66 Moitorig Replicatio...66 Validatio...67 Desigig a High-Availability Solutio Based o Log Shippig...67 Iteroperatio Requiremets...68 Switchig Roles...68 Reiitializig the Secodary...69 Usig Log Shippig for Reportig...69 Cosistecy Check...69 Moitor Server...70 Domai 4: Desigig a Backup ad Recovery Solutio...70 Desigig a Backup Strategy...70 Recovery Models...70 LearSmart Cloud Classroom: Video Traiig s Mauals

6 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Backup Compressio...71 Backup Methods...72 Backup Media...73 The Backup Process...73 Mirror to...74 Desigig a Recovery Strategy...75 Automatic Recovery...75 Restore Types...75 Restore Process...76 Restore Commad...77 Restore Commad Optios...77 Trasactio Log Backup ad Restore Bulk Log Recovery Model ad Trasactio Log Backup...78 Poit-i-Time Recovery...78 Log Marks...79 Differetial Backups ad Restores...79 How to Backup ad Restore Files ad Filegroups...80 Olie Restore...80 How to Fix Orphaed Users...81 Restorig Pages...81 Desigig a Recovery Test Pla...82 Log Shippig...82 Replicatio...82 Hardware Cosideratios...82 Hardware Cluster Failure...82 Istace Rebuild...83 Your Test Pla...83 Domai 5: Desigig a Moitorig Strategy...84 List of Moitorig Tools...84 System Moitor...84 SQL Server Activity Moitor...86 Moitorig Processors...87 Moitorig Hard Disk I/O...87 Baselie Moitorig...88 LearSmart Cloud Classroom: Video Traiig s Mauals

7 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Log Viewer...88 Widows Maagemet Istrumetatio...89 SQL Server Profiler...89 Database Egie Tuig Advisor...90 Performace Moitorig with DMVs...90 Maagemet Data Warehouse...91 Maagemet Data Warehouse Security...93 Dedicated Admiistrator Coectios...94 Lockig...94 Domai 6: Desigig a Strategy to Maitai ad Maage Databases...96 Desigig a Maiteace Strategy for Database Servers...96 Data Compressio...96 Heap ad Idex Maagemet...97 Reorgaize Idex...98 Rebuild Idex Row Forwardig Poiters...99 Heap Maiteace...99 Table Partitios Idex Statistics Desigig a Solutio to Gover Resources Implemetig Resource Goveror Desigig Policies with Policy Based Maagemet PBM Scalability Desigig a Data Compressio Strategy Page vs. Row Compressio Partitio ad Idex Compressio Desigig a Maagemet Automatio Strategy DDL Triggers Comparisos WMI SQL Server Aget PowerShell Domai 7: Desigig a Strategy for Data Distributio Admiisterig SQL Server Itegratio Services Packages LearSmart Cloud Classroom: Video Traiig s Mauals

8 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Data Protectio Deploymet Troubleshootig Packages Cofigurig Checkpoits Desigig a Liked Servers Strategy Delegatio SSMS Liked Server Setup Desigig a Replicatio Strategy for Data Distributio Sapshot Replicatio Trasactioal Replicatio Peer to Peer Replicatio Merge Replicatio Bulk Iserts Row Filterig Colum Filterig Trasactioal Replicatio Coflict Detectio ad Resolutio Peer to Peer Coflict Detectio Merge Coflict Resolutio Health Moitorig Questios Aswers & Explaatios LearSmart Cloud Classroom: Video Traiig s Mauals

9 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Abstract This Maual covers all of the kowledge, cocepts ad procedures you eed to master i order to take ad pass the Microsoft SQL Server 2008, Desigig, Optimizig ad Maitaiig a Database Admiistrative Solutio (70-450) exam. We will discuss automatig ad maitaiig admiistrative tasks, the Trasact SQL statemets associated with admiisterig a SQL Server 2008 solutio ad the all importat desig aspects of implemetig SQL Server 2008 i your eterprise eviromet. What to Kow This exam is desiged to test the cadidate s kowledge i all aspects of database desig, optimizatio ad maiteace at the admiistrative level i SQL Server Icluded are topics like database istace desig, istace autheticatio ad security, backup ad recovery, security ad moitorig. The official objectives for this exam are: Desigig a SQL Server Istace ad a Database Solutio (14 percet) Desigig a Database Server Security Solutio (15 percet) Desigig a Database Solutio for High Availability (15 percet) Desigig a Backup ad Recovery Solutio (20 percet) Desigig a Moitorig Strategy (13 percet) Desigig a Strategy to Maitai ad Maage Databases (14 percet) Desigig a Strategy for Data Distributio (9 percet) Please ote that the percetages attached to each objective, provided by Microsoft, are meat to serve as a geeral guide for how much test cotet goes with each objective. A successful cadidate should kow each objective itimately, both from study ad persoal experiece. Tips It is importat to esure that you have hads-o experiece with SQL Server 2008 ad ca attempt the sytax of queries demostrated i this maual ad the cofiguratio examples. The availability of so may virtual server/pc type products today ad Microsoft s 180-day free trial of SQL Server 2008 should allow plety of chaces to work with the product prior to takig the exam. Further, it s importat that the successful cadidate fully uderstads T-SQL statemets, best practices for desig ad implemetatio ad the hardware requiremets for ruig SQL Server 2008 i a eterprise eviromet. LearSmart Cloud Classroom: Video Traiig s Mauals

10 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Domai 1: Desigig a SQL Server Istace ad a Database Solutio Desigig for CPU, Memory ad Storage Capacity Requiremets Whe desigig a SQL server istace cosideratio must be give to the resources that will be utilized i that istace. What we will discuss i this sectio will be how to allocate those resources, how to desig ad cofigure a server istace, ad how to desig the physical database. Ad i additio to the server ad database, you will lear how to desig a migratio, cosolidatio, ad upgrade strategy. CPU Requiremets SQL Server 2008 requires a processor with a miimum speed of 1 GHz, but like most of Microsoft s requiremets you really should use the recommeded 2 GHz processor. This depeds somewhat o the OS but more is always better i the case of CPU speed. Whe selectig a CPU, both 32 bit ad 64 bit CPUs are supported by SQL Server There are, however, some beefits to usig the 64 bit architecture over the x86 architecture. We ll list those, below: Up to 8 TB of memory is supported Better bus architecture which equals higher speed ad better throughput Larger o-chip cache (L2 cache) Better chip cache maagemet Aother processor optio is a multicore processor. A multicore processor cotais two or more complete processors o the same chip. Each processor rus as a idepedet CPU with its ow L2 cache. A mai advatage of usig multicore processors is hyperthreadig. This allows multiple threads to ru simultaeously o a sigle CPU ad each processor keeps the state for each thread. To idetify CPU performace problems use the SQL Server pla cache couters. These couters are available usig the performace moitor (we will discuss later i Domai 5 of this maual) - ad iclude the followig statistics: Cache hits ratio Number of batch requests Number of compilatios per secod Number of recompilatios per secod LearSmart Cloud Classroom: Video Traiig s Mauals

11 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Memory Cosideratios 32bit architecture has some limitatios whe it comes to memory usage. For istace, you ca oly access 4GB of memory directly ad oly 2GB is available for SQL Server with aother 2GB for the OS. However you ca up this by usig the /3GB switch i boot.ii to allow 3GB of memory per process. This leaves 1GB available for the OS. You ca also use the AWE (Address Widows Extesio) feature to use high memory for data buffers. Usig AWE however provides o beefit for stored procedure cache, some CLR fuctios or lock arrays. 64bit architecture provides 8GB of directly accessible memory with a full 7GB available to SQL Server - o switches activated. There is still 1GB available for the OS. Note: Although SQL Server 2008 ca access huge amouts of memory, the amout of actual memory available to SQL Server may be limited by the OS. NUMA Whe there are may processors i a sigle machie with oe memory cotroller, performace ca be limited because all of the processors are competig for access to memory through a sigle hardware chael. If you could divide the processors ito groups that each have their ow memory cotrollers -- to the poit where each processor is able to access memory without competitio -- you have maximum performace i regards to memory access. That s exactly what NUMA (No-uiform Memory Access) ca do for you. As more ad more processors became the orm i server desig, the eed for a hardware solutio to the problem of overloaded memory cotrollers icreased. NUMA was implemeted to meet that eed. NUMA hardware divides multiple processors ito small groups of processors (NUMA odes) that each have their ow memory ad sometimes their ow I/O cotrollers. This has icreased performace by elimiatig the memory access bottleeck i the older systems. SQL Server is NUMA aware ad works just fie o systems with NUMA desiged ito the hardware, without ay chages. NUMA is a scalable solutio to the limitatios of SMP (Symmetric Multiprocessig) architecture. The mai advatage of NUMA is scalability. The task of memory access is broke dow ito groups of CPUs with shared memory rather tha available memory beig shared by all CPUs i the server. Bottleecks are elimiated by limitig the umber of CPUs o ay oe memory bus ad providig access via a high speed itercoectio o each ode. There is aother cosideratio whe usig NUMA -- That is the differece i local ad foreig memory. Local memory is the memory that is ruig o the same ode as the CPU curretly ruig the thread. Foreig memory is memory that is ot ruig o the curret thread. Sice NUMA uses both local ad foreig memory it will take loger to access some memory tha others. NUMA Ratio is the ratio of foreig memory access time to local memory access time. Ideally this ratio should be 1 this idicates that it takes the same time to access foreig memory as it does local memory. A ratio of 2 idicates that it takes twice the time to access foreig memory as it does the local memory ad so forth. Some Widows applicatios ad SQL Server 2003 ad earlier, are ot NUMA aware ad will sometimes perform poorly with NUMA hardware. The NUMA cofiguratio is recorded i the server log as multimode cofiguratio alog with CPU mask whe the server is started. SQL Server 2008 supports both hardware NUMA ad soft NUMA. LearSmart Cloud Classroom: Video Traiig s Mauals

12 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Hardware NUMA Computers with hardware NUMA have more tha oe system bus. The hardware determies the umber of CPUs that are served by a sigle bus ad each group of CPUs has its ow memory as well as its ow bus. A hardware NUMA ode is a collectio of CPUs, memory bus, ad I/O chaels. If you already have the hardware ad you re ot sure how may NUMA odes you have, you ca fid out by executig the query: SELECT DISTINCT memory_ode_id FROM sys.dm_os_memory_clerks If this query returs ode 0 oly, either you do t have hardware NUMA or your NUMA is cofigured for iterleaved memory. Software NUMA With SQL Server you ca group CPUs ito odes with software as well. This groupig is kow as soft- NUMA. Soft-NUMA is used whe you have may CPUs but you have o hardware NUMA or if you have a eed to divide the hardware odes ito smaller groups (odes). You do this by creatig a registry etry that describes your Soft NUMA setup. Soft NUMA does ot affect memory odes, oly CPU odes. I other words, with soft NUMA you ca oly group processors, but you have o cotrol over how the buses or memory are grouped, that s a fuctio of hardware oly. SQL Server has oly oe Lazy Writer ad oe I/O hadler. The I/O hadler hadles all of the I/O completes ad the Lazy Writer keeps the disk updated -- durig slow times i the system -- with chages made to memory. The problem: If you have a system with may CPUs ad may users the thread that hadles the Lazy Writer ad I/O could become a bottleeck. The solutio: Cofigurig may soft NUMA odes provides oe I/O thread ad oe Lazy Writer thread per ode. You ca divide hardware odes ito eve smaller groups (soft Nodes), but you must be careful ot to cross hardware ode boudaries whe you cofigure SQL Server for soft NUMA ad hardware NUMA is preset i the system. Let s say you have two hardware NUMA odes i your system, the first ode cotais CPUs 0-3 ad the secod ode cotais CPUs 4-7. You could create a soft NUMA ode to group processors 0 ad 1 together because they are both i the same hardware NUMA ode. Ad you could create aother ode to group processors 2 ad 3 together. But you ca t create a ode that would group processors 0 ad 4 together -- because you ca t cross hardware boudaries i a soft NUMA ode. LearSmart Cloud Classroom: Video Traiig s Mauals

13 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) How to Cofigure SQL Server for Soft NUMA As we metioed earlier, you cofigure soft NUMA odes by a registry etry -- here s how: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\NodeCofiguratio Type Value Name Value \Node 0 DWORD 0x03 \Node 1 DWORD 0x0c \Node 2 DWORD 0x30 \Node 3 DWORD 0xc0 Figure 1: NUMA Cofiguratio ple With the right most bit of the value represetative of CPU 0, the mask value selects which CPUs will be associated with which ode. I this case processors 0 ad 1 will be associated with ode 0, processors 2 ad 3 will be associated with ode 1, ad so forth. Storage Cosideratios Types of Storage SQL Server works best with disk drives that have high rotatio speeds ad low seek times. A more expesive optio is to use SANs (Storage Area Network) -- especially for high-ed, high cofiguratio systems. Always err o the side of more disk space. You must cosider I/O throughput as well. Eve with plety of disk space you could still have throughput issues. For example, if you use a two terabyte sigle drive ad you have multiple users, the time to access the sigle drive could slow the etire system. You should cosider the type ad amout of storage used as well. Here are some hardware cosideratios for disk storage: SQL Server works best with disk drives that have high rotatio speeds ad low seek times. You may eve cosider usig the more expesive SANs (Storage Area Network) -- especially for high-ed, high cofiguratio systems. You wat to always err o the side of more disk space - more is always better whe it comes to storage capacity. Ad you must cosider I/O throughput as well. Maagig Disk Storage Rotatio speed ad seek times are importat, but so is availability. Performace of a drive is equal to the speed of the reads ad writes. But the performace i a system is equal to the speed of the reads ad writes of the idividual drives ad the availability. I other words, you may have high performace drives, but limited availability will create bottleecks ad slow dow the etire system. Fault tolerace is the ability of the system to cotiue fuctioig through a system failure without a loss of data. LearSmart Cloud Classroom: Video Traiig s Mauals

14 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) You should cosider NTFS (New Techology File System) formatted drives with a 64KB allocatio table. Why a 64KB allocatio table? 64KB is the size of oe extet. Oe extet is equal to eight pages (oe page equals 8K of data) side by side. Some large I/Os ca read a etire extet at oe time so the miimum allocatio uit should be the same size as oe extet. Aother way to icrease performace is to spread data across may differet drives. This allows parallel scas of a table ad therefore icreases throughput. RAID ad SQL Server RAID (Redudat Array of Idepedet Disks) combies two or more hard disks i a sigle logical uit. The data is divided amog several disks i a array of disks that are see by the system as oe uit, therefore the risk of data loss due to a disk failure is reduced. Havig all data i a server stored o sigle disks that are treated idepedetly by the system is aki to havig all of your fiacial ivestmets i oe compay. If the compay fails, you risk losig all of your ivestmet. Spreadig data amog several disks with mirrorig or parity error correctio is a way to protect the itegrity of the data ad spreads the risk aroud so that oe failure caot cost you all your data ivestmet. This is the basis of RAID - although some cofiguratios have either redudacy or parity but do icrease performace. A mirrorig scheme, as the ame implies, writes the same data to two or more disks at oce makig a exact copy of all of the data writte to the origial. Parity provides a way to correct errors i the data o the fly. Note: Hardware RAID is better ad faster tha OS RAID. There are several RAID levels available that allow differig combiatios of performace, redudacy, ad error checkig. Levels 0, 1, ad 5 are the oes typically implemeted by the SQL Server so for test preparatio we will focus o these three cofiguratios. RAID 0 - Stripig I RAID level 0 disk stripig is used to separate the data ito blocks ad store data i a fixed order across the disk array. Miimum of two disks Data is writte to oe disk, the the other No fault tolerace Better read ad write performace Max disks ca be quite large Disk stripig is used at this level to improve the performace of read ad write operatios. With disk stripig several disks are arraged i a array so that idepedet read ad write operatios ca be performed at the same time to more tha oe disk, thus improvig performace. Data is divided ito blocks ad i a fixed order across the disk array. Data ca be writte ad read faster tha o a sigle disk. With o mirrorig or parity, a failure of a sigle disk ca cause loss of data. RAID Level 0 is similar to level 5 except there is o fault tolerace at level 0. Advatage: Better read ad write performace. Disadvatage: No fault tolerace. LearSmart Cloud Classroom: Video Traiig s Mauals

15 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) RAID 1 - Mirrorig This level uses disk mirrorig to replicate data ad provide a idetical copy of the data o the disk. Disk mirrorig, as the ame implies, creates a mirror image of a disk by performig write operatios o two disks at the same time. This level provides fault tolerace through disk mirrorig. Miimum of two disks Oe disk is a exact copy of the other Great for readig but ot writig Fault tolerat If oly oe disk cotroller is used the possibility of failure i the cotroller ca cause loss of all disks fuctioality. Usig oe cotroller for each drive will elimiate this problem, this is called Disk Duplexig. Advatages: Fault tolerat ad geerally improves read performace. Disadvatage: May degrade write performace. RAID 5 Stripig with Parity Level 5 is similar to level 1 usig disk stripig with the additio of parity spread across the array for data error correctio. Spreadig parity across the array allows for the failure of ay oe disk i the array without loss of data. If oe disk fails performace will suffer util the disk is replaced ad rewritte, but data will ot be lost. Miimum of three disks Data is added to oe disk ad parity to aother Great for readig but there is a 50% performace pealty for writig Fault tolerat Oe drive ca fail without loss of data Advatages: Fault tolerat ad improves read/write performace. Disadvatage: If a stripig member is missig, read performace is decreased. Test Tip: Sice levels 0, 1, ad 5 are typically used by the SQL Server, uderstadig the costruct, advatages, ad disadvatages of those levels will help select the correct level give a particular sceario. RAID Desig Cosideratios Trasactio log files should be mirrored for the simple reaso that you wat the trasactio log files to be i a fault tolerat setup. You do t wat to risk losig the trasactio log data ad mirrorig keeps a copy of every write o a separate disk. Data files i most cases should be stored usig RAID 5. You wat the improvemet i read performace (which you get with some cost of write performace) ad fault tolerace as well. RAID 5 provides a good balace of performace (eeded for I/O itesive - large databases) ad fault tolerace usig the parity error detectio ad correctio. The best setup for data files i most cases would be a combiatio of stripig ad mirrorig (kow as RAID 10). The cost for havig higher availability ad higher fault tolerace is that you eed more drives to mirror the data. LearSmart Cloud Classroom: Video Traiig s Mauals

16 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) I/O Throughput Cosideratios Server I/O throughput is a importat cosideratio with your SQL Server ad selectig the right RAID level is a key to maximizig throughput. Other importat keys that we have already discussed are selectig the right processor, disk read ad write times, ad maagig memory properly. Data compressio, discussed later, is aother key to optimizig I/O throughput. A database, oce compressed, will remai compressed o the disk ad durig I/O disk trasfers. Backup ad restore, triggers, bulk iserts ad large stored procedures are some of the most I/O itese operatios you will execute o the SQL Server. Compressed data icreases throughput. This is because fewer pages eed to be trasferred as compared to o-compressed data. Backup ad restore reads or writes a etire database from or to the physical disk(s). Trasactios per Secod A trasactio is either oe database operatio or more tha oe combied ito a sigle operatio that is either fully committed or ot performed. The trasactio rate is affected by may factors icludig system performace, umber of users, I/O limitatios, cache size ad the complexity of the requests. The Performace Moitor (discussed i detail i Domai 5, Desigig a Moitorig Strategy) provides couters to moitor system performace: Trasactios/Sec couter Write Trasactios/Sec couter The Trasactios/Sec couter idicates the umber of trasactios that were started i the last secod. The Write Trasactios/Sec couter idicates the umber of trasactios that wrote to the database ad were committed i the last secod. A high rate of trasactios ca idicate that some trasactios are ot completig. Data Compressio Data compressio o SQL Server 2008 helps the database admiistrator with I/O throughput issues by reducig the size of the database ad thus reducig the I/O overhead required to access that data. Whe a database is compressed, the data is stored o fewer pages i the database ad queries read fewer pages from the disk. Whe data is exchaged i a applicatio, extra CPU resources are used to compress ad decompress the data. Therefore workload characteristics must be take ito cosideratio whe decidig which data to compress. Methods of compressio iclude: Row compressio which stores fixed legth data i variable legth format. Page compressio which removes redudat data. There is a stored procedure, sp_estimate_data_compressio_savigs, that will estimate the space savigs oe table at a time. This procedure takes a portio of the data ad compresses it i tempdb (temporary database - discussed later) to determie the estimated savigs of compressig the etire table. LearSmart Cloud Classroom: Video Traiig s Mauals

17 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) You ca determie which databases are usig compressio by a query of the dyamic maagemet view sys.dm_db_persisted_sku_features. You ca also query the data_compressio_desc colum i the catalog view sys.partitios to fid out what is compressed ad how. Other cosideratios whe decidig whether or ot to compress a database are the actual data stored. Colums where there are a sigificat umber of ulls, sigificat umber of repeatig data, ad colums with a large umber of data types where most values do t require the umber of bytes allocated are all good cadidates for compressio. The data compressio feature is icluded i the Eterprise ad Developer editios of SQL Server Databases that are compressed i these editios caot be restored usig ay other editios. Plaig Capacity for tempdb Each time you start a istace of SQL Server a ew tempdb (temporary database) is created based o the model database. This is doe to be sure your database starts clea. As you read o you ll see what is stored i tempdb ad why it s importat to start clea. The default size for tempdb is 8MB ad by default is set to expad by 10% whe ecessary. I SQL Server terms this default size is a pretty small file ad with lots of user activity it ca fill up quickly ad eed to expad frequetly. The Problem: Each time tempdb expads that database is locked ad ca result i slow server respose time or the server may eve appear uresposive. The Solutio: You ca permaetly expad tempdb to accommodate for space eeded durig busy periods. Oce expaded, tempdb will retai its ew size durig subsequet starts of SQL Server regardless of the size of the model database. Note: You should, whe possible, store tempdb for each server o its ow drive. For each istace of SQL Server the tempdb database must be cofigured for capacity requiremets ad its usage must be moitored i order to isure maximum performace. Each istace of SQL Server cotais the tempdb database as a global resource available to all users i that istace. This database is used to store user objects, iteral objects, ad versio stores. Temporary User objects - objects that are created by a user. These objects may be created directly by the user i a user sessio. Or they may be created idirectly by the user i a routie which could be a stored procedure, a trigger, or a user-defied fuctio. However they are created, here is a list of user objects. System tables ad idexes Local ad Global temporary objects Table variables Cursors Temporary Stored Procedures LearSmart Cloud Classroom: Video Traiig s Mauals

18 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Iteral objects - creatios of the SQL Server Database Egie that process SQL Server Statemets. Here is a list of iteral objects: Work tables for cursor or spool operatios ad temporary LOB (Large Object) storage. Work files for hash joi or hash aggregate operatios. Itermediate sort results for operatios such as creatig or rebuildig idexes. The iteral objects use a miimum of ie pages each; oe IAM (Idex Allocatio Map) page ad a eight page extets. Versio store - a collectio of data pages cotaiig the data rows required to support features that use row versioig. Versio stores cotai the followig: Row versios that are geerated by data modificatio trasactios i a database that uses sapshot or read committed usig row versioig isolatio levels. Row versios that are geerated by data modificatio trasactios for features such as: olie idex operatios, MARS (Multiple Active Result Sets), ad AFTER triggers. Note: MARS was added i SQL Server 2005 ad eables iterleaved executio of more tha oe request o a sigle coectio for applicatios accessig the database egie. I order to determie the correct size for tempdb i a productio eviromet, follow these steps: 1. Set tempdb to autogrow. 2. Execute idividual queries or workload trace files ad moitor tempdb space use. 3. Execute idex maiteace operatios, such as rebuildig idexes ad moitor tempdb space. 4. Use the space-use values from the previous steps to predict your total workload usage; adjust this value for projected cocurret activity, ad the set the size of tempdb accordigly. To icrease the size of tempdb maually - complete the followig steps: 1. Start SQL Server Maagemet Studio. I the Object Explorer view, select the server to coect to. 2. Select the Databases folder. 3. Right-click tempdb to cofigure. 4. Select Properties ad you will arrive at the Database Properties widow: LearSmart Cloud Classroom: Video Traiig s Mauals

19 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 2: Icreasig the size of tempdb 1. Select Files from the Select A Page list i the dialog box. 2. To expad the data file, click i the Iitial Size Box, the eter the larger size. 3. Click OK ad SQL Server locks the database while expadig the file. Optimizig tempdb To optimize the performace of tempdb: Pre-allocate the iitial size of tempdb large eough for the estimated workload. The set autogrow for miimum iterferece. LearSmart Cloud Classroom: Video Traiig s Mauals

20 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) To do this eable autogrow with o max limit ad use the followig Microsoft recommeded guidelies for autogrow icremet: Estimated Size Autogrow Icremet < 100MB 10MB MB 20MB >200MB 10% You should maitai a maximum of two miutes time for autogrow. For example, if the system ca iitialize a 50MB/sec, the 120 secods equals 6GB max autogrow size. Figure 3: Uderstadig Autogrow Estimatig the Size of a Table Whe cosiderig a database desig you eed to cosider your hardware cofiguratio to be sure you have eough physical space for your database oce it s i use. You will also eed to cosider the desig of your database ad whether you eed more ormalizatio. O the other had if the estimated size of your database is small compared to your storage, you may wat to deormalize your database i order to improve query performace. For these reasos, before you desig a database you may wat to estimate the size of the database oce it s filled with data. If you are usig a clustered idex the estimated size of your database would be: Clustered Idex + Noclustered Idex If you are ot usig a clustered idex the estimated size of your database would be: Heap Size + Noclustered Idex Estimatig the Size of the Heap To estimate the size of the heap you will eed the followig iformatio: Num_Rows = Number of rows Num_Cols = Number of Colums Fixed_Data_Size = Size of all Fixed-Legth Colums Num_Var_Cols = Number of Variable Colums Max_Var_Size = Maximum Byte Size of All Variable-legth Colums LearSmart Cloud Classroom: Video Traiig s Mauals

21 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Calculated the ull bitmap as follows: Null_Bitmap = 2 + ((Num_Cols + 7) / 8) 2. Calculate the variable-legth data size Variable_Data_Size = 2 + (Num_Variable_Cols x 2) + Max_Var_Size Note: If there are o variable-legth colums, Variable_Data_Size = 0 3. Calculate the row size Row_Size = Fixed_Data_Size + Variable_Data_Size + Null_Bitmap Calculate the umber of rows per page Rows_Per_Page = 8096 / (Row_Size + 2) 5. Calculate the umber of pages required for the heap Heap size (bytes) = 8192 x Num_Pages Desigig a SQL Server Istace SQL Server allows you to create multiple istaces of SQL Server o a sigle system. I all respects, each istace is completely idepedet of the others. Eve though they share the same physical resources, such as CPU, memory, ad disk, logically, they have o more i commo tha SQL Servers ruig o differet computers. There are two types of SQL Server istaces that ca be created usig the SQL Server Istallatio Wizard, the default istace ad a amed istace. The amig covetio for a server istace is server_ame\ istace_ame. You ca have multiple istaces of SQL Server o a sigle machie. Oly oe istace ca be the default istace ad is always amed MYSQLSERVER1\MSSQLSERVER or MYSQLSERVER1\SQLExpress for SQL Server Express. You ca ame a istace or use the default istace o the Istace Cofiguratio page of the Istallatio Wizard. Each istace shares tools ad cliet software, but has its ow: Registry etries Folder locatios Services with accouts ad setup Executables TCP Ports Namig Covetio If you select the Named Istace optio here are some covetios you must follow whe selectig a ame for the istace you are creatig: The first character i the istace ame must be alphaumeric. Certai characters are ot allowed i a istace ame icludig: Space ( ), comma (,), colo (:), semi-colo (;), ampersad (&), ad at sig (@). Other characters like the uderscore (_) ad the dollar sig ($) are allowed. LearSmart Cloud Classroom: Video Traiig s Mauals

22 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) The istace ame will also be the Istace ID by default. You ca use a differet istace ID by eterig it i the Istace ID field durig setup. The Istace Root Directory by default will be C:\Program Files\Microsoft SQL Server\. You ca specify a differet root directory durig setup by chagig the value i the Istace Root Directory field. Note: The Database Egie, SQL Server Aget, ad Aalysis Services are all istace aware. Surface Area Cofiguratio Whe a ew istace of SQL Service is created, a miimal umber of features are eabled. This is for security reasos because the less features that are eabled, the less features that ca be attacked by a malicious user. I SQL Server 2005, the feature load out of a istace -- referred to as the istace s surface area -- was maaged through Surface Area Cofiguratio. This tool has bee replaced by SQL Server Policy Based Maagemet i SQL Server Default features ca be chaged by the system admiistrator istallatio or features ca be selectively eabled or disabled o a ruig SQL istace through SQL Server Policy Based Maagemet. The SQL Server Cofiguratio Maager ca be used to perform the followig: Eable protocols ad other coectio optios Start ad stop services Cofigure start up optios To make these chages you must first start the SQL Server Cofiguratio Maager. O the Start Meu select: All Programs Expad Microsoft SQL Server 2008 Expad Cofiguratio Tools Click SQL Server Cofiguratio Maager Figure 4: SQL Server Network Cofiguratio Use the SQL Server Network Cofiguratio to stop/start services, eable coectio protocols ad to eable coectio optios like fixed TCP/IP ports or forcig ecryptio. Show above are the protocols for the default istace of SQL Server alog with their status. LearSmart Cloud Classroom: Video Traiig s Mauals

23 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) CPU Affiity I a multiprocessor system, CPU affiity provides maskig to determie which CPUs are allowed to ru threads from a istace of SQL Server. You ca use the affiity mask to select which CPUs will ru SQL Server threads ad which CPUs you wat to be dedicated to system processes. A biary bit mask ca be set to eable or disable system processors i their access to ru threads i SQL Server. The affiity_mask optio ca be set to determie which CPUs will ru SQL Server processes other tha disk I/O. The IO_affiity_mask determies which CPUs will service SQL Server disk I/O processes. The IO_affiity_mask is a umber that holds the bit map for all of the CPUs i the system. The bit map is the same for I/O affiity as it is with affiity mask. Whe a istace of SQL Server is created, the default settig for IO_affiity_mask will work best i most cases. However, if you have to chage the mask value, it ca be etered as a decimal which is ot easy for larger systems or you ca eter the umber i hexadecimal if you eter the umber with a 0x prefix. The risk of settig the IO_affiity_mask to the wrog value is that you could create bottleecks where some processors are tied up ad others are mostly idle. For istace, too may processors set to service SQL server I/O could cause a imbalace where those processors are ot very busy ad the oes that are left for system processes are overloaded. The opposite is true ot eough processors are dedicated to service SQL disk I/O. Microsoft suggests that affiity_mask ad IO_affiity_mask be used i cojuctio. Here s a example of how that would work. Set the affiity mask as follows: 1. sp_cofigure affiity mask, 0x000000FF; 2. go 3. recofigure with override 4. go 5. Shut dow SQL Server 6. Start SQL Server with the followig switch: sqlservr I0x0000FF00 This cofiguratio would assig the first eight processors CPU 0 CPU 7 to SQL Server processig other tha disk I/O i step 1. I step 6, eight more processors CPU 8 CPU 15 would be assiged to SQL Server disk I/O. Note: You should ever have a correspodig bit set to 1 i both the affiity_mask ad the IO_affiity_mask. Note: There is o eed to restart SQL Server after chagig the affiity settigs. Memory Allocatio Oce started, SQL Server will dyamically allocate memory as eeded. You may otice that the Task Maager ad Performace Moitor will show physical memory o the computer steadily decreasig dow to betwee 4 ad 10 MB. This is because SQL Server chages the size of its buffer pool (cache) accordig to the available memory reported by the operatig system. Do t worry, this is ormal behavior for SQL Server ad SQL Server buffer will release memory as eeded. It is also ormal to see the SQL Server private bytes used exceed the maximum memory settig. This is due to the memory that is set aside for other compoets such as exteded store procedures. LearSmart Cloud Classroom: Video Traiig s Mauals

24 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) You ca use the mi server memory ad max server memory cofiguratio optios to limit the amout of memory used for SQL Server. You may ot eed to chage these memory settigs, especially if you are o a 64 bit machie ad have istalled oly oe istace of SQL Server. You may eed to chage the memory settigs of you are o a 32 bit machie ad eed to use AWE or if you have istalled multiple istaces of SQL Server. For a dedicated SQL Server the max memory should be set to: Total memory - Applicatio memory eeded - OS memory eeded Max memory for SQL Server Figure 5: Cofigurig Miimum ad Maximum Memory Settigs To select the mi ad max memory usig the GUI, ope SSMS ad, i Object Explorer, right click the SQL Server istace ad select properties to display the properties widow. The select memory ad you will see the scree show above. Here you ca set memory properties icludig mi ad max values. LearSmart Cloud Classroom: Video Traiig s Mauals

25 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) MAXDOP Max Degree of Parallelism (MAXDOP) refers to the umber of processors employed to ru a sigle statemet, for each parallel pla executio. A parallel pla executio is a feature of SQL Server that takes advatage of multiple processors o a computer to perform a query or idex operatio i parallel -- thus icreasig performace. Whe SQL Server is ruig, ad there is more tha oe processor o the computer, it detects the best degree of parallelism. I other words, SQL Server selects the umber of processors employed to ru a sigle statemet. The max degree of parallelism cofiguratio optio ca be used to limit the umber of processors to use i parallel pla executio (up to 64). You ca limit the umber of processors used i parallel pla executio by settig this value; 1=No parallel pla geeratio, a umber greater tha 1 sets the maximum umber of processors to use for parallel pla executio. The default value is zero, which meas that all processors ca be used for parallelism. Note: If the value max degree of parallelism is set greater tha the umber of processors i the system, all of the processors will be used for parallel pla executio. It s commo practice i SQL Server to set MAXDOP to a value less tha the umber of processors i the systems. This reserves some system resources ad prevets ay sigle operatio from domiatig all of the processors. You ca set the value of MAXDOP i SSMS or T-SQL. For SSMS, right click o the server istace i Object Explorer ad select Properties, the click o the Advaced tab i the Server Properties widow as show below. Uder Parallelism you will see the settig for Max Degree of Parallelism ad ca eter the ew value there. LearSmart Cloud Classroom: Video Traiig s Mauals

26 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 6: Cofigurig Maximum Degree of Parallelism Collatio Collatio defies how SQL Server 2008 stores ad sorts data for differet locales ad laguages. Whe a istace of SQL Server 2008 is istalled you ca set the default collatio. Collatio ca be set or overridde at multiple levels listed here -- after the istallatio: The server A database A colum A expressio There are two types of collatio: Widows SQL LearSmart Cloud Classroom: Video Traiig s Mauals

27 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Collatios differ based o character sets used aroud the world -- The most commo collatios are: Lati1_Geeral collatio for Eglish ad Germa Arabic collatio for Arabic laguages Frech collatio for Frech Moder Spaish collatio for Spaish Whe you istall SQL Server you have the optio to choose the default collatio ad select the sort order. Sortig sesitivity ca be set by: Case Commo character types Accets Character width Widows Collatio With Widows collatio the alphabet will match the regioal or locale settigs i the operatig system. The default collatio for Eglish i Widows is Lati1_Geeral. A collatio tab is preset i the istace cofiguratio ad you ca chage the default -- ad you ca choose the sort order: Biary Case-sesitive Case-isesitive Dictioary sortig is the default sortig method i Widows. A advatage of Widows sortig is that sigle byte ad double byte characters are treated the same i sorts ad comparisos. SQL Server Collatio With SQL Server collatio allows you to select the code page character set. You ca also select the sort order ad Uicode collatio sequece ad it allows you to sort the sigle-byte ad double-byte characters separately. Although SQL Server collatio affects the code page used, it does ot affect the Uicode data types. However, Uicode data types may compare ad sort differetly which could be a disadvatage. Widows collatio works best i most cases. But you may wat to use SQL Server collatio for backward compatibility or whe matchig aother server s collatio. SQL collatio ames always begi with SQL. So ay collatio ame that does ot begi with SQL_ is a Widows collatio. Note: A collatio tab is preset ad the default collatio ca be chaged i the istace cofiguratio durig istace istallatio. Note: Oce a collatio has bee selected for a server istace, chagig the collatio will require a complete database rebuild. LearSmart Cloud Classroom: Video Traiig s Mauals

28 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Note: To maitai compatibility with Aalysis Services select Widows collatio. Aalysis Services does ot use SQL collatio. Test Tip: Collatio affects the sortig, character sets, ad case sesitivity of data stored by SQL Server. Collatio i T-SQL To see a complete list of available collatios i SSMS, ru the query: SELECT * FROM f_helpcollatios() You will see a list of Widows as well as SQL Server collatios available i the results.you ca set the collatio for a sigle database whe you create the database as follows: CREATE DATABASE test COLLATE Lati1_Geeral_CS_AS You ca chage the case sesitivity i a table withi the database as well: CREATE TABLE mytable (o_case_data VARCHAR(128) COLLATE Lati_Geeral_CI_AS NOT NULL) This query creates the table mytable with a table etry o_case_data that is Lati Geeral Case Isesitive. Desigig for Physical Databases ad Object Placemets There are two files created whe you use the Database Wizard to create a ew database. These files are the database data file amed database_ame.mdf ad a trasactio log file amed database_ame_log. ldf where database_ame is the ame selected for your database. The database_ame.mdf is the primary database file ad the database_ame_log.ldf is the trasactio log file associated with that database. Both of these files are stored i the SQL Server s data directory. These files are stored i SQL Server s data directory. The default directory for these files is: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA SQL Server uses three file types to store data ad log iformatio: The.mdf files are the mai database file. Each database has oe primary database file. The.ldf files are the log files associated with the database file for each database. The.df extesio -- used for extedig databases but are ot ecessarily created at the same time as the database files are created. Although SQL Server does ot eforce the extesios listed here (.mdf,.ldf ad.df ), they do help you idetify the differet types of files ad how they are used. LearSmart Cloud Classroom: Video Traiig s Mauals

29 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Filegroups Filegroups allow you to spread data across may files which allow I/O parallelism, help with partitioig/ isolatig idexes ad views. Tables ad idexes are stored i filegroups. Why Use Filegroups Filegroups ehace performace by spreadig the I/O amog several files ad providig the ability to separate read-oly data from data that will be updated. Maiteace is easier because you ca backup ad restore the data idepedetly, use DBCC (Database Cosole Commad) statemets o groups of tables i a filegroup ad separate user objects from system objects. SQL Server 2008 creates a default filegroup for each ew database created called the PRIMARY filegroup. Uless you specify other filegroups all ew data files will be placed i this filegroup. SQL Server uses the PRIMARY filegroup to store a variety of system iformatio. Log files are ever part of a file group because log ad data files are maaged separately. PRIMARY filegroup Table File 1 File 2 File 3 Figure 7: Filegroups I the above illustratio the PRIMARY filegroup cotais three data files ad the table is striped across all the files i the filegroup. Like disk stripig, this allows I/O parallelism. You ca specify a filegroup as read-oly so you ca separate read-oly data from data that will be updated. For istace, if you store yesterday s data i a history filegroup you ca specify that group as read-oly. Figure 8: Creatig Filegroups i the GUI LearSmart Cloud Classroom: Video Traiig s Mauals

30 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Here s how you ca add a ew filegroup to a SQL Server 2008 database: 1. Ope SQL Server Maagemet Studio ad avigate to the desired database 2. Right-click the database object ad select Properties 3. I the Database Properties widow click Filegroups 4. Click the Add butto 5. Eter your filegroup ame i the Name cell 6. Click OK After the filegroup is created, the filegroup ame will appear i the drop-dow box the ext time you add a data file to your database. Note: You will wat to separate trasactio logs (serial I/O) from data (radom I/O) to improve performace. Note: You will also wat to use multiple drives to elimiate drive cotetio. Data Files I SQL Server there are two ames for every file, a logical ad a physical ame. The physical file ame (physical_ame) is the ame used i all T-SQL statemets. The logical file ame (os_file_ame) is the physical file ame with the path icluded ad it must follow OS file ame rules. Data File Pages I a data file pages are umbers sequetially startig at zero (0). Each file ame has a uique file ID umber that is used to referece the pages i that file. Both the file ID ad the page umber are required to access a page. The first page i a file is the header page ad cotais attribute iformatio about the file. Primary Data File: ID 01 Page 01:0000 Page 01:0001 Page 01:0002 Page 01:0003 Secodary Data File: ID 02 Page 02:0000 Page 02:0001 Page 02:0002 Page 02:0003 Figure 9: Data File Pages Log Files Each time SQL Server Setup is executed it creates ew log files i the log file folder at: programfiles\ Microsoft SQL Server\100\Setup Bootstrap\Log\. The log files are stored i a ew timestamped folder with a ame format of YYYMMDD_hhmmss. All old or filled log files are archived ito the log*.cab file i their respective log folder. LearSmart Cloud Classroom: Video Traiig s Mauals

31 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) FILESTREAM A great portio of data that is created ad stored these days is ustructured data -- like videos, text files, audio files ad image files data that you would t store i a ormal database. This data icludes ay data that wo t easily fit i a structured database. Problem: Ustructured data eeded be stored outside the database ad separate from the structured data. Maagig ustructured data outside the database ca be difficult or if it is stored i the database structure, streamig capabilities ad performace will be limited. Solutio: FILESTREAM was itroduced to solve this problem. FILESTREAM allows SQL Server to work easily with BLOBs (Biary Logic Objects) that are stored outside the database. FILESTREAM is a ew feature of SQL Server 2008 that allows files outside the database to be refereced as if they were i the database. To distiguish ormal BLOBs that are stored iside the database from BLOB s stored outside the database they are referred to as FILESTREAM BLOBs. Ulike ormal BLOBs, FILESTREAM BLOBs do t have a 2GB file size limit. FILESTREAM BLOBs are stored as varbiary(max) data types i the database ad ca iclude ay type of ustructured data. Rather tha usig the SQL buffer pool for FILESTREAM BLOBs, SQL Server Database Egie uses the features of the NTFS (New Techology File System) for cachig data while streamig data files. This leaves memory available for query processig ad reduces the effect that FILESTREAM data may have o SQL Server Database Egie performace. BLOBs ca be stadard varbiary(max) files that are stored i a database or they ca be FILESTREAM varbiary(max) files that are stored i the file system. From SQL Server Cofiguratio Maager (show below), FILESTREAM ca be eabled by first selectig SQL Server Services ad right-clickig the SQL Server istace that you wat to cofigure; the select Properties. Use the SQL Cofiguratio Properties dialog box to eable FILESTREAM if you wat to use it, eable file I/O streamig access, ad eable remote cliets to have streamig access. Oce eabled, you ca use T-SQL statemets to search, query, isert, update, or delete FILESTREAM data. With the Wi32 file streamig iterface, large amouts of data ca ow be streamed more efficietly. You ca use the Wi32 iterface that ow works i the cotext of SQL Server trasactios. Use the OpeSqlFilestream API (Applicatio Programmig Iterface) to obtai a file hadle -- the the followig Wi32 streamig iterfaces are available, like ReadFile() ad WriteFile(). FILESTREAM data is stored i special filegroups that cotai system directories istead of files. The system directories stored i the special filegroups are the iterface betwee the Database Egie ad the file system storage ad make it possible to referece files outside the database as if they were i the database. Whe you wat to store data to a FILESTREAM, simply specify the FILESTREAM attribute o a varbiary(max) colum. The data is the stored o the file system ad ot i the database. Most SQL Server Maagemet tools ad fuctios work well with FILESTREAM data. You ca back up ad recover FILESTREAM data alog with the relatioal data i the database. Or you ca exclude the FILESTREAM data if you like. FILESTREAM data is secured usig the NTFS security ad permissios are grated at the table or colum levels. LearSmart Cloud Classroom: Video Traiig s Mauals

32 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Here are a few eed-to-kow facts about FILESTREAM: 1. You ca t use mirrorig ad sapshots o FILESTREAM filegroups. 2. FILESTREAM works with replicatio, log shippig ad full-text idexig. 3. FILESTREAM works with clusterig if the followig is true: a. All servers have FILESTREAM eabled. b. The FILESTREAM filegroup is a shared resource. To implemet a FILESTREAM for iteroperability you must: Eabled FILESTREAM o the SQL Server service. Create a share ame. Use sp_cofigure to eable FILESTREAM o the egie: EXEC sp_cofigure filestream_access_level, 2 RECONFIGURE Create a database i the FILESTREAM filegroup. Create a table with FILESTREAM colums that have varbiary data type. Whe cosiderig whether data should be stored i a FILESTREAM or i the database you should determie if objects will be larger tha 1MB o average ad whether you eed fast access to the data. If either of those are the case -- use a FILESTREAM. LOB Placemet Whe you create a table with LOB (Large Object), use the TEXT ON sytax i CREATE TABLE ad place the table o a separate filegroup tha other data ad idexes to separate I/O. This will icrease parallelism ad provide balaced I/O. Full-text Idexes Full-text idexes ca be placed i three locatios: 1. Primary filegroup 2. Same filegroup as the base table 3. User-specified filegroup It s commo practice to place the full-text idexes o separate user-defied filegroups for maiteace ad backup reasos. Note: Sice full-text idexes ca cosume lots of I/O, you wat to place them o fast drives. LearSmart Cloud Classroom: Video Traiig s Mauals

33 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig a Migratio, Cosolidatio ad Upgrade Strategy Multiple SQL Istaces I cosiderig multiple istaces of SQL Server you must balace the eeds of isolatio vs. maageability. You might use multiple istaces to allow for: Hotfixes Upgrade isolatio Whe usig multiple istaces of SQL Server you will wat to group databases that have the same cofiguratios ad security requiremets i the same server istace. SQL Server creates a dyamic port each time the server is started. Best practice however, is to assig port umbers durig istall. If you assig port umbers it s best to use a value greater tha 30,000. You wat to make sure that the port you assig is ot already i use. Oly oe default istace of SQL Server is allowed. If a default istace is preset from a earlier versio of SQL Server (2000 or 2005) the SQL Server 2008 caot create aother default istace. Note: With multiple istaces do t let SQL Server default to dyamic memory assigmet. You should assig a proper o-overlappig memory cofiguratio. The beefits of multiple istaces iclude better isolatio ad differet versios of software ad service packs o the same machie. The risk is that a system failure ca brig dow all servers. If you oly pla o usig oe istace of SQL Server 2008, the it should be the default istace. If you pla to have more tha oe istace, the oe should be the default istace ad the other(s) will be amed istaces. Figure 10: SQL Server Istace Cofiguratio LearSmart Cloud Classroom: Video Traiig s Mauals

34 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) I the SQL Server Istallatio Wizard you will have the optio to select Default Istace or Named Istace. As show above i the SQL Server Istallatio Wizard, the default istace already exists (it was created first), ow you must select a amed istace by eterig the desired ame for the ew SQL Server istace. Istace ames are ot case sesitive, caot cotai Default, ad if you select MSSQLSERVER as a ame for the istace you are creatig, a default istace will be created. Besides Default there are other reserved words that caot be used as well. Usig a reserved word will result i a error. Plaig for Upgrade The Problem: SQL Server has to be upgraded from time to time as ew versios become available or ew Service Packs are released. Poorly plaed upgrades ca lead to loss of fuctioality or eve loss of data. The Solutio: The solutio to the upgrade problem is to carefully pla your upgrade strategy so that these problems are idetified ad addressed before you actually perform the upgrade. The first step to plaig a upgrade is to check for kow upgrade issues. You ca do this by researchig the Microsoft site ad the iteret for issues that are already documeted. Some thigs to cosider before proceedig with the upgrade are: Upgrade type (Side by side or restore) Cosolidatio optios Replicatio Mirrorig Collatio It s importat whe cosiderig the upgrade to create a upgrade checklist. This will isure that all kow issues ad your upgrade strategy are clear. It s very importat that you do a trial ru before you actually do the upgrade! You ca geerally upgrade from oe level of SQL Server o the same platform to the ext. Just be sure that the older versio has the latest Service Packs istalled. Cross-platform upgrades are ot supported by SQL Server. If you are goig from a 32-bit to a 64-bit platform you ca backup your data, istall the ew versio ad the restore your data o the 64-bit platform. Whe upgradig from older versios, always check hardware ad software requiremets to be sure you do t ru ito compatibility issues. Ru the Upgrade Advisor for every upgrade. LearSmart Cloud Classroom: Video Traiig s Mauals

35 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) For mirrored data you will eed to follow these steps: 1. Back up the data 2. Remove the witess 3. Chage from high-performace to high-safety mode 4. Upgrade the primary server 5. Failover 6. Upgrade the secodary server 7. Resume moitorig For replicated databases: 1. Esure log reader is ruig 2. Stop publishig activity 3. Let the log reader catch up 4. Restart agets a. Ru sapshot aget for publicatio whe usig merge replicatio b. Ru merge aget for each subscriptio c. Redo replicatio scripts 5. Perform the upgrade 6. Register servers i SQL Maagemet Studio 7. Execute sp_updataset 8. Cofigure the ew istallatio Note: After the upgrade be sure to backup your data. Cosolidatio Whe plaig a ifrastructure you will wat to cosider cosolidatio. Problem: Whe server istaces are spread across hardware (differet machies) there ca be waste ad maagemet issues. Solutio: Cosolidate istaces to oe machie ad/or oe istace. The beefits of cosolidatio iclude the possibility of less expese, simpler admiistratio ad simpler security. Less expese because of less duplicate data ad fewer potetial liceses resultig from usig less hardware. Simpler admiistratio from less complex upgrades ad backups Ad Simpler security because of a reductio i server to server queries. Whe you cosolidate to oe machie you are, however, creatig a sigle poit of failure by havig everythig o oe machie. Ad you are lowerig the isolatio betwee servers ad databases. Note: The ew cosolidated servers must be properly sized for hardware requiremets. For istace, you should cosider havig at least as much memory o the cosolidatio server as is required o the origial server. This applies to other resources also, such as CPUs ad memory. Note: Memory required will be the sum of server memory. LearSmart Cloud Classroom: Video Traiig s Mauals

36 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Three Types of Cosolidatio 1. Logical Cosolidatio where databases are migrated ito a sigle istace. 2. Physical Cosolidatio where servers from differet locatios are moved to a sigle locatio. 3. Virtual Cosolidatio where SQL Server istaces from idividual servers are migrated to a sigle server usig multiple istaces. Domai 2: Desigig a Database Server Security Solutio I this sectio we will examie database server security ad how to desig security ito all levels of iteractio withi a server ad from server to server. This icludes security desig for logis ad iteractios with the data base icludig ecryptio strategy, keys, certificates, ed poit security policy, audit plaig, permissios ad roles. Desigig Istace Autheticatio Choosig a Autheticatio Type You have two choices for autheticatio modes o SQL Server, Widows oly or mixed. Widows is always available ad ca be used aloe or SQL Server autheticatio ca be added to Widows autheticatio. Although Widows autheticatio offers more password optios, there are some advatages to usig SQL Server autheticatio also. For example, there are some older applicatios that require SQL Server autheticatio, for those applicatios usig SQL Server autheticatio would be ecessary. Users may come from Widows domais that are ot trusted by Widows or other operatig systems ad they would eed to use SQL Server autheticatio to log i. Amog the disadvatages are more logis ad passwords to keep up with ad less security. Logo Triggers Logo triggers are used to fire off stored procedures i respose to logo evets. The stored procedures ru after a logi is autheticated but before the user gais cotrol. These triggers do ot fire if the autheticatio fails. You ca use logo triggers for ay umber of thigs. Oe use would be to cout the umber of logis. The messages from the triggers will go to SQL Server Error log but o way is provided to commuicate with the perso loggig o. Logo triggers ca be used to: Audit users Cotrol sessios Maage liceses Preload data Note: A ROLLBACK i the logo trigger deies logi to the user. Note: You ca set EVENTDATA iside the logo trigger for more iformatio about the user loggig o. LearSmart Cloud Classroom: Video Traiig s Mauals

37 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) C2 Audit Mode You ca tur o C2 Audit Mode i the GUI (Graphical User Iterface) i Server Properties. With C2 Audit Mode eabled, SQL Server creates a profile trace ad logs evets to a file (\mssql\data directory). It records failed ad successful access to statemets ad objects. The C2 Audit log file has a maximum size limit of 200 MB. Whe it reaches that limit it will create a ew file, close the old file ad start savig evet iformatio to the ew file. You ca query the sys.traces catalog view to see the status of a C2 trace. Note: C2 Audit mode causes overhead which could slow dow system processes. If C2 Audit Mode is eabled but caot log, SQL Server will shut dow ad must be restarted with the f parameter. To eable C2 Audit Mode i SSMS right click the server istace i Object Explorer, the select Properties. I the Server Properties widow select Security. Uder Optios select Eable C2 audit tracig to eable the C2 Audit Mode. Figure 11: Cofigurig C2 Audit Mode LearSmart Cloud Classroom: Video Traiig s Mauals

38 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) For T-SQL ru sp_cofigure with Advaced Optios eabled, the recofigure: sp_cofigure show advaced optios, 1; RECONFIGURE The eable C2 Audit Mode as follows: EXEC sp_cofigure c2 audit mode, 1; RECONFIGURE Oce C2 Audit Mode is eabled, restart the server. Logi Auditig Logi auditig is a simple feature that ca be tured o or off. It ca log usuccessful logis, successful logis or both. Results are writte to the SQL Server error log. Oce set, logi auditig requires a restart of SQL Server to chage. You ca eable logi auditig i Server Properties by selectig Security ad uder Logi Auditig select the type of auditig you re iterested i. Desigig Istace-Level Security Cofiguratios SQL Service Accouts Whe you istall SQL Server, you will choose the service accouts that the services will ru uder. Here are some of the service accout optios SQL Server provides: Local User Accout with a local service accout the logis are created at the local SQL Server level. This type accout does ot have admiistratio rights ad is recommeded if the SQL Server is ot part of a domai. Local Service Accout although you ca use the local service accout, it is ot recommeded for SQL Server ad SQL Server Aget services. Network resources would be accessed as a NULL sessio, without credetials. However, you are allowed access to resources ad objects at the same level as the users groups. With the limitatios of the local service accout, you would ot be likely to use it as a accout optio i SQL Server. Domai User Accout (Miimally Privileged) a miimally privileged domai user accout should be used if the service must iteract with etwork services uses liked server coectios to other computers or must access domai resources like file shares. This is the most commo accout optio. This accout type is best if you have may server-to-server coectios ad there are may server-to-server activities ca be services ONLY with this accout type. Network Service Accout with a etwork service accout you have more access to resources ad objects tha with members of the users groups. This is a built-i accout that gives you access to etwork resources by the credetials of the computer accout. LearSmart Cloud Classroom: Video Traiig s Mauals

39 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) FILESTREAM Security You ca set FILESTREAM security at the service ad withi the istace. You ca choose the followig for FILESTREAM security to allow: No FILESTREAM access. T-SQL oly access T-SQL ad Wi32 access You may also set up a server proxy accout so that you ca coect through the ew Forefrot Threat Maagemet Gateway (formally kow as Iteret Security ad Acceleratio server, or ISA). Note: Be sure to set the FILESTREAM security so the o oe is allowed to update the directory structure directly. SQL Server Aget Services You will wat to use a Widows accout for SQL Server Aget. It should be a low-privilege domai accout. You secure SQL Aget by assigig members to oe the followig roles: SQL Aget User Role SQL Aget Reader Role SQL Aget Operator Role Credetials A credetial provides the autheticatio eeded for a user to coect to a resource outside of SQL Server. A credetial provides the iformatio eeded for a user -- who is coected to SQL Server -- to access resources outside the SQL Server istace they are coected to. Credetials, i most cases, cotai Widows logi iformatio ad are mapped to SQL Server logis. Oce a user is coected to SQL Server, that user ca access resources outside the istace usig the credetial that is mapped to the user. You ca map a sigle credetial to multiple SQL Server logis, but each SQL Server logi ca oly be mapped to oe credetial. Users with ALTER ANY CREDENTIAL permissio ca create or modify credetials. Whe you create a SQL Server Aget job step you will first eed to determie the permissio eeds for you users for each job step type created. Oce your user permissios are determied the you will: Create credetials Create proxies Assig users to the proxies LearSmart Cloud Classroom: Video Traiig s Mauals

40 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Here is the sytax to create a credetial i T-SQL: CREATE CREDENTIAL credetial_ame WITH IDENTY = idetity_ame, SECRET = secret IDENTITY will be the ame of the accout that will be used to coect to resources outside SQL Server. SECRET is the secret required for outgoig autheticatio. If you are usig a Widows logi, the SECRET is the Widows logi password. To create a credetial i SQL Server Maagemet Studio, expad Security i the Object Explorer, the right click Credetials ad select New Credetial. You will get the widow below where you ca eter the credetial ame, the idetity ad the password. Oce a credetial is created, ca use the T-SQL statemet, ALTER LOGIN to map ay logi to the credetial you created. ALTER LOGIN test WITH CREDENTIAL = credetial_ame; Now the credetial is mapped to the logi for access to a exteral resource. Istace Level Permissios Permissios ca be grated at the Widows level, at the SQL Server level ad at the database level. Istace level permissios are the permissios that ca be grated to users at the server level. These permissios iclude the followig list of fixed server roles: Sysadmi Fixed Server Role the sysadmi role ca perform ay activity without restrictio. The sysadmi members are chose durig SQL Server istace istall. Serveradmi Fixed Server Role a member of this role ca chage server-wide cofiguratio optios ad ca shut dow the server. Securityadmi Fixed Server Role a member of this role is resposible for maagig logis ad their properties. I this role a member ca grat, dey ad revoke server-level ad database level permissios ad ca reset passwords for SQL Server logis. Processadmi Fixed Server Role the processadmi role allows a member to ed processes ruig i a istace. Setupadmi Fixed Server Role i this role the member ca add or remove liked servers. Bulkadmi Fixed Server Role a member ca ru bulk operatios. Diskadmi Fixed Server Role a member of the diskadmi role maages disk files. Dbcreator Fixed Server Role a member of this role ca create, alter, drop ad restore ay database. Public everyoe is a member here ad all members are restricted by the default permissios. LearSmart Cloud Classroom: Video Traiig s Mauals

41 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Server Permissios I additio to permissios grated by the role, you ca grat additioal permissios to idividual members i a role. Here s the sytax for T-SQL: GRANT permissio [,.. ] TO <gratee> [,...] [ WITH GRANT OPTION ] [AS <grator.>] The permissios that ca be grated are listed below alog with the implied server permissios. The gratee is who is gettig the permissio from the grator. The grator must have higher permissios that imply the permissio beig grated or have bee grated permissio with GRANT OPTION. Members of the sysadmi fixed server role ca grat ay permissio. Note: If you use GRANT... WITH GRANT OPTION you also give the member permissio to grat the same permissios that you grated to them. Note: Permissios at the server level ca oly be grated whe the curret database is master. Here is a list of server permissios: Server Permissio ADMINISTER BULK OPERATIONS ALTER ANY CONNECTION ALTER ANY CREDENTIAL ALTER ANY DATABASE ALTER ANY ENDPOINT ALTER ANY EVENT NOTIFICATION ALTER ANY LINKED SERVER ALTER ANY LOGIN ALTER ANY SERVER AUDIT ALTER RESOURCES ALTER SERVER STATE ALTER SETTINGS ALTER TRACE AUTHENTICATE SERVER CONNECT SQL CONTROL SERVER CREATE ANY DATABASE CREATE DDL EVENT NOTIFICATION CREATE ENDPOINT CREATE TRACE EVENT NOTIFICATION EXTERNAL ACCESS ASSEMBLY SHUTDOWN UNSAFE ASSEMBLY VIEW ANY DATABASE VIEW ANT DEFINITION VIEW SERVER STATE Implied by Server Permissio CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER CONTROL SERVER ALTER ANY DATABASE ALTER ANY EVENT NOTIFICATION ALTER ANY ENDPOINT ALTER ANY EVENT NOTIFICATION CONTROL SERVER CONTROL SERVER CONTROL SERVER VIEW ANY DEFINITION CONTROL SERVER ALTER SERVER STATE Figure 12: Server Permissios LearSmart Cloud Classroom: Video Traiig s Mauals

42 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Usig Keys ad Certificates A certificate is used by SQL Server to associate a public key with a key holder to provide certificatemapped autheticatio as well as ecryptio. It does this by associatig a idividual user s idetificatio with the certificate with iformatio like: Name address Valid date rage Issuer iformatio Digital sigature You ca use the CREATE LOGIN statemet to create logis that are mapped to certificates for logi autheticatio. Some certificates are created maually ad some are created automatically at may levels i SQL Server. SQL Server maitais a hierarchy of keys from the server level dow to the database. The SQL Server Master Key is used to ecrypt all of the keys below it i the hierarchy. You ca create Database Master Key which could be used for database data ecryptio. This key would be ecrypted usig the Server Master Key. Note: It s importat to remember to back up ad restore certificates whe you are movig from oe server to aother. Ecryptio Methods You ca use keys ad certificates to digitally sig code. You will use this method to prevet tamperig with the code. You ca also use keys or certificates for data ecryptio. Of course, data ecryptio ca be processor itesive so use cautio ad be selective about what data you ecrypt. Ad you ca use keys ad certificates for autheticatio from server to server. How to Maage Keys Back up your keys; SQL Server Reportig Services, Service Master Key ad the Database Master Key(s). If the keys have passwords, make sure you keep the passwords. Keys ca iteract with: Mirrorig Clusterig Ecrypted data If you are backig up ad restorig to a ew server, you ca restore key or certificate. This will allow the ew server access to the ecrypted data; otherwise the ew server will ot be able to decrypt the data. Importat: If you chage the SQL Service accout, you must be careful to maage the chage or you could lose access to the master key. If this happes, everythig that is ecrypted by it will be lost! Use the SQL Server Cofiguratio Maager to maage a SQL Server service accout chage. If you are movig SQL Server to aother machie, you must migrate the service master key usig backup ad restore. LearSmart Cloud Classroom: Video Traiig s Mauals

43 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Eterprise Key Maagemet With SQL Server, Eterprise Key Maagemet (EKM) is ot a stadard fuctio. Microsoft created hooks so that third party vedors could supply the code for EKM. So you must buy software from a third party i order to make EKM fuctioal i SQL Server. The third party software will itegrate with SQL Server ad it should maage keys, key storage ad ecryptio. This ca be doe through software or Hardware Security Modules (HSM). Beefits of EKM EKM provides a additioal authorizatio check ad if the third party module is hardware based, you will get higher performace ecryptio. Hardware based EKM ca geerate keys outside of SQL Server to help recover, retrieve ad dispose of outdated keys. Usig third party vedors you will wat to be aware of what is provided for you. Some offer certificate agig ad rollover which maitais a valid date rage. Some offer bulk ecryptio of data as well. Implemetig EKM I SQL Server you implemet EKM with sp_cofigure by eablig EKM Provider (set to 1) -- the ru re-cofigure to implemet the chage. Copy the DLL that came from the third party vedor to SQL Server. The create a cryptographic provider ad give it a ame; FROM File=<fileame>. Oce you have the EKM eabled ad the third party software istalled -- The third party DLL will be the used for the T-SQL commads: CREATE KEY CREDENTIAL ENCRYPT DECRYPT Securig Ports Ay commuicatio exteral to SQL Server is accomplished via a port. Whe you are desigig a SQL Server istace you should be aware of the ecessity of port security ad pick a strategy to secure the ports. SQL Server, by default, uses ports 1433 (TCP) ad 1434 (UDP) for SQL Server browser. By default, amed istaces will automatically use a dyamic port uless a port is assiged as a fixed port. For amed istaces, every time a SQL Server istace starts, it searches for available ports. Oce a port is foud the browser registers that port ad directs coectios to the appropriate port for that amed istace. The obvious port security is accomplished by placig SQL Server behid a firewall. The default ports for SQL Server (1433 TCP ad 1434 UDP) are ormally blocked to prevet access by people outside the firewall. If you are usig a browser you may wish to ope port 1434 UDP. LearSmart Cloud Classroom: Video Traiig s Mauals

44 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) More security ca be achieved by chagig the default port for each istace of SQL Server. You ca also hide the server ad the browser will ot respod with server ifo. Usig SQL Server Cofiguratio Maager you ca create a alias for the coectio -- that maps to a friedly ame -- which iclude the etwork server ame, the protocol ad the port umber. Securig Edpoits A SQL Server edpoit ca be defied as a etry poit ito SQL Server -- ad it s a good place to provide security for SQL Server. It is implemeted as a database object ad SQL Server routes all etwork coectios through edpoits. Edpoits provide a layer of security that is very similar to a firewall o a etwork. This security is provided for the poit of coectio betwee a etwork ad a server or a cliet ad allows the DBA to limit the type of traffic allowed. Edpoits ca have a protocol such as TCP/IP or HTTP ad ca be used by T-SQL, database mirrorig, Service Broker ad SOAP (Simple Object Access Protocol). Ed Poit Maagemet The system admiistrator ca maage edpoits usig DDL (Data Defiitio Laguage) ad the ower s edpoits are maaged by the ower themselves. Owers ca grat coect permissios to the edpoit. Owers ca also grat, revoke or dey either the cotrol or alter edpoit permissios. Here is the T-SQL to create a edpoit called my_user_coectio for all available TCP addresses o the server -- o port 1500: CREATE ENDPOINT [my_user_coectio] STATE = STARTED AS TCP LISTENER_PORT = 1500, LISTENER_IP = ALL FOR SQL(); Oce you create a edpoit for your server, all Public coectio permissios will be revoked ad you will have to GRANT CONNECT back to allow those coectios. To grat Public access to this edpoit you have to reapply the permissios usig the GRANT CONNECT ON ENDPOINT as show below: GRANT CONNECT ON ENDPOINT: : [TSQL Default TCP] to [public] Secure HTTP edpoits ca be set up by the ower or the system admiistrator oly. Ad they are set up with the CREATE ENDPOINT commad as well. The you ca GRANT CONNECT to the other users you wat to have access to the coectio. There are o default edpoits or Web methods. LearSmart Cloud Classroom: Video Traiig s Mauals

45 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) All HTTP coectios have to be autheticated ad you ca choose from a variety of autheticatio methods: Basic Digest NTLM Kerberos Itegrated SSL Ecryptio I order to use SSL (Secure Sockets Layer) you have to have certificates ad they have to be istalled o the cliet ad the server. Whe SSL is used it will ecrypt data betwee a SQL Server istace ad a cliet. For SSL to be used it must be requested by the cliet. SSL uses certificates so certificates must be istalled o both the cliet ad the server. Note: Performace suffers whe you use SSL for ecryptio ad decryptio. SSL Certificate Requiremets Certificates for SSL must: Be i the local or curret user certificate store Have a valid date rage Be a Server Autheticatio ticket The certificate must be created usig the KeySpec optio AT_KEYEXCHANGE I the Subject property of the certificate, it must idicate that the commo ame (CN) is the same as the host ame or the fully qualified domai ame (FQDN) of the server computer Note: Widows Server 2008 AD CS (Active Directory Certificate Services) is ofte used for PKI (Public Key Ifrastructure) certificates commoly used by compaies for their digital certificates. I additio to the above requiremets, the property AT_KEYEXCHANGE must use the keyspec optio ad the subject property must be: Commo ame FQDN (Fully Qualified Domai Name) Server Virtual Name Cluster Virtual Name Implemetig SSL 1. Get or create a certificate. 2. Import the certificate o SQL Server with MMC (Microsoft Maagemet Cosole). 3. Cofigure SQL Server to accept ecrypted coectios o the server ad the cliet side. 4. O the cliet side you should import the certificate usig MMC ad use the force ecryptio optio to request ecryptio. LearSmart Cloud Classroom: Video Traiig s Mauals

46 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig Database, Schema ad Object Security Parameters I this sectio we will go dow to the ext level of security from server security to database security. Pricipals Pricipals are idetities that ca that ca be grated or deied access to securables. They provide the meas for a user to autheticate ad be idetified at both the istace ad database level. They cosist of both idividual logis ad collectios like a Widows NT group. Each pricipal has its ow SID (Security Idetifier). The hierarchy of pricipals starts with the Widows pricipals (this ca be a group), domai logi or local logis. The ext level i the hierarchy is the SQL Server pricipal ad cotai logi oly. I database security there are users ad these users map to oe of the higher pricipals. What are Securables? Securables are simply aythig that ca be secured i SQL Server. I Widows you ca secure files ad registry data. O the server you ca secure edpoits, logis ad databases. I Schemas you ca secure agaist types, XML schema collectio, objects, etc. I the table below is a list of securables at the Widows, SQL Server ad database levels. Pricipals Widows level Widows Group Widows Local Logi Widows Domai Logi Files Registry Securables SQL Server Level Fixed Server Role SQL Server Logi Microsoft SQL Server SQL Server Logi Edpoit Database Database Level Fixed Database Role Database User Applicatio Role Database Applicatio Role Assembly Asymmetric Key Certificate Cotract Full-text catalog Message type Remote service bidig Role Route Service Symmetric key User Schema Figure 13: Pricipals ad Securables LearSmart Cloud Classroom: Video Traiig s Mauals

47 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Pricipals are give access to securables by permissio statemets. SQL Server permissios are: GRANT grats a pricipal access to a object. REVOKE Revokes a pricipal access to a object. DENY a dey geerally overrides a grat. You ca determie what permissios are give to you with this formula: All permissios grated to you +All permissios grated to public +All permissios grated to each role you re a member of -All deies =Permissios available to you If you Grat cotrol at the database level, this gives you permissio o all securables as well as all schemas. If you Grat select permissio o a schema, the select permissios are give o all of the objects. Basic Security Steps 1. You must have a valid SQL Server logi. 2. You must be added as a user of the database. 3. You must have permissio to all objects. DBO - User The system admiistrator ad sysadmi roles are the Database Owers (DBOs) i all databases ad aythig the sysadmi creates belogs to the DBO automatically. You caot delete the DBO user. Guest User Guest user exists i all databases but is disabled by default. If you eable guest user the all SQL Server logis will be allowed access without havig to create a user. The guest user permissios iclude permissios that are specifically grated plus all permissios grated to the public role. Uderstadig Roles Just as there are server roles -- there are database roles also. You ca have a fixed database role like you have a fixed server role, but i a database, you ca also have user-defied roles ad applicatio roles. These roles are database specific ad you will wat to use roles whe more tha oe user eeds the same set of permissios. Roles ca be used to create logis for idividual members or you ca create a logi for a Widows Active Directory. With a Widows Active Directory, members ca come ad go from the group without havig to add them ad subtract them from the role. They are icluded because they are a member of the Widows Active Directory group. A user ca be a member of may roles. I roles permissios are accumulative mius ay deies. A role may also be a member of aother role. LearSmart Cloud Classroom: Video Traiig s Mauals

48 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Oce a role is created ad permissios are assiged to that role, the permissios ca t be chaged. You ca add ew members after the role is i use but you ca t chage permissios. The public role works opposite of other roles i that with the public role you ca t assig membership (because everyoe is a member), but you ca assig permissios. Here is the sytax to create a role usig T-SQL: CREATE ROLE role_ame [ AUTHORIZATION ower_ame] Roles are securables at the database level. Oce a role is created, you ca cofigure the database-level permissios by usig the GRANT, DENY ad REVOKE statemets. To add members to the role you ca use the stored procedure: sp_addrolemember role_ame, user_ame. Roles should be used whe more tha oe user eeds the same permissios. For istace, you could have a Teacher role ad a Studet role. All of the teachers (users) i the Teacher role would have the same permissios grated. All of the studets (users) i the Studet role would have the same permissios grated to them, but the studet s permissios would be differet tha the permissios grated to the teachers. The teachers could also be members of the Studet role ad have access to the permissios grated to the studets i additio to the permissios grated i the Teacher role. Here are the steps to use to create a role: 1. Aalyze your database security eeds 2. Create a role to group idividual users who have the same permissio requiremets 3. Add those users to the role ad grat the permissios Schemas ad Applicatio Roles A schema is a amespace that cotais a collectio of objects that are scoped withi a database. The objects i a schema are ot exclusively owed by the schema. Objects withi a schema may have may owers ad a ower may ow objects withi several schemas. server.databaseame.schema.object To create a schema: Select the database where you wat the schema to exist: USE database1 Create a logi: CREATE LOGIN user1 WITH PASSWORD = password, DEFAULT DATABASE = database1, CHECK_EXPIRATION = ON CHECK_POLICY = ON Create a user: CREATE USER user1 LearSmart Cloud Classroom: Video Traiig s Mauals

49 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Add the user as a member of the database data reader role: EXEC sp_addrolemember db_datareader, user1 Create the schema which is specific to the database: CREATE SCHEMA schema1 CREATE SCHEMA schema2 The you ca create objects withi the schema (like a table): CREATE TABLE schema1.table1 ID (varchar(100) NOT NULL) CREATE TABLE schema2.table1 ID (varchar(100) NOT NULL) Now to associate a user with the schema: ALTER USER user1 WITH DEFAULT_SCHEMA = schema1 The user idetified by user1 is a ower of the schema schema1. Notice that there are two tables with the same ame, table1, oe exists i schema1 ad the other i schema2. You ca do this with schemas because the fully qualified ame icludes the schema ame. If you do t fully qualify a object ame, if you use SELECT * FROM table1 for istace, SQL Server will first check the users default schema for the object. The if the object is ot foud i the user s default schema, SQL Server will look for it i the DBO schema. Ad if the object is ot foud there, you ll get a error. Applicatio Roles Applicatio roles are associated with applicatios ad are activated whe a user rus those applicatios. This allows a level of protectio where the applicatio ca have permissios that are ot ecessarily grated to the user. With applicatio roles, a user has access to a database through a applicatio. The applicatio has permissios assiged to it ad the user iherits those permissios through the applicatio. Therefore, ay user who rus a applicatio that is assiged a applicatio role ca access data accordig to the permissios of the applicatio - rather tha the permissios assiged to the user. Applicatio roles have o members ad are activated whe a user rus the applicatio. They ca t access metadata ad ca oly access databases as a guest. Oce a applicatio role is evoked, all coectio permissios are replaced by the applicatio role permissios. A ew feature that has bee added to SQL Server 2008 allows you to tur o ad tur off applicatio roles. Applicatio roles ca t be called from stored procedures ad they are database specific. You create a applicatio with T-SQL as follows: CREATE APPLICATION ROLE role_ame WITH PASSWORD = password [, DEFAULT_SCHEMA = schema_ame ] LearSmart Cloud Classroom: Video Traiig s Mauals

50 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) CLR Security Commo Laguage Rutime (CLR) security is defied i three locatios: Machie Policy policy set for maaged code o the box that SQL Server is o. User Policy policy set for the user SQL Service is ruig uder. Host Policy policy set for the host SQL Server. The effective permissios are oly where the three itersect ad ot the accumulated sum of the three. For istace, permissios grated i the machie policy may be limited by the user policy. It s oly where the permissios i all three policies agree that permissios are grated. Figure 14: Uderstadig CLR Security By default CLR has miimum permissios assiged uder the permissios of the SQL Service Accout. Permissio Sets: SAFE the preferred permissio settig. By default the CLR rus uder the permissios of the SQL Server Service accout so you should make sure that this accout has miimum permissios. SAFE permissios do t allow access to resources exteral to the istace of SQL Server like files, evirometal variables, the etwork or registry. EXTERNAL_ACCESS choose this if you wat the CLR assembly to have access to exteral resources ot available with SAFE permissios. UNSAFE have urestricted access to resources both withi ad outside a istace of SQL Server (oly sysadmi ca register UNSAFE assemblies). Shared State Whe usig CLR, shared state refers to iformatio shared betwee user sessios. This ca cause problems. Ad for this reaso, shared static variables or data members are ot allowed to be updated for the SAFE or EXTERNAL_ACCESS permissios. Read-oly static members, however, are allowed for SAFE ad EXTERNAL_ACCESS. LearSmart Cloud Classroom: Video Traiig s Mauals

51 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Service Broker Service broker applicatios sed, receive ad process messages. These messages costitute a coversatio betwee applicatios i two databases. Service Broker maitais the queues for sed ad receive data at both the sedig ad receivig database. This feature is built ito SQL Server 2008 ad it allows asychroous processig of iformatio (messages) through those queues. This iformatio passes through the edpoits ad is trasported via TCP/IP coectios. Service Broker security uses certificates to establish credetials to map operatios from a remote database to a local user ad to establish credetials at remote databases. The certificate is shared betwee databases. These coversatios ca be used to automate processes like chagig the cotet of tables i a remote database. There are two types of security for Service Broker: 1. Dialog Security 2. Trasport Security Dialog Security Autheticates ad ecrypts data betwee services which protects i-trasit data from someoe seeig it or makig chages. Dialog security is optioal ad is cofigured at the service level usig certificates. Trasport Security Trasport security is supported by Service Broker ad applies to all messages passed betwee two servers. It blocks messages from uauthorized databases ad detects alteratios that occur to messages i-trasit. You ca place poit-to-poit ecryptio betwee servers ad it uses certificates or Widows Autheticatio based o the edpoit autheticatio optio. Certificates ad Service Broker For Service Broker you make certificates ACTIVE FOR BEGIN_DIALOG; that makes the certificate available to Service Broker. Service Broker also uses the valid time refereces i the certificates ad will dey access if the time has expired. Whe creatig a certificate for Service Broker, the key modulus must be less tha The key legth must be less tha 32K ad must be a multiple of 64 bits. Desigig a Security Policy ad a Audit Pla Policy Based Maagemet Policy Based Maagemet (PBM) is ew to SQL Server PBM allows admiistrators to defie rules ad eforce those rules o oe or more SQL Servers. This feature makes the admiistrator s job easier, allowig them to maage oe or more servers ad keep the servers i compliace with the policies. You ca set up a policy to prevet some thigs from occurrig that violate your policy. Ad you ca potetially fix other thigs with the policy by chagig a database optio or server optio so that it complies with your policy. This ca be doe either locally or across multiple servers. You ca create either required policies or optioal policies o a database. Ad you ca create SQL Server Aget alerts that occur o policy failure. LearSmart Cloud Classroom: Video Traiig s Mauals

52 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) I your policies you ca set up coditios such as a requiremet that every database has to be backed up weekly or eforces amig covetios o databases. The first thig you do for PBM is create a policy. You ca choose a target ad a policy to check or force compliace to that policy. A target has a type like: Table Surface Area Cofiguratio Server Database Idex Each target has a set of properties that you ca check or set, each of these properties are defied as a facet. Here are some of the facets that are available with Surface Area Cofiguratio: Surface Area Cofiguratio Databas Eabled SQLMailEabled XPCmdShellEabled CLRItegratioEabled Figure 15: Surface Area Cofiguratio Facets You ca set a coditio from a set of facets ad from a specific target type. The coditio is the thig that you wish to be true. If the coditio is violated you ca set the policy to respod i two ways: 1. Check ad log the violatio (uses evet otificatios) 2. Prevet the violatio Evaluatio Modes You ca specify demad-oly whe specifically requested, o demad with o alerts or o chage: prevet (uses DDL triggers). Prevet ca oly work if the chage or facet ca occur withi a trasactio ad ca be caught ad rolled back by a DDL trigger. I SQL Server Maagemet Studio you ca set up the policies -- you ca also: Evaluate the policy item Evaluate ad report oly Apply (This will chage the items that are fixable to come ito compliace with your policy) LearSmart Cloud Classroom: Video Traiig s Mauals

53 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Selectig Permissios Permissios are stored i a bit mask iteger. I this iteger each bit ca eable (bit =1) or disable (bit = 0) a permissio. The fuctio sp_helprotect returs iformatio o permissios that are grated i SQL Server. The parameters for sp_helprotect are object_statemet, security_accout, grator, ad type. If you execute sp_helprotect without ay argumets, you get iformatio o all of the permissios grated as show below: Figure 16: The sp_helprotect Fuctio You ca view the permissios grated to the curret user as a iteger usig the T-SQL - SELECT PERMISSIONS() - ad as show below, you ca check for idividual permissios as well. The iteger retured will represet the bit mask described above. LearSmart Cloud Classroom: Video Traiig s Mauals

54 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 17: Selectig Permissios To view a list of permissios for the curret user i the server, execute the followig query: SELECT * FROM f_my_permissios (NULL, SERVER ) ; Permissios for the database Advetureworks: USE Advetureworks; SELECT * FROM f_my_permissios (NULL, DATABASE ) ; Evet Notificatios Evet otificatios sed iformatio to a Service Broker service i respose to a variety of T-SQL DDL statemets, DML (Data Maipulatio Laguage - Trasact-SQL) items ad SQL Trace evets. They allow you to capture ad respod to these evets as they occur o SQL Server. They occur outside the trasactio ulike DDL triggers so they do t use trasactio resources. You ca use evet otificatios as a alterative to DDL triggers ad SQL Server trace. Evet otificatio is asychroous i processig with the message so it will scale higher tha DDL triggers. They ca otify you whe a evet occurs like creatig databases or tables. Exteded Evets Exteded evets like other evets ca be captured ad logged. SQL Server Exteded Evets work with ETW (Evet Tracig for Widows). LearSmart Cloud Classroom: Video Traiig s Mauals

55 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig a Ecryptio Strategy Trasparet Data Ecryptio (TDE) is ew to SQL Server 2008 ad ecrypts data, trasactios logs ad backup files at the database level. If a database has TDE active, tempdb will be ecrypted alog with the database. This could produce a performace issue (Microsoft says that the overall performace impact is 3-5%). Note: FILESTREAM data is ot ecrypted with TDE. If you are usig replicatio it may require additioal steps. You may wat to ecrypt the distributios or chaels. You may also wat to ecrypt the BCP (Bulk Copy Program) itermediate files. Whe you ecrypt a database, the backups are also ecrypted. Whe you are ecryptig you must keep a certificate for each database backup. If you lose the certificate the restore or attach is ot possible. Data Ecryptio There are cases where you wo t eed to ecrypt a etire database (for example, if a table icludes a customer s credit card iformatio or persoal data). I this case you may oly eed to ecrypt the colums with the sesitive data. With DE (Data Ecryptio) you ca ecrypt data dow to the colum level rather tha the etire database. You ca hide the data usig a password or a key usig: Symmetric keys Asymmetric keys Certificates T-SQL For best practice you will wat to use symmetric keys because they are faster tha certificates or asymmetric keys. Just remember, asymmetric keys have higher security tha symmetric keys, so the tradeoff for speed is that the data is less secure. Special Cosideratios for FILESTREAM Sice FILESTREAM is ot supported by TDE, you have two optios you ca use to ecrypt FILESTREAMS: 1. Use DE by colums to ecrypt the varbiary colums. 2. You could place the FILESTREAM o a ecrypted Widows drive. LearSmart Cloud Classroom: Video Traiig s Mauals

56 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Domai 3: Desigig a Database Solutio for High Availability I this sectio we will tur our attetio to high availability i plaig ad desigig a database solutio. A uderstadig of this sectio ca help you icrease overall availability ad decrease time that data is uavailable to users. You will lear how to maage failovers i case of system or disk failure, how to uses thigs like replicatio, mirrorig ad log shippig i your database desig for icreased availability. Desigig a Failover Clusterig Solutio Whe clusterig is implemeted, two or more servers preset themselves to a etwork as a sigle virtual server. Simply stated, clusterig allows oe physical server to take over the resposibilities of aother physical server i the evet of a failure. If oe server fails, aother server ca take over without the user oticig the problem. Each server i the group is geerally referred to as a ode. The maximum umber of cluster odes that may be supported o SQL Server Eterprise is 8. You ca select oe of two types of clusterig: Active/Active both servers o oe machie. Active/Passive oce server o each machie i the group of two or more. You will use clusterig whe you wat to protect a etire server or whe you wat to provide high availability. A cluster ca be admiistered from ay ode (or server) i the cluster ad you ca failover to ay ode as well, automatically or maually. Although clusterig ca protect a etire server, it ca t protect from idividual disk failure, so you should provide disk protectio usig RAID. Clusterig also provides a virtual server ame ad virtual IP address so that cliets ca be redirected automatically i case of server failure. It also supports full-text search ad both the SQL Server egie ad the SSAS (SQL Server Aalysis Services) ca be clustered. Note: The maximum umber of SQL Server istaces per cluster is 25. The Clusterig Resource Group I each cluster created, there is a sigle resource desigated as the quorum resource that maitais the data ecessary for the recovery of the cluster. The cluster log ad state iformatio is vital, therefore access to the quorum resource is ecessary for a ode to form a cluster. Ad commuicatio with the quorum resource is ecessary for odes to remai i a existig cluster. This iformatio is ode idepedet ad should be o a separate disk 500MB or larger. LearSmart Cloud Classroom: Video Traiig s Mauals

57 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Cluster Setup Cosideratios Whe desigig a cluster cofiguratio the first thig to cosider is how may odes you wat to iclude i the cluster. SQL Server Stadard supports two odes i a cluster, Eterprise supports up to eight. You will also eed to istall MSDTC (Microsoft Distributed Trasactio Coordiator) which is required for the followig: Distributed trasactios SSIS (SQL Server Itegrated Services) Workstatio compoets Here are some dos ad do ts for usig cluster setup: 1. You caot compress the SQL Server disk for clustered istaces or setup will fail. 2. You should disable NetBIOS o the private etwork cards. 3. You must be the local admiistrator i order to istall clusterig. 4. Clusterig caot be istalled o a domai cotroller. 5. DO NOT istall ativirus software o clustered istaces. Whe usig MSCS you must have a trusted coectio ad the coectio should ot be i the local Admiistrator group. Clusterig supports rollig upgrades, meaig you ca apply a service pack to a ode i a cluster ad the failover ad apply that service pack to aother ode. As metioed earlier, failovers ca be either maual or automatic. To failover maually you ca either pull the plug o a hard drive or pull the plug o the heartbeat. Either method will cause the cluster to failover. Desigig Database Mirrorig Clusterig, log shippig ad database mirrorig each protect the data i a database i differet ways. Clusterig provides a way to fail over oe server to a backup server i case of a disaster. Log shippig periodically ships the trasactio log of a database to oe or more secodary server istaces. A maual failover to a secodary server is required i case of a disaster. Mirrorig maitais a up to date backup copy of a database that ca be used i case of a failure. Clusterig Log Shippig Mirrorig Protects a etire server Ships the log of oe database Keeps a mirrored copy of a etire database Figure 18: Comparig Backup Types Database mirrorig, like disk mirrorig, allows you to keep a hot or warm stadby for a database. With mirrorig there will be a exact copy of a database maitaied o a differet server which will icrease availability. LearSmart Cloud Classroom: Video Traiig s Mauals

58 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) The primary database ad the mirror database must be o differet istaces of SQL Server. The pricipal server will cotai the primary database ad the mirror server will have the copy of the protected database that s o the priciple server. You ca also have a optioal witess server. The witess server will moitor activity ad provide automatic failover if you choose automatic failover. You ca have cliet failover as log as you provide a coectio strig that idetifies the mirror parter. Note: The databases that will be mirrored must use the full recovery mode (Discussed i Domai 4: Desigig a Backup ad Recovery Solutio). Note: You caot mirror ay of the system databases. Whe Should You Choose Mirrorig? Mirrorig is a less expesive alterative to clusterig. So you may wat to use it if you do t wat to or ca t ivest i the hardware required for clusterig. Mirrorig ca be easier to implemet ad maitai tha clusterig. Your eeds for high availability may oly apply to a sigle database ad ot the etire server. If this is the case, mirrorig would work better for you tha clusterig. How Mirrorig Works Remember with replicatio, every trasactio log record is set to a distributer ad the distributed to all the subscribers. With mirrorig, every trasactio log record is set from the pricipal -- directly to the mirror. The mirror the replicates each isert, update ad delete i the same order as the pricipal. If you wat to give cliets the ability to failover you have to set the mirror up with a witess ad i the high safety mode. Ad the cliet coectio must specify a failover parter. About the Mirror Database You ca create the mirror database usig RESTORE WITH NORECOVERY. Therefore you wo t be able to access the database directly; a sapshot of the mirror ca be created however. Note: The database ame of the mirror has to be the same as the pricipal database ame. Mode Beefits There are three modes available with mirrorig: High availability mode High protectio mode High performace mode LearSmart Cloud Classroom: Video Traiig s Mauals

59 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Each mode comes with a advatage ad a tradeoff as show below: MODE Automatic Failover Full Protectio From Data Loss High Availability Mode x x High Protectio Mode x High Performace Mode Figure 19: Comparig Mirrorig Modes To set up for the high availability mode or the high protectio mode, you set Safety = full i the setup. If you wat automatic failover (high availability mode) you must provide a witess server. High Availability Mode Descriptio With high availability, a trasactio writte to the mirror server is verified by the pricipal server before the ext trasactio. So every trasactio is guarateed before the pricipal server proceeds with the ext. If a write fails o the mirror server, the it ca t complete o the pricipal. This guaratees o loss of data but it comes with a performace cost. High availability also provides automatic failover. I this case you will eed to supply a witess server that will serve as a moitor ad performs the failover. Whe the pricipal goes offlie, the witess fails over to the mirror. The whe the pricipal comes back olie, it becomes the mirror ad the origial mirror is the the pricipal. Note: This mode is best whe you have fast, reliable etwork coectios. High Protectio Mode This mode is the same as the high availability mode without the witess. I this mode you get full protectio but you do t get automatic failover -- failover is maual. High Performace Mode With high performace, data is writte first o the pricipal ad the the mirror. But the differece betwee high availability ad high performace is this: With high performace the primary cotiues the ext trasactio without cofirmatio from the mirror that the data was writte there. This mode works faster but with some risk of data loss ad you ca t get automatic failover whether you have a witess or ot. You caot do a maual failover i this mode. You ca do a forced service failover but you could potetially lose data. Sytax for forced service: ALTER DATABASE A SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS The high performace mode is usually chose whe the primary ad mirror servers are separated by a log distace. I this case etwork glitches could cause frequet failovers if you use automatic failover. A alterative to the high performace mode would be log shippig where you would have more cotrol. LearSmart Cloud Classroom: Video Traiig s Mauals

60 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Steps to Mirrorig 1. Set up commuicatio betwee the primary ad the mirror. a. For trusted servers - create a logi ad grat CONNECT o the edpoits. b. For servers ot trusted create a certificate ad make the certificate active for Begi_Dialog. 2. Create edpoits (Must be doe by the sysadmi). 3. Set recovery mode to full o the primary. 4. Backup the database ad log, the restore them o the mirror. (Database o the mirror must have the same ame as the origial with the NORECOVERY optio.) 5. Make a pla to copy logis, jobs, alerts etc. Susped vs. Stop If you have a failure such as the witess goig away -- you have to make a decisio to susped mirrorig or stop mirrorig altogether. If you susped mirrorig your trasactio logs will o loger trucate ad you must resume quickly. If your trasactio log will likely fill up before you ca complete the repair you may wat to stop mirrorig istead. If your trasactio log fills up while you are fixig the problem, you ca resume mirrorig ad let it catch up or you ca stop mirrorig. Note: If you stop mirrorig at ay poit, you will have to redo the mirrorig from scratch. Automatic Page Repair Automatic page repair detects tor pages ad repairs them. Oce a tor page is detected, the a request is automatically made from the other parter ad the page is repaired o the primary server. Automatic page repair ca fix CRC (Cyclic Redudacy Check) errors ad logical errors (tor page, bad checksum ad pages marked as restore pedig). Sapshots for Reportig Because the mirror database i the recovery mode, you caot access it directly. But what you ca do is create a sapshot agaist the mirror for reportig. A sapshot is a picture of the database at oe poit i time (the time of the sapshot). Note: You must have a pla to recreate the sapshots periodically. Problem: How do you create a coectio that will coect to the most recet sapshot? Solutio: If you use the database ame (or some other ame) for the sapshot the you will have to delete the previous sapshot ad give the same ame to the ew sapshot. The you have oly oe ame to referece. LearSmart Cloud Classroom: Video Traiig s Mauals

61 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig a High-Availability Solutio Based o Replicatio We have discussed clusterig which protects a etire server ad mirrorig, which protects a etire database. Replicatio is eve more localized ad ca protect idividual tables i a database. Icreased availability is achieved by replicatio at the database or table level. Replicatio icreases site idepedece by makig local copies of data o each site. If oe site goes dow the other sites are ot affected. This is accomplished through data distributio from a publisher to all subscribers of that data. Let me explai I a replicatio setup you have a publisher, a distributer ad oe or more subscribers. The publisher is the source of the origial data ad the distributer hadles the distributio of the data to the subscribers ad the chages from the subscribers. This data is i the form of multiple small sets of logically coected iformatio -- like sales records for several retail stores. Simply stated ad simply illustrated below: The publisher origiates ad maitais the source data ad seds chages to the distributer. The distributer receives those chages from the publisher ad delivers the chages to subscribers. Ad fially the subscriber database receives the chages ad keeps a curret copy of the data. Figure 20: The Replicatio Process You ca have may publicatios i a database ad publicatios are what you replicate. A publicatio ca be oe or more articles. For istace, you could have a employee database stored o the publisher. Oe perso may eed basic iformatio from the employee database such as cotact iformatio. Aother perso may eed more detailed iformatio like pay scale ad curret salary. LearSmart Cloud Classroom: Video Traiig s Mauals

62 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) A article ca be a table, a subset of a table, a view or a user defied fuctio. A article ca be some or all of the colums, some or all of the rows. You ca have customized filterig for a article such as i the case of a employee database, oly employees i a certai departmet or maagers oly. A publicatio is a collectio of oe or more articles ad is the uit of replicatio. Subscribers will subscribe to a etire publicatio but ot a article. Subscriptios ca be pushed which meas the publisher creates the subscriptio. Or they ca be pulled, which meas that the subscriptio is created by the subscriber. You ca also replicate stored procedures. For istace, if you wated to adjust the pay of all your employees for a cost of livig icrease, rather tha make the chages ad have the tables with the chages distributed, you could create a procedure that would adjust the pay ad replicate it to the subscribers of that particular publicatio (all of your stores for istace). Replicatio ca be set up ad maaged i SSMS usig the Replicatio tab i Object Explorer. The Distributer Aget The distributer reads from the distributio database ad delivers the data to the subscribers. It does all of the work for the subscribers. Ad push adds eve more work because the distributer has to push to each subscriber. For high scalability you ca have the subscribers share the workload of the distributer by havig the distributer aget ru o each subscriber. This way each subscriber does its ow distributio to eve more subscribers. This allows you to scale replicatio to a much higher level. Types of Replicatio Trasactioal replicatio starts with a iitial sapshot whe the subscriber first subscribes to the publicatio ad the replicates the trasactios oly. You ca ru cotiuous replicatio where the updates ru real time or you ca have the aget ru o a schedule where updates are periodic (e.g. every 5 miutes). With trasactioal replicatio the subscribers are allowed to update the data as well. You ca select from two modes for the Updatig Subscribers Optio: DTC (Distributed Trasactio Coordiator). Queued Updatig Subscribers: I this mode a table is created o the subscriber s server. The at syc time the publisher requests the table ad the chages are uploaded. There ca be coflicts if subscribers make chages to the same data. Merge Replicatio allows idepedet chages to be made by the subscribers but you must have a pla to capture ad resolve coflicts that may occur. Sapshot Replicatio Sapshot replicatio will refresh the etire publicatio o some periodic basis. Choose this type if you have major but ifrequet chages ad updates ad they are ot required immediately by the subscribers. With sapshot replicatio chages made by the subscribers are ot updated o the publisher or o ay of the other subscribers. Chages made by the subscribers will be overwritte the ext time the sapshot refreshes. LearSmart Cloud Classroom: Video Traiig s Mauals

63 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Trasactioal Replicatio Choose this type of replicatio whe the subscribers eed miimal latecy. You ca also improve latecy by allowig the subscribers to distribute to other subscribers as we discussed earlier. Choose this type also if the publisher performs may iserts, updates ad deletes. Trasactioal replicatio gives you every chage to the record. For istace i the case of ivoices, the subscriber will receive the chages like ivoice opeed, ivoice assiged, ivoice evaluated, ivoice scheduled for paymet, ivoice paid ad closed. Where with merge ad sapshot the subscriber may oly get oe chage recorded at the time of the update. You will eed to use trasactioal replicatio if the publisher or the subscriber is ot a SQL Server istace. Trasactioal replicatio requires a reliable etwork. It also requires a primary key restrait o the tables. If you use idetity colums, there are issues like the idetity colum values o the subscriber that must be dealt with. LOBs are supported here. Peer to Peer Replicatio Where trasactioal replicatio is hierarchical peer to peer is ot everyoe is a peer. This type of replicatio is iteded to scale out reads i a eviromet where you ca miimize writes. Best practice is to make each ode its ow distributer. Objects ca oly be published oce ad odes ca be added without quiescig. Note: SQL Server 2008 provides a GUI to set up peer to peer topology. Merge Replicatio You will wat to use merge replicatio whe the subscribers eed autoomy. If they eed to make chages to the data offlie you should set replicatio up so that few coflicts are expected. There are three ways to defie a coflict i merge replicatio. 1. At the colum level 2. At the row level 3. Logical level coflicts Set your coflict detectio at each of these three levels to catch all coflicts. Merge works great whe you have a ureliable etwork where you have mostly discoected idepedet subscribers. It requires a uique idetifier colum ad it must be tagged with the rowguid attribute. It also adds several ew triggers ad system tables at the publisher ad the subscriber. With merge replicatio you ca have customized filterig. This allows much more flexibility i what data is offered to which subscribers. LearSmart Cloud Classroom: Video Traiig s Mauals

64 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Here are some ew features available o SQL Server 2008 for replicatio: You ca perform replicatio over secure coectios like HTTPS. Oracle ca publish i SQL Server You ca use tracer tokes. These tokes will track the time it takes for the toke to get from the publisher to the distributer to the subscriber. It provides real time latecy measuremet. I SQL Server 2008 you ca also iitialize from a backup. The first step i desigig replicatio for high availability is to decide: What data should be published Who, where ad how may subscribers you will have Ad how up to date your data eeds to be You wat to pla for a extreme disaster ad how to get the system back as fast as possible. You also eed to pla for more data to be widely available. You should also cosider your etwork capability Is it reliable? Is it high capacity? Is it fast? Sapshot Trasactioal Peer to Peer Merge Use whe you have major but ifrequet chages - ot required immediately by subscribers. Use whe subscribers eed miimal latecy. Chages are updated at the subscribers as they occur. Use i eviromets where you eed to scale out reads - ad you ca miimize writes. Use with idepedet subscribers that are mostly discoected - ad you ca miimize coflicts. Work Load Cosideratios Figure 21: Replicatio Types It is difficult to move the distributer oce it s bee set up. So you must be careful to choose a appropriate distributer. If the distributer is with the publisher, it may decrease the capacity of the publisher. The subscribers are aother workload cosideratio. You should cosider how may copies will eed to be distributed. How will those copies be divided? Will you use filterig? Will your replicatio be doe regioally or locally? For high availability, you will wat to schedule the subscriptios ad do the admiistratio. You also eed to decide where the aget work will be doe o the subscriber or the distributer. You eed to compare the subscriptio type you will be usig push or pull. Most ofte you will use push subscriptios but you eed to cosider both push ad pull subscriptios. LearSmart Cloud Classroom: Video Traiig s Mauals

65 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Choosig a Solutio Type To choose a solutio type you must: Choose a topology desig. Pick your replicatio type: Sapshot Trasactioal Merge Peer to peer Choose betwee push or pull subscriptio. Determie how may copies or subscribers must be maitaied. Oce you have chose your solutio type you should cosider what requiremets you will have for the distributer. Recoverig from a Replicatio Failure To recover from replicatio failure you should syc the distributer with the backup. Ad optioally you ca syc the publisher with the backup based o performace. Replicatio failures ca occur i may ways ad ca occur o the publisher, o the distributer or o the subscriber. For istace, if the publisher fails, whe you restore it, data may be lost ad it may fall behid the distributer. You eed to lear about each type of failure that ca occur ad pla how you will recover from each oe. Note: Make sure you script everythig durig the iitial setup. This will make recovery much easier. Peer to Peer Recovery Peer to peer replicatio is trasactioal replicatio without the hierarchy. Every database is a peer. The Problem: If oe peer drops out for some reaso while the others keep ruig. The updates will fall behid. The Solutio: Use all the available data to syc all the databases ad restore ay lost trasactios. LearSmart Cloud Classroom: Video Traiig s Mauals

66 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) A B C I the example above, there are three peers (A, B ad C). If peer B drops out the the recovery steps are as follows: 1. Ru the distributer to syc A with C A ad C are ow i syc. 2. If B is available -- ru the distributer to attempt to syc B with A ad B with C This makes sure that you recover as much data as you ca from B ad B is i syc as well. 3. Delete the replicatio iformatio from B. Use the stored procedure sp_remove_distributer_ db_replicatio. This takes B completely out of the peer to peer relatioship with A ad C. 4. Backup database A. 5. Restore it to B. 6. Recreate the publicatio o B ad the subscriptios at A ad C. 7. Ru the distributio aget to syc B with A. 8. Reseed the idetity colums i B. 9. Recreate the subscriptio from B to C ad from C to B. 10. The ru the distributio agets. I doig this you will make sure that A ad C is i syc ad B has as much data as possible ad is i syc with A ad C to the greatest extet possible. Sychroizatio Sychroizatio occurs immediately after iitializatio. It is the process of propagatig all data ad schema chages from the publisher to the subscribers. Trasactioal sychroizatio rus cotiuously ad all the isert, update, delete ad schema chages are applied to the subscriber after they occur o the publisher. Sapshot sychroizatio occurs o a schedule. Durig a syc, all of the data is copied from the publisher to the subscriber ad the schema is refreshed if there are ay chages. For merge sychroizatio the data chages are replicated o demad whe the subscriber requests it. Chages are uploaded from the publisher to the subscriber. The the subscriber chages are dowloaded to the publisher where coflicts are detected ad resolved. Moitorig Replicatio You ca use the System Moitor to watch thigs like trasactios per secod ad latecy. You also have the SQL Server Aget alerts for replicatio. Ad i SQL Server Maagemet Studio there is a replicatio moitor tool. LearSmart Cloud Classroom: Video Traiig s Mauals

67 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Validatio Validatio compares the data o the subscriber with the data o the publisher to validate the published data. There are two types of validatio you ca choose: 1. Cout the rows i each table 2. Biary checksums for each row i the table Desigig a High-Availability Solutio Based o Log Shippig Aother way to icrease availability of your servers is to use log shippig. Where clusterig protects a etire server, you ca use log shippig to ship the trasactio log of a sigle database from a primary server (productio server) to oe or more secodary servers at regular itervals. The primary goal of log shippig is to provide security aroud the file system. There are three operatios that occur durig a log ship: 1. The trasactio log is backed up o the primary server istace (job 1). 2. The trasactio log is copied to the secodary server istace (job 2). 3. The trasactio log is the restored o the secodary server istace (job 3). Figure 22: Uderstadig Log Shippig If there are more tha oe secodary server istaces, steps two ad three are repeated for each additioal secodary server istace. There is a optioal third server istace kow as the moitor server. This optioal server istace records the history ad status of the backup ad restores it ca also raise alerts if there are failures durig the ay of the scheduled operatios. Ulike clusterig, log shippig cofiguratio does ot automatically failover. If there is a failure of the primary database ad it becomes uavailable, the secodary database(s) must be brought olie maually. LearSmart Cloud Classroom: Video Traiig s Mauals

68 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) All admiistratio of the log shippig cofiguratio is performed from the primary database usig SQL Server Maagemet Studio. Ad you must use the full or bulk-logged recovery model o the primary database. To iitialize the secodary database you should restore a full backup of the primary database usig either the NORECOVERY or STANDBY optio. The moitor server cotiuously tracks the details of log shippig, icludig: Whe the last backup occurred. Whe the last copy ad restore occurred o the secodary server istace. Ay backup failure alerts. I the illustratio below you see that the primary server istace performs job umber oe, the backup. The backup share is available to everyoe ad the secodary servers perform job two, the copy job. The the secodary server istaces also perform job three ad restore the trasactio log for the fial step. All the while the moitor server istace is watchig ad recordig the evets ad ay failures that may occur. Iteroperatio Requiremets Log shippig iteroperates with mirrorig with oe restrictio; the log ship pricipal has to be the same as the mirrorig pricipal. Log shippig also iteroperates with replicatio. Replicatio will stop however, whe the log ship fails over. Switchig Roles Oe major distictio betwee clusterig, mirrorig ad log shippig is that with log shippig you have to maually switch roles after a failover. To switch roles you should: 1. Copy ad restore ay udelivered logs. 2. Perform a tail-log backup o the primary ad restore it o to the secodary server. 3. Ru recovery o the secod database -- the sytax for this is RESTORE mydb WITH RECOVERY. 4. Trasfer the metadata across. Make sure you brig all the ecessary iformatio (aythig that the database depeds o) across, like -- logis, SQL Server Aget jobs, edpoits ad messages. 5. Ad fially -- disable the log shippig jobs. Oce you have completed the log ship failover ad you ve switched roles you will eed to redirect your cliets to the ew server. LearSmart Cloud Classroom: Video Traiig s Mauals

69 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Whe you fail over to a secodary server istace there are some istace level objects that you will eed to maage. Here is a list of the objects that eed to be cosistet betwee the databases for a successful failover: Server cofiguratio Ay credetials associated with the database Cross-database queries Ecrypted data ad the database master key User defied error messages Evet otificatios Exteded store procedures Full-text SQL Server aget jobs Logis Permissios Replicatios Server Broker applicatios Startup procedures Server triggers Reiitializig the Secodary To reiitialize the database after failover you ca simply drop the database ad recreate the log shippig. You ca back up the database ad the log -- the restore the database with o recovery or stadby the restore the logs with o recovery or stadby as well. Usig Log Shippig for Reportig You ca set up a secodary log shippig database for reportig. To do this you eed to leave the database i the Stad-by mode. This allows read-oly coectios to the database for reportig. Whe a log restore occurs the users must be discoected or log restore will wait util there are o users before it proceeds. Cosistecy Check You ca check cosistecy o the secodary rather tha the primary. This will take some of the work load off of the primary. To do this you ca ru DBCC (Database Cosistecy Checker) o the secodary. If the DBCC fails, the ru it o the primary to see if the problem origiated there, if so, it must be fixed o the primary. LearSmart Cloud Classroom: Video Traiig s Mauals

70 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Moitor Server As I metioed earlier, the moitor server is optioal for log shippig. You ca retrieve some valuable iformatio, however, if you choose to use it. The moitor server moitors whe logs are backed up o the primary ad whe logs are copied to ad restored o the secodary. You ca set up some alerts for failure otificatio as well. These alerts work with SQL Server Aget job otificatio ad must be set up whe you implemet log shippig. You ca get reports usig SQL Server Maagemet Studio or you ca use the stored procedure: SP_HELP_LOG_SHIPPING_MONITOR. Moitor Server Tables There are some tables that support the moitor service that you ca access: Log_shippig_moitor_alert has the SQL Server Aget job ID of the log shippig alert job. Log_shippig_moitor_error_detail this table stores the error details for log shippig jobs. You ca query this table to see ay errors that may have occurred for a aget sessio. Log_shippig_moitor_history_detail this table store the log shippig aget history iformatio. You ca query this table as well. Log_shippig_moitor_primary stores oe moitor record for the primary database i each log shippig cofiguratio. Log_shippig_moitor_secodary stores oe moitor record for the secodary database icludig iformatio about the last backup file ad the last restore file. Domai 4: Desigig a Backup ad Recovery Solutio Desigig a Backup Strategy Plaig for database recovery ot oly accouts for the largest portio of this test, it is also importat to have a workig pla for recovery or vital data could be lost forever. I this sectio you will lear strategies for backup ad restore, how to desig for various types of failure ad recovery solutios ad how to desig for miimum loss durig catastrophic system failures as well. Recovery Models There are three recovery models we will discuss i this sectio: simple, full ad bulk-logged. Simple Recovery With the simple recovery model, the trasactio log is automatically trucated so it will ot fill up. Oe catch here is that the trucatig will ot start util you do your first full backup. So you could have a situatio where your trasactio log file keeps growig ad does t trucate the solutio is simply to do a full backup of the database. Sice the trasactio log is automatically trucated, chages that occurred sice the last full backup will be lost whe you recover. LearSmart Cloud Classroom: Video Traiig s Mauals

71 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Choose simple recovery whe poit of failure recovery is ot ecessary. For istace, i a situatio where you have a read oly database where you ca risk the loss of data from the last full backup. If the chages are easy to redo or there just are t may chages, you might choose this recovery mode. Some other factors that you might cosider i choosig simple recovery are if you do t have the resources (staff, time or traiig) to backup ad restore the trasactio logs. Full Recovery Full recovery allows data to be recovered without work loss (o committed trasactios lost). I the evet of a catastrophe, you ca isure full recovery by keepig appropriate log backups, mirrorig the log, ad keepig the master, data ad log physically separated ad whe there is a failure, you immediately do a full tail-log backup. Choose full recovery if you wat poit-i-time recovery or if you wat to restore idividual pages. Of course you have to be willig to bear the additioal admiistrative costs of the trasactio log backup to use this mode. Bulk-Logged Recovery Bulk-logged recovery mode is desiged to be used with full recovery mode. If you are doig bulklogged iserts ad you do t wat to fill up the trasactio log -- you ca switch to bulk-logged recovery mode, the perform the bulk iserts ad switch back agai to full recovery mode ad back up the trasactio log. This mode does require trasactio log backup but it miimizes required log space. The dow side is if a bulk operatio occurred sice the last backup, you could lose everythig that occurred sice the last full backup. There is o poit i time recovery i this mode. You will use this mode whe you eed miimally logged bulk operatios ad you ca discoect the users durig the backup or accept the possible loss of data. Here are the steps for bulk-logged recovery: 1. Use the full recovery mode. 2. Perform a extra trasitio log backup. 3. Switch to the bulk-logged recovery mode. 4. Perform the bulk-logged operatios. 5. Switch back to the full recovery mode. 6. Perform aother trasitio log backup. Oce you switch to bulk-logged recovery mode, you are at risk of losig your data util you switch back to full recovery mode ad do a trasactio log backup. Backup Compressio There are may third party vedors that supply good applicatios backup compressio for SQL Server. SQL Server Eterprise editio, however, provides built i backup compressio. Note: All editios of SQL Server ca restore compressed backups. LearSmart Cloud Classroom: Video Traiig s Mauals

72 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) FILESTREAM is fully supported for backup compressio as well. Backup compressio is off by default you ca tur it o with sp_cofigure backup c ompressio default 1. The system performace cost of compressio is that it uses lots of CPU time compressig ad ucompressig the data. You ca use Resource Goveror to allocate CPU resources to compressio ad limit the amout of time the CPU will sped actually doig the compressio. Compressio Beefits Compressig backups may ot produce ay beefit if your backup is ecrypted or compressed already. Types of data that compressio beefits: Text data compresses well. So does data where values are duplicated several times. If a page cotais a sigle row ad ot much duplicatio, compressio does t help much. Backup Methods I this sectio we will discuss the backup methods available i SQL Server. Here is a list: Full database backup Differetial backup Trasactio log backup Tail-log backup Partial backup Partial differetial backup Copy-oly backup You ca backup a file or a file group usig full or differetial backup. Full Backups ad Restores The most commo type of backup ad restore is the full backup ad restore. You should put your database backup o a regular schedule ad automate it. You ca use the SQL Server Aget or the database maiteace wizard for this. Backup the master database as well as other system databases o a daily schedule. If you have to do ay itesive system work, you will wat to back up the databases before you start. You should backup the msdb database o schedule with your user databases. This database is used by SQL Server Aget, Service Broker ad Database Mail. Make sure you backup databases that you created, immediately after they are created ad iitially loaded. You might wat to backup the user databases after you create a large idex or after reorgaizatio. If you have to trucate the trasactio log for ay reaso, you will wat to do a full backup at that poit. Note: The full database backup captures the state at the ed of the backup, ot the begiig. LearSmart Cloud Classroom: Video Traiig s Mauals

73 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Backup Media Backig Up to Disk To backup a disk you must backup to a local disk ad you may use a UNC (Uiversal Namig Covetio) ame format - \\serverame\share_ame as well. You have to have permissio to backup to the etwork shares ad you should verify your backups. Backig Up to Tape I order to backup to a tape drive it must be a local drive (You ca t share tape drives). Tape backups record the ame, time, date, ad data type of the backup. Tape backups use the Microsoft Tape Format (MTF) to record the data. I earlier versios of SQL Server backups were created usig the SQL Server TAPE format ad the operatig system used the OS TAPE format. Microsoft chaged the format to MTF so that the SQL Server backups would be compatible with the OS backups. Now the SQL Server backup ad the OS backup ca exist o the same tape. SQL Server backup automatically spas multiple tapes ad it supports hardware compressio. The Backup Process I SQL Server you ca create ad backup to a dump device. A dump device provides a logical associatio to a path (local or UNC mapped) where the backup will reside. You ca specify the dump device with a friedly ame i the GUI with the followig sytax: EXEC sp_adddumpdevice disk, prodbak, c:\productio.bak. Where prodbak is the friedly ame you are assigig to the dump device ad productio.bak is the file ame of the backup file. The you ca use the friedly ame whe you backup the database. It looks like this i T-SQL: BACKUP DATABASE productio TO prodbak Where productio is the database ame ad prodbak is the dump device friedly ame. LearSmart Cloud Classroom: Video Traiig s Mauals

74 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 23: Backig Up the Database I SSMS right click the database you wat to backup, select Tasks ad the select Backup from the Tasks meu. As show above, you ca select the database, backup type, ame, etc. Oce you are satisfied with your selectios, click OK ad the database will be backed up. You ca select restore from the Tasks meu as well ad you will see the scree show above. Mirror to Whe you specify MIRROR TO as a optio, SQL Server creates a additioal copy of the database durig the backup. The backup ca be local or remote. You may wat to create two mirror backups, oe local ad oe remote to a fileshare i a differet physical locatio. MIRROR TO works with tapes or disks with the restrictio that you have to use the same device type with all of the mirrors. If you do t use the same device type you will get a error MIRROR TO is ot supported i SSMS (SQL Server Maagemet Studio), you have to use a script to do it ad it requires the FORMAT optio as well. Backup the database test with a mirror: BACKUP DATABASE test To DISK = c:\fullbackup.bak MIRROR TO Disk = c:\fullbackupcopy.bak WITH FORMAT LearSmart Cloud Classroom: Video Traiig s Mauals

75 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig a Recovery Strategy Automatic Recovery To uderstad automatic recovery we must first take a look ad how trasactios are stored i memory ad o the database: 1. A trasactio begis. 2. Chages are immediately logged ito memory ad the trasactio log. 3. Oce the record has bee iserted or deleted, the trasactio is committed (Completed). Whe a failure occurs, like a power outage, automatic recovery will attempt to update the database with all chages i the trasactio log. Whe the system is brought back up -- automatic recovery will update the database with trasactios that are foud i the log that were committed, but ot yet writte to the database. Trasactios that were started but ot yet committed, will be rolled back. Problem: Over time the trasactio log ca become quite large ad automatic recovery ca be a time cosumig process. Solutio: Use checkpoits to write all of the chaged pages to the database disk periodically to reduce the automatic recovery time if the system goes dow. Although cofigurable, checkpoit rus every miute by default ad writes all of the chages i the trasactio logs to each database. With checkpoit, the recovery time will be reduced to the time it takes to update from the last checkpoit. Note: If there are pages occupyig memory ad SQL Server eeds that memory, the pages will be writte to disk ad the memory will be freed for use. This process is called lazy writer ad it writes pages to disk whe the system is ot busy doig other thigs. Restore Types Full Differetial Log Piecemeal Page With Stop AT Trasactio log Restore to log mark LearSmart Cloud Classroom: Video Traiig s Mauals

76 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Restore Process Before SQL Server restore performs a database restore, it does a safety. This safety check is to isure that data is ot lost i the restore process by writig over existig data. If the database already exists, ad if the ame i the restore statemet is differet tha the database ame i the backup file, a restore will ot be doe. Restore will also fail if some of the files i the backup database are missig or icomplete. If restore passes the safety check, the it will restore all of the files associated with the database ad write the backup data ito those files. RESTORE HEADERONLY shows the header iformatio. RESTORE FILELISTONLY shows file iformatio. RESTORE LABELONLY shows media iformatio. RESTORE VERIFYONLY verifies that the files are complete ad readable. You ca restore a database from SSMS by right-clickig the database you wat to restore, the selectig Tasks Restore Database. Figure 24: Restorig the Database From here, you ca select the restore from ad to databases, as well as To a Poit i Time. Click OK to perform the restore. LearSmart Cloud Classroom: Video Traiig s Mauals

77 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Restore Commad Sytax to restore from disk: RESTORE DATABASE mydb FROM DISK = c:\mydatabase.bak WITH NORECOVERY Sytax to restore from tape: RESTORE DATABASE mydb FROM TAPE \\.\tape0 WITH NORECOVERY Restore Commad Optios RECOVERY/NORECOVERY RECOVERY will ru uless NORECOVERY is specified. File = use this to specify multiple backups o the same disk or tape. Move myfile To destiatio path use this optio to restore to a differet locatio from the origial database locatio. Replace overrides ay safety checks. Stop o error, cotiue o error STOPAT Restricted User Leaves the database uavailable. CDC (Chage Data Capture) ad Service Broker optios Trasactio Log Backup ad Restore The Problem: Whe the trasactio log fills up, the database essetially becomes a read-oly database because iserts, updates ad deletes are ot allowed at this poit. The Solutio: Whe the trasactio log is backed up, it is also trucated (cleared out) ad the space that was used is free for more loggig. You ca use the simple recovery mode if you do t eed up to the miute recovery, ad as we discussed earlier, the trasactio log will be trucated periodically. However, if you are i the full or bulk-logged mode, the trasactio log is ot automatically trucated ad will grow. Trasactio log backup backs up all of the chages etered i the log sice the last backup. So the solutio to the ever growig trasactio log is to back it up, so that the log is trucated ad space is made available for future trasactios. Before you ca do a trasactio log backup, you have to have at least oe full database backup ad you must be i the full or bulk-logged recovery mode. Here is the sytax for to use to backup the trasactio log: BACKUP LOG database TO DISK c:\databaselog.bak LearSmart Cloud Classroom: Video Traiig s Mauals

78 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Bulk Log Recovery Model ad Trasactio Log Backup Whe you are i the bulk-logged recovery mode, every extet that is chaged durig bulk operatios is flagged. Whe the trasactio log backup occurs, after the trasactio log is backed up, it checks the flags ad backs up all of the flagged extets. This is how the chages made durig the bulk-logged recovery mode are protected. Backup Log Optios NORECOVERY use this optio to backup the tail of the log - it leaves the database i the restorig state. COPY_ONLY ad this optio istructs BACKUP to cotiue the backup eve if errors are ecoutered like bad checksum or tor pages. It does t trucate the log ad is equivalet to the NO_TRUNCATE optio. How Ofte Should You Backup the Trasactio Log? There are two factors that together determie the backup frequecy of the trasactio log: 1. How ofte iserts, deletes ad updates are doe i the database. 2. The size of the trasactio log. You eed to decide o the frequecy of your backups based o the largest amout of trasactios you will have durig the iterval betwee backups. If you are goig to backup every hour, how may trasactios, max, will you have i oe hour? Oe other cosideratio is this: what is the largest sigle trasactio you will have? A large trasactio ca keep your log from trucatig while it s workig. Agai, with trasactio log size, bigger is better. Cosider the risk ivolved with a trasactio log that is too small. How to Restore a Trasactio Log Here are the steps to take, after a crash, to restore the trasactio log: 1. Backup the tail of the trasactio log. This will retrieve all of the trasactios that were committed before the crash, but ot writte. 2. Restore the database with NORECOVERY. 3. The restore each log with NORECOVERY i chroological order from the last database backup to the crash. 4. Restore the tail log that was backed up i step oe. 5. Ru recovery. Poit-i-Time Recovery Poit-i-Time recovery allows you to restore the log up to a specified time. A ew feature i SQL Server 2008 allows you to use the STOPAT clause i every sequetial log restore from the last database backup up to the poit of failure. LearSmart Cloud Classroom: Video Traiig s Mauals

79 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Here s how it works: Whe you have a failure, you will have the last database backup plus ay log backups from the time of the database backup util the failure. You ca recover all of the data up to the time of the failure by restorig the database first, the sequetially restorig the log backups usig the sytax below for each log backup ad up to the time the failure occurred. 1. RESTORE DATABASE database_ame FROM full_backup WITH NORECOVERY; 2. RESTORE DATABASE database_ame FROM full_differetial_backup WITH NORECOVERY; 3. RESTORE LOG database_ame FROM log_backup WITH STOPAT = time, RECOVERY; 4. Repeat step three for each trasactio log up to the time of failure. New to SQL Server 2008 is the optio to use STOPAT with each cosecutive trasactio log backup ad SQL Server 2008 will ot do the RECOVERY util it reaches the log backup that occurred o or just before the time of failure. This simplifies the recovery process, because, before SQL Server 2008 you had to be sure you had recovered all of the data ad the you could ru RECOVER. Log Marks You ca also restore with log marks. To do this you ca leave log marks with the trasactios by: BEGIN TRAN test WITH MARK descriptio. The whe you restore the log you ca set the stop poit with: RESTORE LOG WITH STOPMARK = test - This icludes the trasactio test i the restore. Or you ca use: RESTORE LOG WITH STOPBEFOREMARK = test - This will NOT iclude the marked trasactio test. Differetial Backups ad Restores Although differetial backup is completely optioal, the mai advatage of doig differetial backups is you ca save time o backup ad restore operatios. The differece i differetial backup ad trasactio log backup is that trasactio log backup stores every chage that occurs o each record; differetial backups store oly the last chage o each record. I other words, if oe record is chaged more tha oe time betwee full backups, the trasactio log will have recorded each chage that occurred. Whe a differetial backup is used, it stores oly the last chage that was made to each record. It is faster because it does t bother will all of the trasactios that led up to the fial data i the record. You ca use differetial backup with full backup ad trasactio log backup to speed up the backup ad restore process. If you, for istace, scheduled a full backup for every Saturday ad each day betwee you scheduled a log backup, you could combie the two to recover most or all of the data if there was a failure. LearSmart Cloud Classroom: Video Traiig s Mauals

80 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) But if you icluded a Tuesday ad a Thursday differetial backup ad you had a failure o Wedesday, you could restore the Suday database backup, ad the restore the fial chages oly through Tuesday from the differetial backup. You could be up to date through Tuesday without restorig the log backups from Suday through Tuesday. You would still have the last chage made for every record that had bee chaged -- but you would t have to restore every trasactio that led up to the fial chage as you would if you were restorig from the trasactio log backup. Note: If the differetial backup becomes uavailable for some reaso, you still have the log backups to recover from. How to Backup ad Restore Files ad Filegroups With SQL Server you ca backup a file or a filegroup by itself ad it ca be doe with both the full backup ad differetial. The sytax to do a file backup is: BACKUP DATABASE database_ame FILE = myfile The sytax for a filegroup is: BACKUP DATABASE database_ame Filegroup = myfilegroup You ca also restore a idividual file or filegroup i SQL Server. If you are i the simple recovery mode you ca oly restore read-oly files ad filegroups, but i the full recovery mode, you ca restore ad file or filegroup. Here are the steps to restore a file or a filegroup: 1. Mark the file offlie. 2. Do a tail log backup to capture chages sice the last full backup. 3. Restore the database files. 4. Restore the differetial. 5. Restore the trasactio logs i chroological order from the last differetial backup or the last full backup. Note: With the Eterprise editio, you ca restore the file or filegroup while the other files/filegroups are olie. Olie Restore Olie restore improves uptime of tables durig the restore process i bulk logged ad full recovery modes. The improvemet is due to the database stayig olie ad available durig the restore ad oly the parts beig restored stayig offlie util the restore is complete. If you use SQL Server Eterprise editio 2005 or later you ca do olie restores of files, pages, ad piecemeal restores. Piecemeal allows the user to restore parts of the database while other parts go olie. LearSmart Cloud Classroom: Video Traiig s Mauals

81 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) You ca do olie restores of databases that have multiple files ad filegroups or simple recovery databases with read-oly files ad filegroups. A database is cosidered olie as log as the primary filegroup is olie. Durig a olie restore the file that is beig restored ad its filegroup are offlie while the rest of the database remais olie ad available. Note: The sytax for olie restore is the same as for a ormal restore. How to Fix Orphaed Users The Problem: If you restore a database to a differet server with a differet master, the users that are tied to logis i the origial master will ot be able to access the ew database they become orphaed. The exceptio to this would be if the users also had a logi tied to the ew master. The Solutio: After restorig a database to a differet server, you have to recoect all of the users previously coected to the database. For Active Directory users the fix is simple, you just re-add the logis to the ew master. Sice the SID (Security ID) comes from Active Directory, it will be the same o both servers. So it will map correctly back to the user. O SQL Server however, the SID will be differet whe you re-create the logi o the ew server so it will ot lik to the user record i the database. To fix this problem, you will use sp_chage_users_logi. Here are the parameters for sp_chage_users_logi: Report - Shows a list of orphaed users (users who s SIDs do ot match correctly). Auto-fix - Looks at the user ames ad matches them with the ewly created logi user ames ad recoects the users. It will create the ew logi if oe does t exist. Update-oe - Works the same as auto-fix except that you ca specify a particular user. Restorig Pages You ca restore a page or a group of pages. A page ca be marked suspect because of errors foud with DBCC -- they may be tor pages or have checksum errors. You ca check suspect pages with database_suspect_data_page_evet. I order to repair the page you eed to kow if it is a clustered or oclustered idex. You fid this by lookig at the INDID (Idex ID). If the INDID = 0, the it s a heap with o cluster. If the INDID = 1 this idicates a clustered idex o the table. If the INDID > 2 ad < 255 it s a oclustered idex. If the page marked suspect is a o-clustered idex, simply drop it ad re-create it. For a page that is i the table or the clustered idex, perform a page restore. The sytax for a page restore is: RESTORE DATABASE database_ame PAGE plus the list of pages that you wish to restore. LearSmart Cloud Classroom: Video Traiig s Mauals

82 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig a Recovery Test Pla Log Shippig For log shippig you should pla a failover ad you should fail over all the way to the poit where you are doig a cliet coect. Replicatio For replicatio recovery testig, you should fail the publisher, the distributer ad the subscribers - i all possible combiatios. Allow some subscriptios to expire ad pla recovery accordigly. Pla to back up msdb ad master after you make ay topology chages. You ca use syc with backup as a optio to coordiate the backup ad recovery process ad make sure everythig stays i syc. Whe you use syc with backup as a optio, you ca use either syc o distributer or syc o publisher. If you choose syc o Distributor, the publisher log is ot trucated util it is backed up i the distributer - this optio puts the distributer i syc with the publisher. This way the distributer ca be restored from the last backup ad replicatio ca cotiue. If you choose the optio syc o publisher with this optio trasactios will ot be delivered to the distributer util they are backed up o the publisher - this slows dow replicatio. But i this case, the last publisher backup ca be restored ad both the distributer ad publisher will have the same trasactios recorded. Hardware Cosideratios Whe cosiderig the hardware for testig make sure the hardware you use is exactly the same as the disaster recovery hardware -- or it has to have the same capability for files/filegroups, disk size, etwork speed ad NIC (Network Iterface Card) cofiguratio. Hardware Cluster Failure For hardware cluster failure you could have a disk failure or a OS failure. I the case of a hardware failure, you will wat to remove the failed ode from the cluster with SQL Server setup. The remove the failed hardware, fix or replace the hardware, brig the machie back up ad use SQL Server setup to istall widows clusterig ad add back the failed ode. For a OS cluster failure, if the ode is offlie - try to recover the ode first ad test failover. Otherwise take the same actios that you would take if it were a hardware failure. LearSmart Cloud Classroom: Video Traiig s Mauals

83 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Istace Rebuild For a istace rebuild you have to restore the OS as well as SQL Server. Here is a list of what you must do to rebuild the istace: Restore the server cofiguratio. Istall the SQL Server Software. Restore all of the system ad user databases. Chage the server ame i master if you eed to. If eeded, redo the followig: Replicatio Mirrorig Log Shippig Your Test Pla I your test pla you should iclude all of the followig: Hardware ad software iformatio Cotacts for key people Coectio iformatio Cliet testig Make sure you documet the software ad versio icludig ad service packs you will eed to restore - ad you kow where your recovery software is located. Keep the documet updated as you upgrade your software or add service packs. Keep up with your backups as well ad make sure they are always readily available for restore operatios. LearSmart Cloud Classroom: Video Traiig s Mauals

84 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Domai 5: Desigig a Moitorig Strategy I this sectio we will discuss the various tools available for moitorig activity i SQL Server to help pla desig optimized server istace performace. You will lear how to moitor server performace at the operatig system level ad at the istace level. How to use tools like the System Moitor couters, Widows Maagemet Istrumetatio, evet otificatios, tracig ad aalysis tools. List of Moitorig Tools System Moitor SQL Server Profiler WMI evet otificatios Data collectio Exteded Evets DMVs ad T-SQL Activity Moitor Policy Based Maagemet SQL Server Aget Alerts Evet logs System Moitor With System Moitor you ca view data from multiple computers ad export the data. You ca create system alerts ad ru applicatios whe those alerts occur. You ca also save logs ad view data from the logs. You eed to be familiar with the couters ad which oes are useful. Usig the System Moitor To start the system moitor you simply eter perfmo from ru prompt i Widows desktop or from the server OS. Here you ca moitor the activity of thigs like: CPU - % of usage ad maximum frequecy Disk - KB/sec ad % of Highest Active Time Network - %kbps ad % of Network Utilizatio Memory - Hard Faults/sec ad % of Physical memory Used LearSmart Cloud Classroom: Video Traiig s Mauals

85 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 25: Performace Moitor You ca ope the sectio associated with each of these ad see more details o how the resource is divided. Here you ca add couters by clickig the gree plus sig at the top of the mai widow ad selectig what you wat to moitor from a multitude of available couters. Data Collector Sets A Data Collector Set is used for moitorig ad reportig i Widows Performace Moitor. You ca create a Data Collector Set ad group it with other Data Collector Set ad icorporate ito logs. You ca view it i Performace Moitor ad you ca cofigure it to geerate alerts at certai thresholds. You ca associate it with rules of schedulig to collect data at specified times. You ca also cofigure Widows Maagemet Iterface so that WMI tasks ru at the completio of a data set collectio. Figure 26: Cofigurig Data Collector Sets LearSmart Cloud Classroom: Video Traiig s Mauals

86 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) To defie your ow data collectio, expad the Data Collector Sets tab, the expad the User Defied tab ad right click o New Data Collector Set ad select Properties. I the New Data Collectors Set Properties widow you ca: Add your user defied set. Select where to save the data collectio. Set security optios. Set a schedule to determie collectio start ad stop times. Have it stop if certai coditios occur, like the size of the file reaches some umber. Data Collector Sets ca cotai: Performace Couters Evet trace data System cofiguratio iformatio SQL Server Activity Moitor I SQL Server Maagemet Studio there is a Activity Moitor that is similar to the System Moitor - with the exceptio that the couters available are relative to SQL Server activity. To access this moitor simply right click the server tab o the left of the scree ad select the Activity Moitor optio. Here you ca moitor the activity associated with the database such as % Processor Time, Database I/O (MB/sec), Batch Requests/sec ad Waitig Tasks. Moitorig Memory SQL Server automatically allocates ad releases memory for data cache based o your settigs for mi ad max memory ad the availability of resources. SQL Server tries to keep memory available at all times without pagig. If there is ot eough memory, memory will be paged to ad from the disk ad performace will suffer. You ca memory usig the System Moitor ad the table below cotais some guidelies to follow for optimum system performace. Couter Guidelie Memory ad Pagig File Use Memory: Available Bytes Should cosistetly be >5000KB (5MB) Memory: Pages per sec Should ever be cosistetly >0 Process: Page Faults/sec/SQL Should ever be cosistetly >0 Process: Workig Set/SQL Should be >5000KB (5MB) Memory ad Buffer Use SQL: Buffer Maagemet: Cache Hit Ratio Should be >90% SQL: Buffer Maagemet: Total Pages SQL: Memory Maagemet: Total Server Memory Should ot be low Should ot be close to physical memory Figure 27: Guidelies for Moitorig Memory LearSmart Cloud Classroom: Video Traiig s Mauals

87 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Available Bytes should be at least 5000KB (5MB). Low values here idicate a overall shortage of physical memory. Pages per Secod moitors the umber of pages that are writte to ad read from the hard disk by the OS to resolve hard page faults. Ay value cosistetly above zero would idicate that the OS is readig ad writig the disk i respose to memory requests. Page Faults/sec same as Pages per Secod with the exceptio that Page Faults idicate soft pagig rather tha disk reads ad writes. Workig Set/SQL how much memory SQL Server eeds to use. Cache Hit Ratio idicates the percetage of time that data is i cache whe eeded. Should always be a high umber. Total Server Memory total memory SQL Server is usig. Should be ear the total memory of the system. Moitorig Processors For multiprocessig systems you should moitor each processor separately. Here are some guidelies for proper processor performace: Couter Guidelie Processor: % Processor Time <90% System: Cotext Switches/sec <8000 o a multiprocessor System: Processor Queue Legth Should ot be >2 Processor: % Privileged Time Low as possible Figure 28: Guidelies for Processor Performace Processor Time as a geeral rule, should stay below 90% most of the time. Although it may peak at 100% occasioally, if it stays there you eed a faster processor. Cotext Switches/sec should be less tha 8000 o a multiprocessor system. Processor Queue Legth should ot be greater tha two. Percet Privileged Time should be a low umber. Moitorig Hard Disk I/O Disk I/O is oe o the primary causes of bottleecks i a system. It s importat to uderstad that excessive disk activity ca be caused by isufficiet memory. With isufficiet memory the system uses the disk to store page files that would ormally be cached i memory. So you wat to make sure you elimiate isufficiet memory as the possible idirect problem before you suspect a I/O problem. Sequetial I/O, as i the case of log files, ca be much faster tha radom I/O, such as database reads ad writes. This is aother reaso, besides icreased recoverability, to separate the database files from the log files. LearSmart Cloud Classroom: Video Traiig s Mauals

88 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) You tue your applicatios to reduce disk I/O - better idexes ad better database ormalizatio ca help. You ca also use faster hard drives with more spidles to speed thigs up. Movig some files to a differet hard disk by usig filegroups -- as we discussed earlier -- will help. You ca spread the files across multiple spidles usig RAID also, this will icrease performace. Here are some guidelies for best disk performace: Couter Guidelie PhysicalDisk % Disk Time <90% PhysicalDisk Average Disk Queue Legth PhysicalDisk Reads/sec PhysicalDisk Writes/sec <2 x Number of Spidles <Capacity <Capacity Figure 29: Guidelies for Physical Disk Performace Percet Disk Time should be less tha 90% most of the time. Average Disk Queue Legth should be less tha two times the umber of spidles. Baselie Moitorig A good time to gather some baselie statistics is whe your server is ruig well ad is heavily loaded -- you will also wat to collect statistics whe it s ot ruig as well so comparisos ca be made. A good record of the resource usage at varyig levels of performace ca help you idetify problem areas. You wat to collect iformatio from the couters listed below: Database: Trasactios/sec Geeral Statics: User Coectios Locks: Average Wait Times (ms) Locks: Number of Deadlocks/sec Processor, Memory ad Disk performace couters discussed earlier Oce you bechmark this data whe the server is ruig well, the you ca compare the data to a time whe the system is ot ruig as well ad idetify problems. Log Viewer Whe troubleshootig SQL Server issues, the ability to view system ad applicatio log data is ecessary at times. SQL Server logs are available to moitor evets that occur withi SQL Server. You ca access the log viewer i SQL Server Maagemet Studio by expadig the Maagemet tab ad the the SQL Server Logs tab. Here you ca right click o ay log ad select View SQL Server Log. LearSmart Cloud Classroom: Video Traiig s Mauals

89 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 30: Viewig the SQL Server Log Oce you ope the Log File Viewer you have access to the Database Mail log, the SQL Server log, the SQL Server Aget log ad the System log. Oe ice feature of the Log File Viewer is that you ca combie log data from the differet logs available ad view them together for compariso by simply selectig them. Widows Maagemet Istrumetatio Widows Maagemet Istrumetatio (WMI) ca be used to for thigs like checkig performace couters, startig ad stoppig services ad maagig cofiguratio objects. WQL (WMI Query Laguage) is a scriptig laguage that is very similar to T-SQL ad ca be used to help automate the moitorig process ad gives you cotrol of WMI. SQL Server Profiler With SQL Server Profiler you ca capture evets that are of iterest. You ad see exactly what T-SQL statemets or Multi-Dimesioal Expressios are submitted to the server ad SQL Server resolves queries iterally. With SQL Server Profiler you ca: Create a trace. Moitor the trace results while the trace is ruig. Store the results i a table. Stop, start, pause ad modify the results. Replay the results. LearSmart Cloud Classroom: Video Traiig s Mauals

90 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) SQL Server Profiler ca be helpful with performace tuig, debuggig, auditig ad for stress testig. You ca correlate the System Moitor with the SQL Server Profiler ad you ca use the iformatio captured with SQL Server Profiler as source iformatio for Tuig Advisor. Note: Be careful ot to moitor too may evets, this ca affect performace ad the trace file ca grow very large if you are moitorig for a log period of time. Database Egie Tuig Advisor Database Tuig Advisor provides help i tuig databases for better query performace. It s a improved versio of the Idex Tuig Wizard from previous versios of SQL Server. By aalyzig database performace it helps provide better idexes, idex views ad partitios. Database Tuig Advisor reads the physical database. It uses workload iformatio like profiler trace ad SQL Server scripts to provide recommedatios for better database performace. Note: Although there are optios to allow Database Tuig Advisor to chage thigs while it is ruig, it s recommeded that you DO NOT allow chages o the fly. It may delete or chage data that you do t wat chaged, so look at the recommedatios ad the decide what should ad should ot be chaged. For example: If you ru Database Tuig Advisor for a period of time ad certai idexes were ot used durig that time, it may delete those idexes! Database Tuig Advisor is available i the SQL Server Maagemet Studio i the Tools tab. Just ope the Tools meu ad select Database Egie Tuig Advisor to get started. I the Database Tuig Advisor widow, you ca select the sessio ame, where you wat the recommedatios stored, which database(s) to tue, stop time ad tuig optios like the partitioig strategy you would like to use. Uder the Tuig Optios tab is where you select whether you wat Database Tuig Advisor to keep the physical desig structure or make chages. Remember, allowig the advisor to make chages ca be dagerous, so be careful here. You ca the start the advisor ad let it ru for the specified time. Oce the aalysis is fiished, you will see the Recommedatios tab; this is where you ca see the estimated improvemet percetage ad the recommeded chages to reach that performace level. You ca ru Database Egie Tuig Advisor o a differet server to offload the work required by the advisor. The secod server does ot have to be idetical to the server cotaiig the database(s) you wat to tue. Whe you ru the Database Egie Tuig Advisor this way the bulk of the work is doe o the secod server leavig your productio server relatively free to cotiue its ormal tasks. Performace Moitorig with DMVs Dyamic Maagemet Views (DMVs) provide some tools for viewig importat iformatio to moitor. Here are the queries: SELECT * FROM sys.dm_db_missig_idex_details provides details of missig idexes that could have bee used if they had bee available. SELECT * FROM sys.dm_db_missig_idex_groups details of missig idex groups. SELECT * FROM sys.dm_db_missig_idex_colums(12) - Details of missig idex colums. LearSmart Cloud Classroom: Video Traiig s Mauals

91 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) This query will provide a list of the statemets with highest avg CPU Time. SELECT TOP 50 qs.total_worker_time/qs.executio_cout as [Avg CPU Time], SUBSTRING(qt.text,qs.statemet_start_offset/2, (case whe qs.statemet_ed_offset = -1 the le(covert(varchar(max), qt.text)) * 2 else qs.statemet_ed_offset ed -qs.statemet_start_offset)/2) as query_text, qt.dbid, dbame=db_ame(qt.dbid), qt.objectid FROM sys.dm_exec_query_stats qs cross apply sys.dm_exec_sql_text(qs.sql_hadle) as qt ORDER BY [Avg CPU Time] DESC The followig query will provide a list of statemets with the highest executio couts. SELECT TOP 50 qs.executio_cout, SUBSTRING(qt.text,qs.statemet_start_offset/2, (case whe qs.statemet_ed_offset = -1 the le(covert(varchar(max), qt.text)) * 2 else qs.statemet_ed_offset ed -qs.statemet_start_offset)/2) as query_text, qt.dbid, dbame=db_ame(qt.dbid), qt.objectid FROM sys.dm_exec_query_stats qs cross apply sys.dm_exec_sql_text(qs.sql_hadle) as qt ORDER BY qs.executio_cout DESC Maagemet Data Warehouse Maagemet Data Warehouse (MDW) provides a cetral poit for data collectio for ALL SQL Servers. You ca set it up to gather data for a sigle istace or multiple SQL Server istaces. The data collectors ca be scheduled ad you ca set retetio periods so that the data is automatically deleted after a period of time. The data collected is stored i the MDW database. To set up MDW, from the Object Explorer i SSMS expad Maagemet ad right click o Data Collectio. Select Cofigure Data Maagemet Warehouse to start the Cofigure Data Maagemet Warehouse Wizard. Oce the wizard is started, you will see the followig scree: LearSmart Cloud Classroom: Video Traiig s Mauals

92 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 31: Startig the Data Warehouse Wizard Click Next. Figure 32: Creatig a Maagemet Data Warehouse LearSmart Cloud Classroom: Video Traiig s Mauals

93 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Note: You ca also start MDW from the Start meu by expadig the Microsoft SQL Server 2008 folder ad the expadig the Performace Tools folder ad selectig the Database Egie Tuig Advisor. From here you ca create the MDW database (Create or upgrade a maagemet data warehouse) or you ca cofigure to start collectig data (Set up data collectio). You will eed to ru the wizard twice to set up a MDW, oce to create the MDW database ad the secod time to set up the data collectio ad start collectig the data. With MDW you ca collect data from: SQL Server Trace Performace Moitor couters T-SQL Query activity The collectio process is accomplished usig SQL Aget jobs ad stored procedures that work with Maagemet Data Warehouse. The SQL Aget jobs ca be scheduled. The data from the collectio process ca be cached locally ad writte to the MDW database whe the buffer is full or o a schedule if you choose. As aother optio, you ca have the data immediately uploaded to the MDW as soo as it is captured. Maagemet Data Warehouse Security There are two kids of security for MDW. The Data Collector security determies who is able to cotrol the data collectio process. The Access Security determies who has access to the performace data. There are three roles ivolved i MDW security: dc_admi this role is the collector admiistrator for a specific istace. The perso operatig i this role ca add ew collectio sets ad istall ew collectio types. dc_operator ca list, stop ad start a collectio set ad chage the schedulig of the upload ad collectio. dc_proxy a perso operatig i this role has read-oly access to the cofiguratio. There are also three MDW roles for the MDW database: mdw_admi i this role a perso ca read, write ad update schemas mdw_writer this perso ca read ad write data oly mdw_reader this is a read-oly access role ad has read-oly access to data i the data warehouse. You ca set up MDW security o your primary server ad here are the steps: 1. Create the ecessary logis to map to the roles listed above. 2. Cofigure MDW. 3. Create proxies for SQL Server Aget steps. LearSmart Cloud Classroom: Video Traiig s Mauals

94 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Dedicated Admiistrator Coectios Problem: Whe your server uses all of available memory, the activity o the server ca keep you locked out. You may or may ot kow what s wrog but you have o way to fid out because the server is ot respodig ad you ca t make a coectio i order to debug it. Solutio: Reserve some memory that is exclusively used for the admiistrator logi so that the admiistrator ca gai access ad debug the system. Dedicated Admiistrator Coectios reserve memory exclusively for the admiistrator to have access to the system whe they would ormally be locked out. Figure 33: Creatig a DAC This is a simple coectio to make. Whe you coect to your server, you simply iclude ADMIN: at the begiig of the server ame (ADMIN:server_ame) as show above. Oce you are coected, the you have a dedicated admiistrator coectio. Now you are back i ad ca troubleshoot the SQL Server issues that caused you to be locked out. Lockig I SQL Server, locks provide a way to protect data from beig updated by more tha oe user at oe time. You ca lock access to data at may levels i SQL Server: Level Row Key Page Extet HOBT Table Database Lock Row Idex row lock Data or idex page Eight cotiguous pages Heap or B-tree Etire table Etire database Figure 34: Lockig Levels LearSmart Cloud Classroom: Video Traiig s Mauals

95 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Exclusive Locks Exclusive locks protect data durig a trasactio from beig accessed by aother user. For istace, if oe user were updatig the price o a sigle row i a table ad aother user attempted to access the data, a exclusive lock would make the secod user wait util the update completes before beig allowed make a chage i the price. Shared Locks Shared locks allow may users to read the same data at oe time but prevet aybody from chagig the data util all the data read operatios are complete. So if may users are readig the price of a item at the same time, shared locks will be applied for each read operatio, others will be allowed to read, but obody will be allowed to update the price util all of the read operatios complete. If someoe tries to chage the row whe there are shared locks, they will be blocked ad will have to wait util all of the shared locks are released. Update Locks Problem: If a user attempts to update multiple records i a category with coditioal updates, exclusive locks o all objects i that category would lock those objects util the writes were complete. Solutio: Allow reads o all of the objects i the category util it is determied which oes eed to be updated, the exclusive lock oly those objects while the updates are beig made. Update locks work i situatios where records must be read ad qualified before writte to. Let s say that you wat to icrease the price of all products i the me s clothig departmet over $100 - by two percet. With Update Locks a shared lock will be placed o each product i the category while the SQL Server is determiig which products eed the prices chaged. Oce decided, a exclusive lock will be applied while the update is takig place. Itet Locks Problem: If a row is beig modified i a particular table, i a particular database, someoe could come alog ad lock the table, lockig out the perso modifyig the row data. Solutio: Sed a flag up through the hierarchy to otify everyoe above that chages are happeig below. Itet Locks are these flags that are placed above the work i the hierarchy to otify others that chages are beig made below. Here are the three types of Itet Locks that are set up through the database hierarchy: Itet Shared Lock is the flag that idicates that there is a shared lock below. Itet Exclusive Lock idicates that someoe has a exclusive lock below. Shared Itet Exclusive Lock idicates that someoe has a update lock below. Moitorig Locks To moitor locks you ca use the dyamic maagemet view sys.dm_tra_locks -- where lockig data is stored. You ca also use the stored procedures sp_who ad sp_locks. You ca also use SQL Server Maagemet Studio -> Curret activity to moitor locks as well as some of the other moitors we ve discussed i this sessio - like profiler. LearSmart Cloud Classroom: Video Traiig s Mauals

96 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Deadlocks A Deadlock occurs whe two trasactios have locked two objects idepedetly of oe aother, but the they both cross over ad attempt to access the object that the other has locked. They ed up waitig o each other to release the locks idefiitely. Figure 35: Uderstadig Deadlocks For istace, if Trasactio Oe locks Resource A ad Trasactio Two locks Resource B, the Trasactio Oe attempts to access Resource B ad Trasactio Two attempts to access Resource A - a deadlock occurs. Oce the deadlock occurs, either trasactio ca complete because each trasactio is busy waitig o the other trasactio to release the lock. SQL Server hadles this by geeratig a deadlock error Whe this error is geerated oe of the trasactios is idetified as a victim ad the trasactio is rolled back allowig the other trasactio to complete. To moitor deadlocks you ca set the trace flags 1204 ad 1222 to see additioal iformatio about deadlocks i SQL Server error log. With Profiler you ca capture a deadlock graph evet ad you have more ability see what s goig o ad to maage the deadlocks. Also Widows Moitor has a couter that keeps track of deadlocks per secod. Domai 6: Desigig a Strategy to Maitai ad Maage Databases I this sectio you will lear database maagemet as well as database maiteace. You will lear maiteace strategies usig data compressio techiques, idex ad heap maiteace ad partitio maagemet -- how to gover limited resources for better performace i your desig strategy -- ad how to automate database maagemet usig tools like PowerShell, Widows Maagemet Istrumetatio, SQL Server Aget ad evet otificatios. Desigig a Maiteace Strategy for Database Servers Data Compressio Data compressio is ew to SQL Server 2008 ad you ca compress the followig: Heaps Clustered idex tables Noclustered idexes Idexed views Partitios of a partitioed table LearSmart Cloud Classroom: Video Traiig s Mauals

97 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Compressio is doe with the CREATE ad ALTER commads. Row ad page compressio are available i SQL Server SQL Server will allow compressio oly if the compressio is guarateed to succeed. Note: Data compressio is oly available o the Eterprise ad Developer Editio of SQL Server but ot o the Stadard Editio. Heap Compressio A table that does ot have a clustered idex is called a heap. Pages are oly compressed i a heap whe you do a bulk isert, a isert with tablock or a alter table rebuild. There is o page compressio whe you use DML statemets so if you do a row isertio o a heap, the data stored is ot compressed data. You have to maitai compressio o a heap by removig ad addig compressio back periodically. Whe you chage the data compressio settig o a heap, all of the oclustered idexes will be rebuilt. Row Compressio Row compressio reduces the metadata overhead associated with a record. Metadata is iformatio about stored data, like iformatio about colums, their legths ad offsets. For umeric type data (iteger, decimal, float etc) ad types based o umeric data type (like DateTime ad moey), compressio uses variable-legth storage format. Compressio stores fixed character strigs usig by usig variable legth format ad it does t store the blak characters. Page Compressio Page compressio cosists of row compressio, prefix compressio ad dictioary compressio. Whe you eable page compressio, existig pages are rebuilt. Heap ad Idex Maagemet You eed to maage the heap ad idex because they ca become fragmeted over time as database reads ad writes occur. To check the status of the heap ad idexes you ca use SQL Server Maagemet Studio ad look at the idex properties. You ca also use the DMV, sys.dm_db_idex_physical_stats to see the overall health of the idexes. There are two types of fragmetatio that you eed to be cocered with, iteral ad exteral (logical). Iteral fragmetatio has to do with the percetage of pages full (or how much wasted space there is because pages are ot beig filled to ear capacity) ad exteral is whe the physical page order does ot match the logical page order. Here are some guidelies for whe ad how to fix fragmetatio: For exteral fragmetatio - if the exteral fragmetatio percet is: Less tha 5 percet - usually o actio is eeded. Greater tha 5 percet ad less tha 30 percet - reorgaize. Greater tha 30 percet - rebuild. Fragmetatio ca slow thigs dow i a system. If there is iteral fragmetatio ad the allocated pages become full, the ext isert ca result i allocatig a ew page, splittig the page iteded to receive the data ad chagig the poiters to iclude that ew page i the chai. LearSmart Cloud Classroom: Video Traiig s Mauals

98 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Each time this happes more I/O is ecessary tha would be for a simple isert if there was space available. The key to repairig fragmetatio is to have the pages full eough ot to waste lots of space but ot so full that ew data ca t be writte without page splittig. Exteral fragmetatio is at its lowest whe the liked pages are cotiguous o the physical disk space. I other words, whe the logical pages match the physical pages the pages form a ubroke physical order. The first logical page is also the first physical page; the secod logical page is the secod physical page ad so o. The percet of out-of-order pages is the percet of pages where the physical ad logical umbers are differet. Figure 36: Uderstadig Fragmetatio I the above example, the percet of out of order pages is zero (fragmetatio = 0%), this is the best situatio. The liks list poits to the ext physical page for all six pages after the first page. If a ew page had to be allocated for a page i this ordered sequece, SQL Server would fid the space ad isert the page with poiters. The the logical order of pages ad the physical order of pages will be differet. Reorgaize Idex To reorgaize the idex you ca use ALTER INDEX... REORGANIZE commad. This replaces DBCC idex defrag. It repairs the idex at the leaf level ad fixes the logical/physical order. Reorgaizig compacts the idex per the fill factor meaig that if the pages are too empty it compact them to fill them up. But if the pages are too full, it WILL NOT expad them for more space. Reorgaizig the idex also compacts LOBs. It s always olie so work ca cotiue while the reorgaize is goig o although it ca impact performace -- ad the quality is ot as good as a rebuild. It rus faster tha a rebuild but it does t update the statistics. Reorgaize causes less iterferece with olie applicatios tha a rebuild does. Rebuild Idex You ca rebuild a idex with the ALTER INDEX... REBUILD commad or the DROP INDEX... WITH DROP Existig commad. This replaces the DBCC DBREINDEX commad. Rebuild idex ca be olie or offlie ad it s more complete tha the reorgaize. It will eable a disabled idex. To rebuild the idex it drops ad the re-creates the etire idex. Durig the rebuild process, both the logical ad physical page orderig is fixed. It does this by expadig ad compactig as ecessary per the fill factor. LearSmart Cloud Classroom: Video Traiig s Mauals

99 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Rebuild idex ca cosume lots of space. To miimize space usage you ca do a couple of thigs. You ca disable oclustered idexes ad the rebuild them. You may eve cosider goig miimally logged durig the process, just be sure to restore full loggig as soo as the rebuild is fiished. Remember that oly the Eterprise editio of SQL Server allows olie rebuilds. Microsoft recommeds that you test the olie rebuilds to see how the impact other users i the same eviromet. Deadlocks may occur because you will be competig for row lockig with other users. The total time for a rebuild olie will be loger tha it would be offlie. The advatage to usig olie rebuild is that others i the same eviromet ca cotiue their work while the rebuild is i process. The olie rebuild is ot available for: XML idexes Clustered idexes o tables with LOB data Uique oclustered idexes Olie rebuild does require extra disk space compared to offlie operatios because it has to keep a old ad a ew copy of the idex. Row Forwardig Poiters Problem: I a heap, if someoe updates a row makig it larger so that the row o loger fits o the page it will be moved to a differet page. The page address is the physical locatio of the row. Sice the physical locatio chages whe the row is moved to a differet page all of the oclustered idexes that referece that row would have to be updated to poit to the ew physical locatio. Solutio: SQL Server uses row forwardig poiters to poit to the ew locatios whe rows are moved. So, rather tha havig to fix all of the poiters to that row, the forwardig poiter ow leads to the ew physical locatio of the row. The lesser problem ow is that with more forwardig poiters, you have more I/O to get to the rows that have bee physically relocated. The aswer to this problem is to maage the heap i order to remove the forwardig poiters to make it less expesive to access the relocated rows. Heap Maiteace What you wat to do for heap maiteace is to get rid of the row forwardig poiters, move the rows back oto pages ad fix the oclustered idexes so they poit directly to the row s physical locatio. For heap maiteace you will create ad the drop the clustered idex. Whe you create the clustered idex, the row forwardig poiters will be fixed ad the pages will be expaded or compressed per the fill factor. Whe you drop the clustered idex the idex will be coverted back ito a heap with the poiters fixed ad the physical structure remais itact. LearSmart Cloud Classroom: Video Traiig s Mauals

100 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Table Partitios With table partitios you ca split tables either logically or physically ito may separate smaller tables. To the ed user, the split table still looks like oe table. This allows the optimizer to search ad retur data from oe of the the smaller tables (or subsets of data) rather tha havig to search the etire table (or set). With partitios, you ca also have lie idexes (idexes that are associated with a subset) so that searches will be faster. Oe advatage for the admiistrator is that maiteace ca be doe o oe the subsets idividually ad idepedetly of the others. For the ed user, the performace will likely be better o a partitioed table tha oe that is ot partitioed - especially o the larger tables. Table partitios give you the ability to split large tables up ad maage them i smaller subsets. Partitio Maagemet Rollig partitios provide a way to store data i a series of postigs, archive the oldest postig ad create a ew slot for the postig. For istace, if you wat to maitai six moths of rollig data for some data that is stored by the moth, partitios ca be created for the most recet six moth period. Let s say that you were keepig a record of mothly sales ad you wated to store the most recet six moths i a Postig table ad store the old data i a postig History table. You would have six partitios that divided the Postig table ito the most recet six moths. Postig Postig History 1 Oct 1, <Oct 1, Nov 1, Oct 1, 2009 (Empty) 3 Dec 1, Ja 1, Feb 1, Mar 1, 2010 Figure 37: Uderstadig Partitio Maagemet I the postig history, all of the postigs before October 2008 are stored i partitio oe. I order to update the tables at the ed of a moth you will wat to roll the oldest moth s data to the Postig History table at the ed of the moth -- the create a ew partitio for the ew moth s postigs. To implemet the rollig partitio: Split the empty partitio (partitio two) i the Postig History table. ALTER PARTITION PostigHistoryPF() SPLIT RANGE ( 11/1/2009 ) This creates partitio three i the Postig History table with a date of November 1, Create a check costrait o the Postig table. Defie check costrait o Postig Date >= Oct 1, 2009 Switch partitio oe i the Postig table with partitio two i the postig History table. This moves the October data ito partitio two i the Postig History table. ALTER TABLE Postig SWITCH PARTITION 1 to PostigHistory PARTITION 2 Now partitio 1 i the Postig table is empty ad the data has moved to partitio two of the Postig History table. Merge partitios oe ad two i the Postig table to remove the empty first partitio. ALTER PARTITION FUNCTION PostigPF() MERGE RANGE ( 11/1/2009 ) LearSmart Cloud Classroom: Video Traiig s Mauals

101 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Merge partitios oe ad two i the Postig History table to add the ew data to the history. ALTER PARTITION FUNCTION PostigHistoryPF() MERGE RANGE ( 10/1/2009 ) Now the history has bee updated with October s etries. Make a ew partitio available i the Postig table for the ew moth. ALTER PARTITION FUNCTION PostigPF() SPLIT RANGE ( 4/1/2010 ) Postig Postig History 1 Nov 1, <Nov 1, Dec 1, Nov 1, 2009 (Empty) 3 Ja 1, Feb 1, Mar 1, Apr 1, 2010 Figure 38: Uderstadig Rollig Partitios The fial state of the tables after this process is ready for the April 2010 postigs with the October 2009 postigs stored i the Postig History table. Idex Statistics A idex is oly useful if it reduces the amout of work that must be doe to access the data i the database. Idex Statistics are what the optimizer uses to determie if a idex is useful or ot. Problem: Idex statistics are created at the same time the idex is created with data preset. But the statistics are ot updated for iserts, updates ad deletes. Idexes ca become obsolete over time so that the optimizer chooses the wrog pla for queries. Solutio: Update the idex statistics regularly eough to maitai optimum performace. Usig Auto Update Statistics At the creatio of a idex with data, idex statistical iformatio is created as well ad stored. This iformatio cotais statistics about the data such as how may records have a last ame begiig with the letter A. This iformatio helps SQL Server locate data more quickly. Whe idex statistics get out-of-date, the idex ca be redered useless or of less value tha it was whe it was created. You ca use auto update statistics to check ad automatically update the idex statistics whe they get behid. With the AUTO_UPDATE_STATISTICS commad you ca specify if you wat a SAMPLE or FULLSCAN. With the SAMPLE optio you ca tell auto update statistics to sample a portio of the rows ad geerate statistics from the sample - or you ca tell it to do a full sca of the rows ad geerate statistics from that. Whe you use auto update statistics ad a query attempts to access a row -- if the optimizer sees that the statistics are out of date, it will put the query o hold ad automatically update the statistics. After the statistics are updated, the query is completed. You ca use the AUTO_UPDATE_STATISTICS_ASYNC to update the statistics without puttig the queries o hold. The update rus as a backgroud thread. This is a database level settig. LearSmart Cloud Classroom: Video Traiig s Mauals

102 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Maually Creatig Statistics You ca maually update statistics i the followig ways: You ca use the stored procedure sp_createstats. Use the CREATE STATISTICS commad. Use the UPDATE STATISTICS commad. Use a idex rebuild to update statistics. Desigig a Solutio to Gover Resources Implemetig Resource Goveror Sice shared servers are commo i SQL Server, you eed a way to choose which workloads get the highest priority o each server istace ad a way to moitor ad trace those workloads. The Resource Goveror is ew to SQL Server This powerful ew tool allows you to maage SQL Server workload ad system resource cosumptio. With Resource Goveror you ca specify limits o the amout of CPU ad memory that icomig applicatio requests ca use. You ca cofigure Resource Goveror i usig T-SQL statemets or i SSMS by expadig Maagemet i the Object Explorer. With Resource Goveror you ca balace workloads so that oe workload ca have better access to resources tha aother. It provides a way to segmet SQL Server RDBMS (Relatioal Database Maagemet System) workloads ad to assig resources to those workloads. For istace, you may wat to give priority to certai applicatios that have to fuctio eve whe the server is stressed or, you may wat to give preferece to processig by certai users or groups. You ca do these kids of thigs with Resource Goveror. Note: You caot segmet server level or I/O resources with Resource Goveror. The T-SQL Resource Goveror DDL (Data Defiitio Laguage) statemets available are as follows: CREATE WORKLOAD GROUP ALTER WORKLOAD GROUP DROP WORKLOAD GROUP CREATE RESOURCE POOL ALTER RESOURCE POOL DROP RESOURCE POOL ALTER RESOURCE GOVERNOR Resource Pools Resource Pools allow you to segmet SQL Server resources by CPU ad memory ad assig them to a pool. You ca have up to 18 user-defied pools ad two system pools. There is also a iteral system pool used by SQL Server that is required. You ca t modify the iteral pool. There is a default system pool that is required ad this pool is modifiable. Ad you ca assig multiple workload groups i each pool. LearSmart Cloud Classroom: Video Traiig s Mauals

103 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) A Workload Group is a category of work assiged to a resource pool. With workload groups you ca segmet the workloads o SQL Server ad assig these workloads to differet pools. The umber of workload groups you ca have is ulimited ad you ca use them to segmet the pool resources. You ca also request specific limitatios of the workload groups, like additioal restrictios o CPU ad memory. You ca also specify the DOP (Degree of Parallelism). Groups withi a pool ca be assiged a low or a high priority withi the pool. Note: A group ca oly be assiged to oe pool. A user sessio (or coectio) will be evaluated whe the user logs i ad will be boud to a specific group util that sessio is fiished. If the group is dropped durig a sessio the sessio cotiues to use the resources specified for the group util the sessio eds. A Sessios Classifier is a fuctio that breaks the sessios up ito groups or assigs sessios to groups. The sessios classifier is a user-defied fuctio that is created i the master database ad you ca oly have oe classifier per istace of SQL Server. This fuctio is chageable o-the-fly so if you create a poor classificatio, you ca easily make correctios. Figure 39: Uderstadig the Sessios Classifier Fuctio I the diagram above, sessios are filtered through the sessios classifier ad are routed to the workload group that has bee assiged by the sessios classifier fuctio you create. Each ew sessio is routed to the specified group (or the default group, if it s ot idetified i the sessios classifier). Each workload group is assiged to a pool with certai system resources allocated for that pool. I the diagram above, GROUP A ad GROUP B are USER POOL. GROUP A ad GROUP B could be assiged to separate pools but either ca be assiged to more tha oe pool. LearSmart Cloud Classroom: Video Traiig s Mauals

104 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) How Resource Goveror Works Resource Goveror oly uses resources that are allocated to SQL Server. Memory limitatios oly apply to memory grated to SQL Server. 100 percet of CPU resources are available except for the resources that are ot allowed by the CPU affiity mask. CPU percetages that are segmeted for pools oly take effect whe there is CPU cotetio. As log as there is o CPU cotetio, there is o eed to limit ad allocate resources. The memory percetages, o the other had, are set aside for a pool whe the pool is created. You should divide memory resources carefully so as ot to have too much uused memory i ay oe pool. Workload Group Settigs The settigs for a workload group oly affect the group ad othig outside the group. I a group you ca set the followig: REQEST_MAX_MEMORY_GRANT_PERCENT the amout of memory a sigle request ca use i the pool. This is relative to the maximum memory for the pool ad the default is 25 percet. Large queries will ru oe at a time if the value is set at 50 percet or greater. REQUEST_MAX_CPU_TIME_SEC the maximum CPU time for ay query. If this time is exceeded, it wo t stop the query, but it will cause the evet - CPU threshold exceeded. The default value for this settig is zero - which is ulimited. REQUEST_MEMORY_GRANT_TIMEOUT the maximum time a query will wait for a work buffer. This will fail if the timeout is reached. MAX_DOP Maximum degree of parallelism. This overrides the sp_cofigure ad the values for this settig are 0 to 64. MAX_GROUP_REQUEST Maximum umber of thigs ruig i a group. Zero is the default, which meas ulimited. Resource Goveror Moitorig Here is a list of DMVs you ca use to moitor Resource Goveror activities: For cofiguratio ad stored values use: sys.dm_resource_goveror_cofiguratio sys.dm_resource_goveror_resource_pools sys.dm_resource_goveror_workload_groups Other tools for maagemet iclude usig the dyamic maagemet views for aalysis. You should archive the dyamic maagemet views periodically the you ca write procedures that will provide period based metrics. LearSmart Cloud Classroom: Video Traiig s Mauals

105 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 40: Addig Couters You ca also ru perfmo ad click the gree plus sig to add couters. I the screeshot above, you see that we have selected a couter for the work group stats for my default istace -- CPU usage %. We also selected all group istaces to moitor. Resource Goveror Evets As we discussed earlier there is the CPU threshold exceeded evet i errors ad warigs. You ca set up a alert for this evet i SQL Server Aget as well. There are also the followig evets: Sessios - PreCoect: startig evet Sessios - PreCoect: completed evet There are Resource Goveror performace couter groups where you ca pull the: SQL Server: Resource Pool Stats SQL Server: Workload Group Stats LearSmart Cloud Classroom: Video Traiig s Mauals

106 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Some Resource Goveror Usage Tips The sessios classifier fuctio allows you to segmet the workload. You ca use the classifier fuctio to assig the workload to the followig: SQL\Domai or the user Applicatio ame Host Server role Active Directory group that the user is a member of You ca use Resource Goveror with dyamically chagig workloads i respose to a exteral stimulus or o a schedule. Testig ad Debuggig Resource Goveror You should test the Resource Goveror setup thoroughly before you put it ito productio. Because Resource Goveror does t kick i uless there is a actual cotetio, you have to test with a backgroud workload. You should also test the sessios classifier fuctio thoroughly especially if you have order-sesitive classificatios. Make sure you test the classifier fuctio for performace as well - because the time it takes to do the classificatio adds to the logi time. To debug problems that you discover whe you test, use the DAC logi ad the DM views that we have discussed i this sectio. You ca use System Moitor for debuggig as well. Follow the steps below to create a Resource Goveror eviromet. 1. Create workload groups for your workloads. 2. Create a classificatio fuctio. 3. Eable Resource Goveror. 4. Moitor the Resource Goveror. Desigig Policies with Policy Based Maagemet I this sectio we will discuss the scalability of PBM across multiple servers i the eterprise. Whe desigig PBM, remember that there are hudreds ad hudreds of facets. Ad you create coditios o the facets, ad each coditio is associated with a policy. You ca set evaluatio coditios based o a facet ad coditio that ca be: o demad policies, o a schedule ad o chage (which will either log the chage or prevet the chage). You ca also set up alerts, but oly for o demad policies. To admiister PBM you have to be a member of the PolicyAdmiistrator role o msdb. LearSmart Cloud Classroom: Video Traiig s Mauals

107 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) PBM Scalability To scale out PBM you must first set up a policy o a SQL Server egie. You may eve wat to istall SQL Server egie dedicated to hostig your policies. Oce the policies are set up, you ca export the policies to XML files. You ca register yourself as a cetral maagemet server -- or with Local Server Groups, you ca register all of the servers that you wat to distribute the policies to i a sigle group -- ad the import these policies i a batch to multiple servers. Desigig a Data Compressio Strategy Page vs. Row Compressio Page compressio icludes row compressio so it will take loger ad use more resources. Row compressio maily compresses the metadata i a row ad it does compress well because prefixes are used i the metadata. Page compressio allows the opportuity to do more compressio tha row compressio. Ad remember it s always a good idea to rebuild heaps oce i a while because DML does t compress the data. Partitio ad Idex Compressio Partitios ad idexes ca be idepedetly compressed usig either oe, row, or page compressio. Idexes will usually compress well because the prefixes are likely to be the same. Because partitios are mostly read-oly, they are also good cadidates for compressio. Desigig a Maagemet Automatio Strategy DDL Triggers With DDL triggers you ca respod to a evet several ways. You ca prevet a actio from happeig by rollig it back. You ca also do other thigs iside the trigger. Remember a trigger is a special stored procedure so you have some cotrol over what occurs i respose to a evet. You may use DDL triggers to audit or otify of a chage occurrig. DDL triggers fire after a chage occurs ad durig the trasactio, so you have the opportuity to roll the chage back. The triggers are sychroous ad the cost is icluded i the cost of the origial actio. Comparisos Evet otificatios ca fire from DDL or SQL trace evets. You ca use evet otificatios to log chages or to perform some actio. Ulike DDL triggers which happe sychroously, evet otificatios are asychroous ad ru idepedet of whatever caused the evet. Therefore evet otificatios do ot use the trasactio resources to respod to the evet. Ad sice they do t occur withi the trasactio, you caot prevet the chage from happeig, there is o way to roll back the trasactio. LearSmart Cloud Classroom: Video Traiig s Mauals

108 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) WMI Widows Maagemet Istrumetatio ca maage ay evet geerated by SQL Server. SQL Server Aget ca query ad respod to these evets. This ehaces the capability of SQL Server Aget. You ca use the WQL laguage to query evets that occur. SQL Server Aget SQL Server Aget as aother tool for automatio ca do the followig: Schedule ad ru jobs Create alerts that will respod to: WMI evets Performace idicators SQL Server errors Notify operators Test Tip: Make sure you remember that whe you setup job steps, you should be careful to eable the loggig that s ecessary for you to do proper debuggig. You have the optio to tur o or restrict loggig durig the setup. PowerShell PowerShell is a scriptig laguage ad SQL PowerShell is a extesio of this laguage that allows you to avigate the SQL objects like the file system directory ad file hierarchy. It uses familiar commads like dir, cd, reame ad delete. There are Cmdlets icluded that are uique to SQL Server. There is also a Ivoke-SQLcmd commad that ca be used to ru a T-SQL or XQuery scripts. The Cmdlets that are available to SQL Server are: Ivoke-SQLcmd. Ivoke-PolicyEvaluatio - evaluates policy compliace ad reports it. This commad ca also be used to apply chages if policies are violated. You may wat to use this to automate the evaluatio of PBM. Ecode-SQLName - it allows the use of characters that are available i SQL Server that are ot supported i PowerShell. Covert-UrToPath - PowerShell uses paths to idetify objects so this commad coverts URNs (Uiform Resource Name) to paths for use i PowerShell. To ru SQL PowerShell you type SQLPS i the commad lie or right-click the server istace i SQL Server Maagemet Studio. This loads the SQL Cmdlets ad it rus i the restricted mode with o scripts allowed. You ca use the Set-ExecutioPolicy Cmdlet ad allow scripts to ru if you eed to. LearSmart Cloud Classroom: Video Traiig s Mauals

109 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Domai 7: Desigig a Strategy for Data Distributio Here you will lear how to distribute data ad deploy packages across servers or i the same server. We will cover strategies for SQL Services Itegratio Service data distributio ad security cosideratios to protect that data, usig replicatio for data distributio ad coflict detectio ad resolutio. Admiisterig SQL Server Itegratio Services Packages SQL Server Itegratio Services (SSIS) is oe of may ways you ca distribute data across the eterprise. SSIS packages ca be stored i msdb ad the file system. There are roles associated with msdb that allow you to access these packages. The db_ssisadmi or sysadmi roles ca do aythig to ay SSIS package. The db_ssisltduser role ca create, view ad execute oly packages that belog to them. The db_ssisoperator role ca list, view ad execute ay package but ca t create or import packages. Data Protectio You ca also have reader ad writer roles with packages. These roles are associated with security roles i msdb ad ca further limit access to specific packages. Packages ca have sesitive data stored i them, like a etire coectio strig or a password. XML odes ad variables may be tagged as sesitive. A developer may mark compoets or tasks as sesitive as well. You eed to be aware of the sesitive data i packages that are stores ad distributed ad take the ecessary steps to protect that data. You ca set the property DotSaveSesitive to prohibit ay sesitive data from beig saved i a package. Whe you use this property all of the sesitive data is blaked out ad the user must provide it - as i passwords for istace. Aother way to protect the sesitive data is to save it with EcryptAllWithPassword. I this case all of the data is ecrypted ad you will provide a password that will be used to access the package. The password will the be required for ayoe who opes or rus the package. You ca also save the package with EcryptAllWithUserKey so that oly the curret user ca ope or ru the package. If you save the package with EcryptSesitiveWithPassword, the password must be used access the sesitive data. If a password is ot provided, the package will be opeed but the sesitive data will be blaked out ad the package caot be executed. If you use EcryptSesitiveWithUserKey, access to the sesitive data is based o a key rather tha a password. Without the key, the package will be opeed but the sesitive data will be blaked out ad the package caot be executed. Note: It is commo practice ot to save sesitive iformatio i SSIS packages. LearSmart Cloud Classroom: Video Traiig s Mauals

110 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Deploymet Problem: I the process of package developmet, testig, QA ad productio, thigs like paths, logis ad test iformatio may chage. Solutio: Store the cofiguratio ad make them readily available for deploymet. You ca store the cofiguratios via: XML files icludes the iformatio eeded for dev. Probably the best optio. Variables you would have to provide oe variable for each cofigured item. SQL Server table your deploymet would have to iclude automatic scriptig of the cofiguratio iformatio ad the automatic scriptig isertio of the cofiguratio iformatio as rows o a table i productio. Eviromet Variables the umber of cofiguratio items stored are limited by the available memory. Registry Etries geerally avoided because registry iformatio is easily corrupted. Troubleshootig Packages For troubleshootig packages you ca write ad add evet hadlers i the package. You ca also add error output that is stadardized or customized. Addig loggig to the package ca provide additioal audit iformatio ad thigs like failed row couts. Addig checkpoits to your package ca allow the package to reru ad restart at the poit of failure. Cofigurig Checkpoits Sice checkpoits are writte as files, make sure you have the proper security o the file. You will have to provide CheckpoitFileame ad CheckpoitUsage. CheckpoitUsage tells the package whether checkpoits are used. The selectios are: Never Always Exists (Oly if the file exists) Withi the package you will eed to set the property SaveCheckpoits as well. LearSmart Cloud Classroom: Video Traiig s Mauals

111 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Desigig a Liked Servers Strategy Liked servers provide a quick way to get access to data o aother server. You use user mappig o a local machie to users o the foreig (liked server) machie. You will eed to provide a logi ad password for the foreig machie. If you do t use user mappig you ca choose to logi without a cotext or you ca use self mappig -- which is the default. Self mappig uses your idetity o the local machie as your idetity o the foreig machie. You ca also set it up so that everyoe who uses the liked server has a idetificatio o the foreig server that is a predefied logi. Delegatio If you use self mappig, you will be passig credetials from oe server to aother, this is called delegatio. With self mappig you will be able to logi o the local machie ad the you ca execute a liked server query o the foreig machie. To set this up you must do some work o the local machie, o the foreig machie ad o the cliet. O the cliet, the cliets Active Directory Logi must have access to both the local machie ad the foreig machie. There is a property called accout is sesitive ad must ot be delegated, this property caot be selected - you wat delegatio. The cliet must use TCP/IP or amed pipes to make the coectio. O the local machie a Service Pricipal Name must be registered by the domai admiistrator. The SQL Service accout must be trusted for delegatio ad SQL Server must also use IP or amed pipes. The you set up a liked server o the local machie to poit to the foreig machie. To do this use sp_addlikedserver server2, SQL Server. Next you set the liked server logis to self mappig usig sp_addlikedserverlogi server2, True. O the foreig machie a Service Pricipal Name must be registered by the domai admiistrator. The server must also use IP or amed pipes. SSMS Liked Server Setup To create a liked server i SSMS expad Server Objects i Object Explorer, right click o Liked Servers ad select New Liked Server. LearSmart Cloud Classroom: Video Traiig s Mauals

112 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 41: Creatig a New Liked Server You will get the New Liked Server widow show above. Select SQL Server ad eter the ame of the server you would like to lik to. LearSmart Cloud Classroom: Video Traiig s Mauals

113 Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) Figure 42: Settig Security for the Liked Server Next, select Security to set up security for the liked server coectio. Click Add to eter the logi iformatio. You ca click the Local Logi box for a list of available logis ad select from there. You have the optio to impersoate or you ca eter a Remote User ad a password. Note: For remote user access, the password will always be set uecrypted. For all logis that are ot mapped, you have some optios o how these logis will be hadled (Refer to the screeshot above): Not to be made - Umapped users ca t make a coectio. Be made without usig a security cotext - Not all providers will require a security cotext. Use this optio if you wish users to coect ad a security cotext is ot required by the provider. Be made usig logi s curret security cotext - Logi with curret logi - delegatio is required for this optio. Be made usig this security cotext - Eter remote logi with a password. LearSmart Cloud Classroom: Video Traiig s Mauals

Domain 1: Designing a SQL Server Instance and a Database Solution

Domain 1: Designing a SQL Server Instance and a Database Solution Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) 1-800-418-6789 Domai 1: Desigig a SQL Server Istace ad a Database Solutio Desigig for CPU, Memory ad Storage Capacity Requiremets Whe desigig a

More information

(VCP-310) 1-800-418-6789

(VCP-310) 1-800-418-6789 Maual VMware Lesso 1: Uderstadig the VMware Product Lie I this lesso, you will first lear what virtualizatio is. Next, you ll explore the products offered by VMware that provide virtualizatio services.

More information

Configuring Additional Active Directory Server Roles

Configuring Additional Active Directory Server Roles Maual Upgradig your MCSE o Server 2003 to Server 2008 (70-649) 1-800-418-6789 Cofigurig Additioal Active Directory Server Roles Active Directory Lightweight Directory Services Backgroud ad Cofiguratio

More information

BaanERP. BaanERP Windows Client Installation Guide

BaanERP. BaanERP Windows Client Installation Guide BaaERP A publicatio of: Baa Developmet B.V. P.O.Box 143 3770 AC Bareveld The Netherlads Prited i the Netherlads Baa Developmet B.V. 1999. All rights reserved. The iformatio i this documet is subject to

More information

Domain 1: Identifying Cause of and Resolving Desktop Application Issues Identifying and Resolving New Software Installation Issues

Domain 1: Identifying Cause of and Resolving Desktop Application Issues Identifying and Resolving New Software Installation Issues Maual Widows 7 Eterprise Desktop Support Techicia (70-685) 1-800-418-6789 Domai 1: Idetifyig Cause of ad Resolvig Desktop Applicatio Issues Idetifyig ad Resolvig New Software Istallatio Issues This sectio

More information

Domain 1: Configuring Domain Name System (DNS) for Active Directory

Domain 1: Configuring Domain Name System (DNS) for Active Directory Maual Widows Domai 1: Cofigurig Domai Name System (DNS) for Active Directory Cofigure zoes I Domai Name System (DNS), a DNS amespace ca be divided ito zoes. The zoes store ame iformatio about oe or more

More information

ODBC. Getting Started With Sage Timberline Office ODBC

ODBC. Getting Started With Sage Timberline Office ODBC ODBC Gettig Started With Sage Timberlie Office ODBC NOTICE This documet ad the Sage Timberlie Office software may be used oly i accordace with the accompayig Sage Timberlie Office Ed User Licese Agreemet.

More information

Unicenter TCPaccess FTP Server

Unicenter TCPaccess FTP Server Uiceter TCPaccess FTP Server Release Summary r6.1 SP2 K02213-2E This documetatio ad related computer software program (hereiafter referred to as the Documetatio ) is for the ed user s iformatioal purposes

More information

Baan Service Master Data Management

Baan Service Master Data Management Baa Service Master Data Maagemet Module Procedure UP069A US Documetiformatio Documet Documet code : UP069A US Documet group : User Documetatio Documet title : Master Data Maagemet Applicatio/Package :

More information

SQL Server 2008 Implementation and Maintenance (70-432) LearnSmart Exam Manual

SQL Server 2008 Implementation and Maintenance (70-432) LearnSmart Exam Manual Maual SQL Server 2008 Implemetatio ad Maiteace (70-432) 1-800-418-6789 SQL Server 2008 Implemetatio ad Maiteace (70-432) LearSmart Maual Copyright 2011 by PrepLogic, LLC. Product ID: 012335 Productio Date:

More information

Engineering Data Management

Engineering Data Management BaaERP 5.0c Maufacturig Egieerig Data Maagemet Module Procedure UP128A US Documetiformatio Documet Documet code : UP128A US Documet group : User Documetatio Documet title : Egieerig Data Maagemet Applicatio/Package

More information

Authentication - Access Control Default Security Active Directory Trusted Authentication Guest User or Anonymous (un-authenticated) Logging Out

Authentication - Access Control Default Security Active Directory Trusted Authentication Guest User or Anonymous (un-authenticated) Logging Out FME Server Security Table of Cotets FME Server Autheticatio - Access Cotrol Default Security Active Directory Trusted Autheticatio Guest User or Aoymous (u-autheticated) Loggig Out Authorizatio - Roles

More information

CCH Accountants Starter Pack

CCH Accountants Starter Pack CCH Accoutats Starter Pack We may be a bit smaller, but fudametally we re o differet to ay other accoutig practice. Util ow, smaller firms have faced a stark choice: Buy cheaply, kowig that the practice

More information

E-Plex Enterprise Access Control System

E-Plex Enterprise Access Control System Eterprise Access Cotrol System Egieered for Flexibility Modular Solutio The Eterprise Access Cotrol System is a modular solutio for maagig access poits. Employig a variety of hardware optios, system maagemet

More information

Desktop Management. Desktop Management Tools

Desktop Management. Desktop Management Tools Desktop Maagemet 9 Desktop Maagemet Tools Mac OS X icludes three desktop maagemet tools that you might fid helpful to work more efficietly ad productively: u Stacks puts expadable folders i the Dock. Clickig

More information

Full Lifecycle Project Cost Controls

Full Lifecycle Project Cost Controls Full Lifecycle Project Cost Cotrols EcoSys EPC is a ext geeratio plaig ad cost cotrols software solutio deliverig best practices for full lifecycle project cost maagemet i a itegrated, easy-to-use web

More information

QUADRO tech. PST Flightdeck. Put your PST Migration on autopilot

QUADRO tech. PST Flightdeck. Put your PST Migration on autopilot QUADRO tech PST Flightdeck Put your PST Migratio o autopilot Put your PST Migratio o Autopilot A moder aircraft hardly remids its pilots of the early days of air traffic. It is desiged to eable flyig as

More information

Domain 1 - Describe Cisco VoIP Implementations

Domain 1 - Describe Cisco VoIP Implementations Maual ONT (642-8) 1-800-418-6789 Domai 1 - Describe Cisco VoIP Implemetatios Advatages of VoIP Over Traditioal Switches Voice over IP etworks have may advatages over traditioal circuit switched voice etworks.

More information

June 3, 1999. Voice over IP

June 3, 1999. Voice over IP Jue 3, 1999 Voice over IP This applicatio ote discusses the Hypercom solutio for providig ed-to-ed Iteret protocol (IP) coectivity i a ew or existig Hypercom Hybrid Trasport Mechaism (HTM) etwork, reducig

More information

CCH Accounts Production

CCH Accounts Production CCH Accouts Productio accouts productio facig today s challeges Preparig statutory ad fiacial accouts is a core activity for our practice, as it is for may professioal firms. Although legislatio ad accoutig

More information

Enhancing Oracle Business Intelligence with cubus EV How users of Oracle BI on Essbase cubes can benefit from cubus outperform EV Analytics (cubus EV)

Enhancing Oracle Business Intelligence with cubus EV How users of Oracle BI on Essbase cubes can benefit from cubus outperform EV Analytics (cubus EV) Ehacig Oracle Busiess Itelligece with cubus EV How users of Oracle BI o Essbase cubes ca beefit from cubus outperform EV Aalytics (cubus EV) CONTENT 01 cubus EV as a ehacemet to Oracle BI o Essbase 02

More information

Baan Finance Accounts Payable

Baan Finance Accounts Payable Baa Fiace Accouts Payable Module Procedure UP035A US Documetiformatio Documet Documet code : UP035A US Documet group : User Documetatio Documet title : Accouts Payable Applicatio/Package : Baa Fiace Editio

More information

Flood Emergency Response Plan

Flood Emergency Response Plan Flood Emergecy Respose Pla This reprit is made available for iformatioal purposes oly i support of the isurace relatioship betwee FM Global ad its cliets. This iformatio does ot chage or supplemet policy

More information

Investing in Stocks WHAT ARE THE DIFFERENT CLASSIFICATIONS OF STOCKS? WHY INVEST IN STOCKS? CAN YOU LOSE MONEY?

Investing in Stocks WHAT ARE THE DIFFERENT CLASSIFICATIONS OF STOCKS? WHY INVEST IN STOCKS? CAN YOU LOSE MONEY? Ivestig i Stocks Ivestig i Stocks Busiesses sell shares of stock to ivestors as a way to raise moey to fiace expasio, pay off debt ad provide operatig capital. Ecoomic coditios: Employmet, iflatio, ivetory

More information

InventoryControl. The Complete Inventory Tracking Solution for Small Businesses

InventoryControl. The Complete Inventory Tracking Solution for Small Businesses IvetoryCotrol The Complete Ivetory Trackig Solutio for Small Busiesses Regular Logo 4C Productivity Solutios for Small Busiesses Logo Outlie Get i cotrol of your ivetory with Wasp Ivetory Cotrol the complete

More information

Serial ATA PCI Host Adapter AEC-6290/6295

Serial ATA PCI Host Adapter AEC-6290/6295 Serial ATA PCI Host Adapter AEC-6290/6295 User s Maual Versio:1.0 Copyright 2003 ACARD Techology Corp. Release: April 2003 Copyright ad Trademarks The iformatio of the product i this maual is subject to

More information

Analyzing Longitudinal Data from Complex Surveys Using SUDAAN

Analyzing Longitudinal Data from Complex Surveys Using SUDAAN Aalyzig Logitudial Data from Complex Surveys Usig SUDAAN Darryl Creel Statistics ad Epidemiology, RTI Iteratioal, 312 Trotter Farm Drive, Rockville, MD, 20850 Abstract SUDAAN: Software for the Statistical

More information

TruStore: The storage. system that grows with you. Machine Tools / Power Tools Laser Technology / Electronics Medical Technology

TruStore: The storage. system that grows with you. Machine Tools / Power Tools Laser Technology / Electronics Medical Technology TruStore: The storage system that grows with you Machie Tools / Power Tools Laser Techology / Electroics Medical Techology Everythig from a sigle source. Cotets Everythig from a sigle source. 2 TruStore

More information

CCH Practice Management

CCH Practice Management 1 CCH Practice Maagemet practice maagemet facig today s challeges Every year it seems we face more regulatios, growig cliet expectatios ad lower margis o our compliace work. It s a tough time for a accoutig

More information

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature. Itegrated Productio ad Ivetory Cotrol System MRP ad MRP II Framework of Maufacturig System Ivetory cotrol, productio schedulig, capacity plaig ad fiacial ad busiess decisios i a productio system are iterrelated.

More information

I apply to subscribe for a Stocks & Shares ISA for the tax year 20 /20 and each subsequent year until further notice.

I apply to subscribe for a Stocks & Shares ISA for the tax year 20 /20 and each subsequent year until further notice. IFSL Brooks Macdoald Fud Stocks & Shares ISA Trasfer Applicatio Form IFSL Brooks Macdoald Fud Stocks & Shares ISA Trasfer Applicatio Form Please complete usig BLOCK CAPITALS ad retur the completed form

More information

ContactPro Desktop for Multi-Media Contact Center

ContactPro Desktop for Multi-Media Contact Center CotactPro Desktop for Multi-Media Cotact Ceter CCT CotactPro (CP) is the perfect solutio for the aget desktop i a Avaya multimedia call ceter eviromet. CotactPro empowers agets to efficietly serve customers

More information

Security Functions and Purposes of Network Devices and Technologies (SY0-301) 1-800-418-6789. Firewalls. Audiobooks

Security Functions and Purposes of Network Devices and Technologies (SY0-301) 1-800-418-6789. Firewalls. Audiobooks Maual Security+ Domai 1 Network Security Every etwork is uique, ad architecturally defied physically by its equipmet ad coectios, ad logically through the applicatios, services, ad idustries it serves.

More information

QUADRO tech. FSA Migrator 2.6. File Server Migrations - Made Easy

QUADRO tech. FSA Migrator 2.6. File Server Migrations - Made Easy QUADRO tech FSA Migrator 2.6 File Server Migratios - Made Easy FSA Migrator Cosolidate your archived ad o-archived File Server data - with ease! May orgaisatios struggle with the cotiuous growth of their

More information

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth Questio 1: What is a ordiary auity? Let s look at a ordiary auity that is certai ad simple. By this, we mea a auity over a fixed term whose paymet period matches the iterest coversio period. Additioally,

More information

client communication

client communication CCH Portal cliet commuicatio facig today s challeges Like most accoutacy practices, we ow use email for most cliet commuicatio. It s quick ad easy, but we do worry about the security of sesitive data.

More information

Exchange Server 2010 Configuration (70-662) LearnSmart Exam Manual Copyright 2011 by PrepLogic, LLC. Product ID: 012467 Production Date: July 13, 2011

Exchange Server 2010 Configuration (70-662) LearnSmart Exam Manual Copyright 2011 by PrepLogic, LLC. Product ID: 012467 Production Date: July 13, 2011 Maual Exchage Server 2010 Cofiguratio (70-662) 1-800-418-6789 Exchage Server 2010 Cofiguratio (70-662) LearSmart Maual Copyright 2011 by PrepLogic, LLC. Product ID: 012467 Productio Date: July 13, 2011

More information

How to use what you OWN to reduce what you OWE

How to use what you OWN to reduce what you OWE How to use what you OWN to reduce what you OWE Maulife Oe A Overview Most Caadias maage their fiaces by doig two thigs: 1. Depositig their icome ad other short-term assets ito chequig ad savigs accouts.

More information

Appendix B: Third-Party Tools

Appendix B: Third-Party Tools Appedix B: Third-Party Tools I This Chapter Cosideratios The Tools Cosideratios Obviously, beig able to desig, prepare, ad implemet effective disaster recovery strategies for your SharePoit eviromet is

More information

Managed Services Catalogue (HE)

Managed Services Catalogue (HE) Maaged Services Catalogue (HE) New legislatio ad ew statutory requiremets come i regularly so it is essetial for us to have a flexible system which ca cope with the chages required ad the frequecy of the

More information

Introducing Your New Wells Fargo Trust and Investment Statement. Your Account Information Simply Stated.

Introducing Your New Wells Fargo Trust and Investment Statement. Your Account Information Simply Stated. Itroducig Your New Wells Fargo Trust ad Ivestmet Statemet. Your Accout Iformatio Simply Stated. We are pleased to itroduce your ew easy-to-read statemet. It provides a overview of your accout ad a complete

More information

insight reporting solutions

insight reporting solutions reportig solutios Create ad cotrol olie customized score reports to measure studet progress ad to determie ways to improve istructio. isight Customized Reportig empowers you to make data-drive decisios.

More information

Your organization has a Class B IP address of 166.144.0.0 Before you implement subnetting, the Network ID and Host ID are divided as follows:

Your organization has a Class B IP address of 166.144.0.0 Before you implement subnetting, the Network ID and Host ID are divided as follows: Subettig Subettig is used to subdivide a sigle class of etwork i to multiple smaller etworks. Example: Your orgaizatio has a Class B IP address of 166.144.0.0 Before you implemet subettig, the Network

More information

Domain 1 Components of the Cisco Unified Communications Architecture

Domain 1 Components of the Cisco Unified Communications Architecture Maual CCNA Domai 1 Compoets of the Cisco Uified Commuicatios Architecture Uified Commuicatios (UC) Eviromet Cisco has itroduced what they call the Uified Commuicatios Eviromet which is used to separate

More information

LEASE-PURCHASE DECISION

LEASE-PURCHASE DECISION Public Procuremet Practice STANDARD The decisio to lease or purchase should be cosidered o a case-by case evaluatio of comparative costs ad other factors. 1 Procuremet should coduct a cost/ beefit aalysis

More information

Neolane Reporting. Neolane v6.1

Neolane Reporting. Neolane v6.1 Neolae Reportig Neolae v6.1 This documet, ad the software it describes, are provided subject to a Licese Agreemet ad may ot be used or copied outside of the provisios of the Licese Agreemet. No part of

More information

Contents. 1 Scalable Business Management Software. 2 Overview of Benefits. 3 Choosing the right Sage Accpac ERP Edition for your Business

Contents. 1 Scalable Business Management Software. 2 Overview of Benefits. 3 Choosing the right Sage Accpac ERP Edition for your Business Accpac ERP Cotets 1 Scalable Busiess Maagemet Software 2 Overview of Beefits 3 Choosig the right Sage Accpac ERP Editio for your Busiess 4 Sage Accpac ERP Feature Compariso 5 A Breakdow of Core Modules

More information

CHAPTER 3 THE TIME VALUE OF MONEY

CHAPTER 3 THE TIME VALUE OF MONEY CHAPTER 3 THE TIME VALUE OF MONEY OVERVIEW A dollar i the had today is worth more tha a dollar to be received i the future because, if you had it ow, you could ivest that dollar ad ear iterest. Of all

More information

How to read A Mutual Fund shareholder report

How to read A Mutual Fund shareholder report Ivestor BulletI How to read A Mutual Fud shareholder report The SEC s Office of Ivestor Educatio ad Advocacy is issuig this Ivestor Bulleti to educate idividual ivestors about mutual fud shareholder reports.

More information

The Forgotten Middle. research readiness results. Executive Summary

The Forgotten Middle. research readiness results. Executive Summary The Forgotte Middle Esurig that All Studets Are o Target for College ad Career Readiess before High School Executive Summary Today, college readiess also meas career readiess. While ot every high school

More information

I apply to subscribe for a Stocks & Shares NISA for the tax year 2015/2016 and each subsequent year until further notice.

I apply to subscribe for a Stocks & Shares NISA for the tax year 2015/2016 and each subsequent year until further notice. IFSL Brooks Macdoald Fud Stocks & Shares NISA trasfer applicatio form IFSL Brooks Macdoald Fud Stocks & Shares NISA trasfer applicatio form Please complete usig BLOCK CAPITALS ad retur the completed form

More information

Equalizer Installation and Administration Guide

Equalizer Installation and Administration Guide Equalizer Istallatio ad Admiistratio Guide Versio 7.2.3 Jauary 2007 Coyote Poit Systems, Ic. 675 North First Street Suite 975 Sa Jose, Califoria 95112 Copyright 1997-2007 Coyote Poit Systems, Ic. All Rights

More information

For customers Key features of the Guaranteed Pension Annuity

For customers Key features of the Guaranteed Pension Annuity For customers Key features of the Guarateed Pesio Auity The Fiacial Coduct Authority is a fiacial services regulator. It requires us, Aego, to give you this importat iformatio to help you to decide whether

More information

Death Beefits from Pacific Life

Death Beefits from Pacific Life Ehace Your Fiacial Legacy Variable Auities with Death Beefits from Pacific Life 9/15 20188-15C FOR CALIFORNIA As You Pla for Retiremet, Protect Your Loved Oes A Pacific Life variable auity ca offer three

More information

OfficePACS. Digital Imaging

OfficePACS. Digital Imaging OfficePACS Digital Imagig About Stryker Stryker is a multi-billio dollar compay specializig i orthopaedics We are oe of the largest compaies i the worldwide orthopaedic market We are a Fortue 500 & BusiessWeek

More information

Radio Dispatch Systems

Radio Dispatch Systems Radio Dispatch Systems ZETRON DISPATCH SOLUTIONS: AT THE CENTER OF YOUR CRITICAL OPERATIONS Your dispatch system is the ceterpoit through which your key operatios are coordiated ad cotrolled. That s why

More information

Digital Enterprise Unit. White Paper. Leveraging Best Practices and Recommendations for Optimal Performance Tuning of IBM Campaign

Digital Enterprise Unit. White Paper. Leveraging Best Practices and Recommendations for Optimal Performance Tuning of IBM Campaign Digital Eterprise Uit White Paper Leveragig Best Practices ad Recommedatios for Optimal Performace Tuig of IBM Campaig About the Author Harshal Tejale Harshal Tejale is a Assistat Cosultat at Tata Cosultacy

More information

CREATIVE MARKETING PROJECT 2016

CREATIVE MARKETING PROJECT 2016 CREATIVE MARKETING PROJECT 2016 The Creative Marketig Project is a chapter project that develops i chapter members a aalytical ad creative approach to the marketig process, actively egages chapter members

More information

INVESTMENT PERFORMANCE COUNCIL (IPC) Guidance Statement on Calculation Methodology

INVESTMENT PERFORMANCE COUNCIL (IPC) Guidance Statement on Calculation Methodology Adoptio Date: 4 March 2004 Effective Date: 1 Jue 2004 Retroactive Applicatio: No Public Commet Period: Aug Nov 2002 INVESTMENT PERFORMANCE COUNCIL (IPC) Preface Guidace Statemet o Calculatio Methodology

More information

Enhance Your Financial Legacy Variable Annuity Death Benefits from Pacific Life

Enhance Your Financial Legacy Variable Annuity Death Benefits from Pacific Life Ehace Your Fiacial Legacy Variable Auity Death Beefits from Pacific Life 7/15 20172-15B As You Pla for Retiremet, Protect Your Loved Oes A Pacific Life variable auity ca offer three death beefits that

More information

Advanced Protection for Web Services

Advanced Protection for Web Services RealSetry TM SSL overview Advaced Protectio for Web Services SSL Accelerator Itrusio Detectio System Reverse Proxy Applicatio-Firewall Web services deploymet The pricipal reasos which delay the deploymet

More information

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling Taig DCOP to the Real World: Efficiet Complete Solutios for Distributed Multi-Evet Schedulig Rajiv T. Maheswara, Milid Tambe, Emma Bowrig, Joatha P. Pearce, ad Pradeep araatham Uiversity of Souther Califoria

More information

BaanERP 5.0c. EDI User Guide

BaanERP 5.0c. EDI User Guide BaaERP 5.0c A publicatio of: Baa Developmet B.V. P.O.Box 143 3770 AC Bareveld The Netherlads Prited i the Netherlads Baa Developmet B.V. 1999. All rights reserved. The iformatio i this documet is subject

More information

CS100: Introduction to Computer Science

CS100: Introduction to Computer Science Review: History of Computers CS100: Itroductio to Computer Sciece Maiframes Miicomputers Lecture 2: Data Storage -- Bits, their storage ad mai memory Persoal Computers & Workstatios Review: The Role of

More information

INVESTMENT PERFORMANCE COUNCIL (IPC)

INVESTMENT PERFORMANCE COUNCIL (IPC) INVESTMENT PEFOMANCE COUNCIL (IPC) INVITATION TO COMMENT: Global Ivestmet Performace Stadards (GIPS ) Guidace Statemet o Calculatio Methodology The Associatio for Ivestmet Maagemet ad esearch (AIM) seeks

More information

Skytron Asset Manager

Skytron Asset Manager Skytro Asset Maager Meet Asset Maager Skytro Asset Maager is a wireless, pateted RFID asset trackig techology specifically desiged for hospital facilities to deliver istat ROI withi a easy to istall, fully

More information

3G Security VoIP Wi-Fi IP Telephony Routing/Switching Unified Communications. NetVanta. Business Networking Solutions

3G Security VoIP Wi-Fi IP Telephony Routing/Switching Unified Communications. NetVanta. Business Networking Solutions 3G Security VoIP Wi-Fi IP Telephoy Routig/Switchig Uified Commuicatios NetVata Busiess Networkig Solutios Opportuity to lower Total Cost of Owership ad improve Retur o Ivestmet The ADTRAN Advatage ADTRAN

More information

Pre-Installation Network Planning Forms--S8700 Media Server

Pre-Installation Network Planning Forms--S8700 Media Server Pre-Istallatio Network Plaig Forms--S8700 Media Server S8700 Media Server with a Avaya G600 Media Gateways S8700 Media Server with Avaya MCC1/SCC1 Gateways Before you istall ad cofigure a Avaya media server,

More information

CHAPTER 3 DIGITAL CODING OF SIGNALS

CHAPTER 3 DIGITAL CODING OF SIGNALS CHAPTER 3 DIGITAL CODING OF SIGNALS Computers are ofte used to automate the recordig of measuremets. The trasducers ad sigal coditioig circuits produce a voltage sigal that is proportioal to a quatity

More information

Digital Enterprise Unit. White Paper. Web Analytics Measurement for Responsive Websites

Digital Enterprise Unit. White Paper. Web Analytics Measurement for Responsive Websites Digital Eterprise Uit White Paper Web Aalytics Measuremet for Resposive Websites About the Authors Vishal Machewad Vishal Machewad has over 13 years of experiece i sales ad marketig, havig worked as a

More information

Neolane Leads. Neolane v6.1

Neolane Leads. Neolane v6.1 Neolae Leads Neolae v6.1 This documet, ad the software it describes, are provided subject to a Licese Agreemet ad may ot be used or copied outside of the provisios of the Licese Agreemet. No part of this

More information

L5352 Ethernet Communications Interface

L5352 Ethernet Communications Interface L5352 Etheret Commuicatios Iterface Techical Maual HA470898 Issue 2 Copyright SSD Drives Ic 2005 All rights strictly reserved. No part of this documet may be stored i a retrieval system, or trasmitted

More information

Rainbow options. A rainbow is an option on a basket that pays in its most common form, a nonequally

Rainbow options. A rainbow is an option on a basket that pays in its most common form, a nonequally Raibow optios INRODUCION A raibow is a optio o a basket that pays i its most commo form, a oequally weighted average of the assets of the basket accordig to their performace. he umber of assets is called

More information

Professional Networking

Professional Networking Professioal Networkig 1. Lear from people who ve bee where you are. Oe of your best resources for etworkig is alumi from your school. They ve take the classes you have take, they have bee o the job market

More information

Ethernet Option Board

Ethernet Option Board Etheret Optio Board Assembly ad Iitializatio Guide for Addig Etheret Commuicatios to a ADP etime Timeclock Documet Part Number: 470552-00 Documet Revisio: B The iformatio i this documet is subject to chage

More information

Wells Fargo Insurance Services Claim Consulting Capabilities

Wells Fargo Insurance Services Claim Consulting Capabilities Wells Fargo Isurace Services Claim Cosultig Capabilities Claim Cosultig Claims are a uwelcome part of America busiess. I a recet survey coducted by Fulbright & Jaworski L.L.P., large U.S. compaies face

More information

iprox sensors iprox inductive sensors iprox programming tools ProxView programming software iprox the world s most versatile proximity sensor

iprox sensors iprox inductive sensors iprox programming tools ProxView programming software iprox the world s most versatile proximity sensor iprox sesors iprox iductive sesors iprox programmig tools ProxView programmig software iprox the world s most versatile proximity sesor The world s most versatile proximity sesor Eato s iproxe is syoymous

More information

Modified Line Search Method for Global Optimization

Modified Line Search Method for Global Optimization Modified Lie Search Method for Global Optimizatio Cria Grosa ad Ajith Abraham Ceter of Excellece for Quatifiable Quality of Service Norwegia Uiversity of Sciece ad Techology Trodheim, Norway {cria, ajith}@q2s.tu.o

More information

PENSION ANNUITY. Policy Conditions Document reference: PPAS1(7) This is an important document. Please keep it in a safe place.

PENSION ANNUITY. Policy Conditions Document reference: PPAS1(7) This is an important document. Please keep it in a safe place. PENSION ANNUITY Policy Coditios Documet referece: PPAS1(7) This is a importat documet. Please keep it i a safe place. Pesio Auity Policy Coditios Welcome to LV=, ad thak you for choosig our Pesio Auity.

More information

CCH CRM Books Online Software Fee Protection Consultancy Advice Lines CPD Books Online Software Fee Protection Consultancy Advice Lines CPD

CCH CRM Books Online Software Fee Protection Consultancy Advice Lines CPD Books Online Software Fee Protection Consultancy Advice Lines CPD Books Olie Software Fee Fee Protectio Cosultacy Advice Advice Lies Lies CPD CPD facig today s challeges As a accoutacy practice, maagig relatioships with our cliets has to be at the heart of everythig

More information

A guide to School Employees' Well-Being

A guide to School Employees' Well-Being A guide to School Employees' Well-Beig Backgroud The public school systems i the Uited States employ more tha 6.7 millio people. This large workforce is charged with oe of the atio s critical tasks to

More information

PUBLIC RELATIONS PROJECT 2016

PUBLIC RELATIONS PROJECT 2016 PUBLIC RELATIONS PROJECT 2016 The purpose of the Public Relatios Project is to provide a opportuity for the chapter members to demostrate the kowledge ad skills eeded i plaig, orgaizig, implemetig ad evaluatig

More information

How To Write A Privacy Policy For A Busiess

How To Write A Privacy Policy For A Busiess Office of the Privacy Commissioer of Caada PIPEDA Privacy Guide for Small Busiesses: The Basics Privacy is the best policy Hadlig privacy cocers correctly ca help improve your orgaizatio s reputatio. Whe

More information

A GUIDE TO BUILDING SMART BUSINESS CREDIT

A GUIDE TO BUILDING SMART BUSINESS CREDIT A GUIDE TO BUILDING SMART BUSINESS CREDIT Establishig busiess credit ca be the key to growig your compay DID YOU KNOW? Busiess Credit ca help grow your busiess Soud paymet practices are key to a solid

More information

Agenda. Outsourcing and Globalization in Software Development. Outsourcing. Outsourcing here to stay. Outsourcing Alternatives

Agenda. Outsourcing and Globalization in Software Development. Outsourcing. Outsourcing here to stay. Outsourcing Alternatives Outsourcig ad Globalizatio i Software Developmet Jacques Crocker UW CSE Alumi 2003 jc@cs.washigto.edu Ageda Itroductio The Outsourcig Pheomeo Leadig Offshore Projects Maagig Customers Offshore Developmet

More information

Amendments to employer debt Regulations

Amendments to employer debt Regulations March 2008 Pesios Legal Alert Amedmets to employer debt Regulatios The Govermet has at last issued Regulatios which will amed the law as to employer debts uder s75 Pesios Act 1995. The amedig Regulatios

More information

Supply Chain Manager User s Manual

Supply Chain Manager User s Manual Supply Chai Maager User s Maual FEBRUARY 2006 This publicatio was produced for review by the U.S. Agecy for Iteratioal Developmet. It was prepared by the USAID DELIVER PROJECT, Task Order 1. SUPPLY CHAIN

More information

Trusteed IRAs. Integrate and simplify your retirement and estate plans

Trusteed IRAs. Integrate and simplify your retirement and estate plans Trusteed IRAs Itegrate ad simplify your retiremet ad estate plas Trusteed IRAs from Merrill Lych Trust Compay To create the legacy of your dreams, you may eed more tha a Idividual Retiremet Accout ad a

More information

HP Asset Manager. Software version: 5.20. Service Asset and Configuration Management

HP Asset Manager. Software version: 5.20. Service Asset and Configuration Management HP Asset Maager Software versio: 5.20 Service Asset ad Cofiguratio Maagemet Documet Release Date: 01 October 2009 Software Release Date: October 2009 Legal Notices Copyright Notices Copyright 1994-2009

More information

IntelliSOURCE Comverge s enterprise software platform provides the foundation for deploying integrated demand management programs.

IntelliSOURCE Comverge s enterprise software platform provides the foundation for deploying integrated demand management programs. ItelliSOURCE Comverge s eterprise software platform provides the foudatio for deployig itegrated demad maagemet programs. ItelliSOURCE Demad maagemet programs such as demad respose, eergy efficiecy, ad

More information

Confidence Intervals for One Mean

Confidence Intervals for One Mean Chapter 420 Cofidece Itervals for Oe Mea Itroductio This routie calculates the sample size ecessary to achieve a specified distace from the mea to the cofidece limit(s) at a stated cofidece level for a

More information

Shared Memory with Caching

Shared Memory with Caching Vorlesug Recherarchitektur 2 Seite 164 Cachig i MIMD-Architectures ] MIMD-Architekture Programmiermodell Behadlug der Kommuikatioslatez Nachrichteorietiert globaler Adressraum Latez miimiere Latez verstecke

More information

Hypergeometric Distributions

Hypergeometric Distributions 7.4 Hypergeometric Distributios Whe choosig the startig lie-up for a game, a coach obviously has to choose a differet player for each positio. Similarly, whe a uio elects delegates for a covetio or you

More information

AMS Suite: Asset Graphics

AMS Suite: Asset Graphics Product Data Sheet Jauary 2012 AMS Suite: Asset Graphics Powerful graphical display developmet tool Deployable as a local graphical display dedicated to a CSI 6500 Machiery Health Moitor Scalable to provide

More information

5 Boolean Decision Trees (February 11)

5 Boolean Decision Trees (February 11) 5 Boolea Decisio Trees (February 11) 5.1 Graph Coectivity Suppose we are give a udirected graph G, represeted as a boolea adjacecy matrix = (a ij ), where a ij = 1 if ad oly if vertices i ad j are coected

More information

Caché SQL Version F.12 Release Information

Caché SQL Version F.12 Release Information Caché SQL Versio F.12 Release Iformatio Versio: Caché SQL F.12 Date: October 22, 1997 Part Number IS-SQL-0-F.12A-CP-R Caché SQL F.12 Release Iformatio Copyright IterSystems Corporatio 1997 All rights reserved

More information

Comparing Credit Card Finance Charges

Comparing Credit Card Finance Charges Comparig Credit Card Fiace Charges Comparig Credit Card Fiace Charges Decidig if a particular credit card is right for you ivolves uderstadig what it costs ad what it offers you i retur. To determie how

More information

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT Keywords: project maagemet, resource allocatio, etwork plaig Vladimir N Burkov, Dmitri A Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT The paper deals with the problems of resource allocatio betwee

More information

RELEASE GUIDE. VirusScan Enterprise VERSION 7.0

RELEASE GUIDE. VirusScan Enterprise VERSION 7.0 RELEASE GUIDE VirusSca Eterprise VERSION 7.0 COPYRIGHT 2003 Networks Associates Techology, Ic. All Rights Reserved. No part of this publicatio may be reproduced, trasmitted, trascribed, stored i a retrieval

More information

Output Analysis (2, Chapters 10 &11 Law)

Output Analysis (2, Chapters 10 &11 Law) B. Maddah ENMG 6 Simulatio 05/0/07 Output Aalysis (, Chapters 10 &11 Law) Comparig alterative system cofiguratio Sice the output of a simulatio is radom, the comparig differet systems via simulatio should

More information