SlideShare a Scribd company logo
1 of 24
Configuring SQL Server Instances 
Ram Kedem
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
SQL Server Instances 
•SQL Server instances are separate deploymentsof Database Engine, Analysis Services, and Reporting Services hosted on the same computer. 
•Each instance may have one Database Engine, one Analysis Services, and one Reporting Services service installed. 
•Each instance has its own program files, directory, and security configuration. 
•A user who can create and drop databases in one instance might not have rights to change databases on another instance. 
•Multiple instances on the same host enable you to deploy SQL Server multiple timeswithout requiring extra operating system deployments. SQL Server 2012 enables you to deployup to 50 Database Engine instances on a single host server
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Instance-Level Settings 
•When talking about SQL Server settings, you are talking about settings for an instance, not settings that apply to every instance of SQL Server on a host computer. 
•When you configure settings in the Server Properties dialog box, those settings apply only to the instance you are configuring, not to other instances of the Database Engine installed on the same host computer 
•You can configure instance-level settings byright-clicking a specific instance within SQL Server Management Studio and then choosing Properties
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Memory Allocation
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Memory Allocation 
•By default, a SQL Server 2012 instance uses memory dynamically. 
•An instance does not use this amount of memory at startup, but when client load reaches this amount. 
•The min server memory value 
•Ensuresthat the instance has a minimum memory allocation. 
•An instance does not use this amount of memory at startup, but when client load reaches this amount. 
•SQL Server 2012 will not release memory back to the operating systemif it means going below this value. 
•When SQL Server 2012 is run on a 32-bit operating system, the lowest minimum memory value you can allocate is 64 MB. 
•If SQL Server 2012 is run on a 64-bit operating system, thelowest minimum memory value you can allocate is 128 MB.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Memory Allocation 
•The default setting for minimum server memory is 0 
•The default maximum server memory is 2,147,483,647 MB. (approximately 2050 TB) 
•A setting of 0 meansthat the minimum server memory value is not set.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Using sys.sp_configure 
---------------------------------------------------- 
--sys.sp_configure 
---------------------------------------------------- 
--Default 'show advanced options' is 0, if it's not 0 from any reason, you can change it 
--to 0 using the following command. 
EXECsys.sp_configure'show advanced options',0; 
GO 
RECONFIGURE; 
EXECsys.sp_configure 
--Change the value to 1 for more information 
EXECsys.sp_configure'show advanced options',1; 
GO 
RECONFIGURE;
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Using sys.sp_configure 
EXECsys.sp_configure 
EXECsys.sp_configure'min server memory' 
GO 
EXECsys.sp_configure'max server memory' 
GO 
EXECsys.sp_configure'min server memory',600; 
GO 
EXECsys.sp_configure'max server memory',4096; 
GO 
RECONFIGURE; 
GO 
EXECsys.sp_configure'min server memory' 
GO 
EXECsys.sp_configure'max server memory' 
GO
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Memory management for more than one instance guidelines 
•For maximum server memory 
•Use maximum server memory to limitthe amount of memory each instance uses. 
•Allocate memory based on expected instance usage. Ensure that the total allocated memory does not exceed the total physical memory of the host system. 
•For minimum server memory 
•Ensure that the total minimum memory sumis 1 or 2 GB less than the total physical memory of the host system. 
•This strategy has the advantageof allowing instances to use more than a fixed allocation when possible.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Processor and I/O Affinity
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Processor and I/O Affinity 
•Affinitysupport for servers with 33 to 64 processors is only available on 64-bit operating systems 
•Note : This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. 
•Processor affinity assignsspecific server processors to specific threads. 
•The default setting for each instanceis to configure processor affinity mask and I/O affinity mask automatically for all processors on the host server.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Processor and I/O Affinity 
•--Set affinity mask to be configured automatically 
• 
•EXECSYS.SP_CONFIGURE'affinity mask',0 
•GO 
•RECONFIGURE 
•GO 
•EXECSYS.SP_CONFIGURE'affinity mask' 
• 
• 
•--Set affinity mask to assigned the first cpufor the DB threads 
• 
•EXECSYS.SP_CONFIGURE'affinity mask',1 
•GO 
•RECONFIGURE 
•GO 
•EXECSYS.SP_CONFIGURE'affinity mask' 
• 
•--Set affinity mask to assigned the first cpufor the DB threads 
• 
•EXECSYS.SP_CONFIGURE'affinity mask',1 
•GO 
•RECONFIGURE 
•GO 
•EXECSYS.SP_CONFIGURE'affinity mask' 
• 
•--Set affinity mask to assigned the second cpufor the DB threads 
• 
•EXECSYS.SP_CONFIGURE'affinity mask',2 
•GO 
•RECONFIGURE 
•GO 
•EXECSYS.SP_CONFIGURE'affinity mask'
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Configure the priority boost Server Configuration Option 
•Use the priority boost option to specify whether MicrosoftSQL Server should run at a higher Microsoft Windows2008 or Windows2008 R2 scheduling priority than other processes on the same computer. 
•Note: This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
lightweight pooling Server Configuration 
•Use the lightweight poolingoption to provide a means of reducing the system overhead associated with the excessive context switching. 
•When excessive context switching is present, lightweight pooling can provide better throughput by performing the context switching inline, thus helping to reduce user/kernel ring transitions.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Configuring Fill Factor
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Configuring Fill Factor 
•Fill factoris the value that determines the percentage of space on each leaf-level page to be filled with data. 
•In an SQL Server, the smallest unit is a page, which is made of Page with size 8K. Every page can store one or more rows based on the size of the row. 
•The default value of the Fill Factor is 100, which is same as value 0. The 
•default Fill Factor (100 or 0) will allow the SQL Server to fill the leaf-level pages of an index with the maximum numbers of the rows it can fit. There will be no or very little empty space left in the page, when the fill factor is 100. 
•You must stop and restart the SQL Server servicefor the change to take effect. The new fill factor will be in effect when you see it in the run-value column.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
The model database 
•The model database serves as the template for all new databases that you create on an instance of SQL Server 2012. 
•This includes the tempdbdatabase, which the instance creates each time it starts. 
•Creating a new database involves making a complete copy of the contents 
•of the model database, including all database options such as recovery model, Auto Close, and Auto Shrink. 
•Any modifications you make to the model database will apply to databases you create in the future.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Installing Additional Instances 
•SQL Server 2012 supports up to 50 instances of the Database Engine on a single host computer 
•Instances are functionally separate deployments of SQL Server 2012 features on the same host computer and have separate program files and data directories. 
•A user or group assigned the SQL Server Administrator role for one instance might not have the role on any other instance even though the same server hosts those other instances.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Installing Additional Instances 
•You can deploy the following features individually or together as separate instances in SQL Server 2012: 
•Database Engine Services 
•SQL Server Replication 
•Full-Text and Semantic Extractions for Search 
•Data Quality Services 
•Analysis Services 
•Reporting Services –Native
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Instance Names 
•Instance names have the following properties and limitations: 
•They are not case sensitive. 
•If you specify MSSQLServeras the instance name, the installation routine installs the default instance. If a default instance already exists on the host, the installer presents you with an error. 
•You can’t use the name DEFAULT or any other reserved keywords such as ADD, ALL, EXECUTE, ALTER, PRIMARY, or RECONFIGURE 
•Instance names can be a maximum of 16 characters. 
•The first character in an instance name must be a letter. 
•You cannot use the backslash (), comma (,), colon (:), semicolon (;), single quote ('),ampersand (&), embedded space, or at sign (@) in an instance name.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Deploying Software Updates 
•Software update deployment and patch management on a computer on which you have deployed a single instance of SQL Server 2012 is straightforward: 
•You can configure Windows Update to retrieve updates for SQL Server 2012 either from Microsoft Update or from your organization’s local Windows Server Update Services (WSUS) server. 
•Or you can download and deploy the updates manually.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Deploying Software Updates 
•You must update all features associated with a SQL Server 2012 instance at the sametime. For example, if you have deployed Analysis Services with the Database Engine in an instance, you must update both. 
•Remember that each instance on a server has its own separate program files. This means that if you have multiple instances of SQL Server 2012 deployed on the same host server, you must use care when applying updates and service packs. You will need to choose whether to update all instances or only specific instances
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Resource Governor 
•Resource Governor is a SQL Server 2012 feature that enables you to place limits on the consumption of CPU and memory resources within a SQL Server 2012 Database Engine instance. 
•Resource Governor has the following limitations: 
•You can use it with the SQL Server Database Engine only. You cannot use Resource Governor to manage system resources for Analysis Services, Integration Services, or Reporting Services. 
•You cannot use Resource Governor to perform workload monitoring or workload management between SQL Server Database Engine instances. 
•Resource Governor applies only to CPU bandwidth and memory managed by the SQL Server 2012 Database Engine. 
•Online transaction processing (OLTP) queries are often short and do not use the CPU long enough for Resource Governor constraints to apply.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Cycle SQL Server Error Logs 
•The SQL Server error log stores information about processes that have completed successfully such as backup operations, batch commands, and scripts. 
•It also stores system information messages indicating issues or failures. 
•Each time the Database Engine instance is started, the current error log cycles and is renamed errorlog.1. The file named errorlog.1 becomes errorlog. 
•2, errorlog.2 becomes errorlog.3, and so on until errorlog.6. 
•SQL Server 2012 default settings retain the current error log and the five most recent error logs. 
•To modify the number of error logs stored, use SQL Server Management Studio and right-click the right-click the Management SQL Server Logs node, select Limit The Number Of Error Logs Before They Are Cycled.

More Related Content

What's hot

SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorldSQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
Polish SQL Server User Group
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
Michael Noel
 
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Principled Technologies
 

What's hot (20)

MSSQL Server - Automation
MSSQL Server - AutomationMSSQL Server - Automation
MSSQL Server - Automation
 
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
 
3. v sphere big data extensions
3. v sphere big data extensions3. v sphere big data extensions
3. v sphere big data extensions
 
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorldSQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
 
Presentation implementing oracle asm successfully
Presentation    implementing oracle asm successfullyPresentation    implementing oracle asm successfully
Presentation implementing oracle asm successfully
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
 
PostgreSQL on Amazon RDS
PostgreSQL on Amazon RDSPostgreSQL on Amazon RDS
PostgreSQL on Amazon RDS
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017
 
SQL Server High Availability and Disaster Recovery
SQL Server High Availability and Disaster RecoverySQL Server High Availability and Disaster Recovery
SQL Server High Availability and Disaster Recovery
 
VMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing DatabasesVMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing Databases
 
My experience with embedding PostgreSQL
 My experience with embedding PostgreSQL My experience with embedding PostgreSQL
My experience with embedding PostgreSQL
 
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
 
Oracle Virtualization Best Practices
Oracle Virtualization Best PracticesOracle Virtualization Best Practices
Oracle Virtualization Best Practices
 
VMworld Europe 2014: Virtual SAN Best Practices and Use Cases
VMworld Europe 2014: Virtual SAN Best Practices and Use CasesVMworld Europe 2014: Virtual SAN Best Practices and Use Cases
VMworld Europe 2014: Virtual SAN Best Practices and Use Cases
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs
 
Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)
 
Five common customer use cases for Virtual SAN - VMworld US / 2015
Five common customer use cases for Virtual SAN - VMworld US / 2015Five common customer use cases for Virtual SAN - VMworld US / 2015
Five common customer use cases for Virtual SAN - VMworld US / 2015
 
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
 
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 EditionSQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
 

Similar to Lesson 1 configuring

Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
pittmantony
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - Varrow
Andrew Miller
 

Similar to Lesson 1 configuring (20)

Managing and Configuring Databases
Managing and Configuring DatabasesManaging and Configuring Databases
Managing and Configuring Databases
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
SQL Server on AWS
SQL Server on AWSSQL Server on AWS
SQL Server on AWS
 
Oracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SFOracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SF
 
Oracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San FranciscoOracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San Francisco
 
A to z for sql azure databases
A to z for sql azure databasesA to z for sql azure databases
A to z for sql azure databases
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
 
Oracle and SQL Server on the Cloud
Oracle and SQL Server on the CloudOracle and SQL Server on the Cloud
Oracle and SQL Server on the Cloud
 
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth EagarRelational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
 
Performance Demystified for SQL Server on Azure Virtual Machines
Performance Demystified for SQL Server on Azure Virtual MachinesPerformance Demystified for SQL Server on Azure Virtual Machines
Performance Demystified for SQL Server on Azure Virtual Machines
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
 
Oracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill BaldwinOracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill Baldwin
 
Moving Windows Applications to the Cloud
Moving Windows Applications to the CloudMoving Windows Applications to the Cloud
Moving Windows Applications to the Cloud
 
Eyeball XMPP Server Administrator Guide
Eyeball XMPP Server Administrator GuideEyeball XMPP Server Administrator Guide
Eyeball XMPP Server Administrator Guide
 
Lesson 5 security
Lesson 5   securityLesson 5   security
Lesson 5 security
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - Varrow
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018 Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
 

More from Ram Kedem

More from Ram Kedem (20)

Impala use case @ edge
Impala use case @ edgeImpala use case @ edge
Impala use case @ edge
 
Advanced SQL Webinar
Advanced SQL WebinarAdvanced SQL Webinar
Advanced SQL Webinar
 
Managing oracle Database Instance
Managing oracle Database InstanceManaging oracle Database Instance
Managing oracle Database Instance
 
Power Pivot and Power View
Power Pivot and Power ViewPower Pivot and Power View
Power Pivot and Power View
 
Data Mining in SSAS
Data Mining in SSASData Mining in SSAS
Data Mining in SSAS
 
Data mining In SSAS
Data mining In SSASData mining In SSAS
Data mining In SSAS
 
SQL Injections - Oracle
SQL Injections - OracleSQL Injections - Oracle
SQL Injections - Oracle
 
SSAS Attributes
SSAS AttributesSSAS Attributes
SSAS Attributes
 
SSRS Matrix
SSRS MatrixSSRS Matrix
SSRS Matrix
 
DDL Practice (Hebrew)
DDL Practice (Hebrew)DDL Practice (Hebrew)
DDL Practice (Hebrew)
 
DML Practice (Hebrew)
DML Practice (Hebrew)DML Practice (Hebrew)
DML Practice (Hebrew)
 
Exploring Oracle Database Architecture (Hebrew)
Exploring Oracle Database Architecture (Hebrew)Exploring Oracle Database Architecture (Hebrew)
Exploring Oracle Database Architecture (Hebrew)
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Introduction to Databases
Introduction to DatabasesIntroduction to Databases
Introduction to Databases
 
Deploy SSRS Project - SQL Server 2014
Deploy SSRS Project - SQL Server 2014Deploy SSRS Project - SQL Server 2014
Deploy SSRS Project - SQL Server 2014
 
Pig - Processing XML data
Pig - Processing XML dataPig - Processing XML data
Pig - Processing XML data
 
SSAS Cubes & Hierarchies
SSAS Cubes & HierarchiesSSAS Cubes & Hierarchies
SSAS Cubes & Hierarchies
 
SSRS Basic Parameters
SSRS Basic ParametersSSRS Basic Parameters
SSRS Basic Parameters
 
SSRS Gauges
SSRS GaugesSSRS Gauges
SSRS Gauges
 
SSRS Conditional Formatting
SSRS Conditional FormattingSSRS Conditional Formatting
SSRS Conditional Formatting
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

Lesson 1 configuring

  • 1. Configuring SQL Server Instances Ram Kedem
  • 2. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent SQL Server Instances •SQL Server instances are separate deploymentsof Database Engine, Analysis Services, and Reporting Services hosted on the same computer. •Each instance may have one Database Engine, one Analysis Services, and one Reporting Services service installed. •Each instance has its own program files, directory, and security configuration. •A user who can create and drop databases in one instance might not have rights to change databases on another instance. •Multiple instances on the same host enable you to deploy SQL Server multiple timeswithout requiring extra operating system deployments. SQL Server 2012 enables you to deployup to 50 Database Engine instances on a single host server
  • 3. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Instance-Level Settings •When talking about SQL Server settings, you are talking about settings for an instance, not settings that apply to every instance of SQL Server on a host computer. •When you configure settings in the Server Properties dialog box, those settings apply only to the instance you are configuring, not to other instances of the Database Engine installed on the same host computer •You can configure instance-level settings byright-clicking a specific instance within SQL Server Management Studio and then choosing Properties
  • 4. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Memory Allocation
  • 5. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Memory Allocation •By default, a SQL Server 2012 instance uses memory dynamically. •An instance does not use this amount of memory at startup, but when client load reaches this amount. •The min server memory value •Ensuresthat the instance has a minimum memory allocation. •An instance does not use this amount of memory at startup, but when client load reaches this amount. •SQL Server 2012 will not release memory back to the operating systemif it means going below this value. •When SQL Server 2012 is run on a 32-bit operating system, the lowest minimum memory value you can allocate is 64 MB. •If SQL Server 2012 is run on a 64-bit operating system, thelowest minimum memory value you can allocate is 128 MB.
  • 6. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Memory Allocation •The default setting for minimum server memory is 0 •The default maximum server memory is 2,147,483,647 MB. (approximately 2050 TB) •A setting of 0 meansthat the minimum server memory value is not set.
  • 7. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Using sys.sp_configure ---------------------------------------------------- --sys.sp_configure ---------------------------------------------------- --Default 'show advanced options' is 0, if it's not 0 from any reason, you can change it --to 0 using the following command. EXECsys.sp_configure'show advanced options',0; GO RECONFIGURE; EXECsys.sp_configure --Change the value to 1 for more information EXECsys.sp_configure'show advanced options',1; GO RECONFIGURE;
  • 8. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Using sys.sp_configure EXECsys.sp_configure EXECsys.sp_configure'min server memory' GO EXECsys.sp_configure'max server memory' GO EXECsys.sp_configure'min server memory',600; GO EXECsys.sp_configure'max server memory',4096; GO RECONFIGURE; GO EXECsys.sp_configure'min server memory' GO EXECsys.sp_configure'max server memory' GO
  • 9. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Memory management for more than one instance guidelines •For maximum server memory •Use maximum server memory to limitthe amount of memory each instance uses. •Allocate memory based on expected instance usage. Ensure that the total allocated memory does not exceed the total physical memory of the host system. •For minimum server memory •Ensure that the total minimum memory sumis 1 or 2 GB less than the total physical memory of the host system. •This strategy has the advantageof allowing instances to use more than a fixed allocation when possible.
  • 10. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Processor and I/O Affinity
  • 11. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Processor and I/O Affinity •Affinitysupport for servers with 33 to 64 processors is only available on 64-bit operating systems •Note : This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. •Processor affinity assignsspecific server processors to specific threads. •The default setting for each instanceis to configure processor affinity mask and I/O affinity mask automatically for all processors on the host server.
  • 12. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Processor and I/O Affinity •--Set affinity mask to be configured automatically • •EXECSYS.SP_CONFIGURE'affinity mask',0 •GO •RECONFIGURE •GO •EXECSYS.SP_CONFIGURE'affinity mask' • • •--Set affinity mask to assigned the first cpufor the DB threads • •EXECSYS.SP_CONFIGURE'affinity mask',1 •GO •RECONFIGURE •GO •EXECSYS.SP_CONFIGURE'affinity mask' • •--Set affinity mask to assigned the first cpufor the DB threads • •EXECSYS.SP_CONFIGURE'affinity mask',1 •GO •RECONFIGURE •GO •EXECSYS.SP_CONFIGURE'affinity mask' • •--Set affinity mask to assigned the second cpufor the DB threads • •EXECSYS.SP_CONFIGURE'affinity mask',2 •GO •RECONFIGURE •GO •EXECSYS.SP_CONFIGURE'affinity mask'
  • 13. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Configure the priority boost Server Configuration Option •Use the priority boost option to specify whether MicrosoftSQL Server should run at a higher Microsoft Windows2008 or Windows2008 R2 scheduling priority than other processes on the same computer. •Note: This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.
  • 14. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent lightweight pooling Server Configuration •Use the lightweight poolingoption to provide a means of reducing the system overhead associated with the excessive context switching. •When excessive context switching is present, lightweight pooling can provide better throughput by performing the context switching inline, thus helping to reduce user/kernel ring transitions.
  • 15. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Configuring Fill Factor
  • 16. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Configuring Fill Factor •Fill factoris the value that determines the percentage of space on each leaf-level page to be filled with data. •In an SQL Server, the smallest unit is a page, which is made of Page with size 8K. Every page can store one or more rows based on the size of the row. •The default value of the Fill Factor is 100, which is same as value 0. The •default Fill Factor (100 or 0) will allow the SQL Server to fill the leaf-level pages of an index with the maximum numbers of the rows it can fit. There will be no or very little empty space left in the page, when the fill factor is 100. •You must stop and restart the SQL Server servicefor the change to take effect. The new fill factor will be in effect when you see it in the run-value column.
  • 17. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent The model database •The model database serves as the template for all new databases that you create on an instance of SQL Server 2012. •This includes the tempdbdatabase, which the instance creates each time it starts. •Creating a new database involves making a complete copy of the contents •of the model database, including all database options such as recovery model, Auto Close, and Auto Shrink. •Any modifications you make to the model database will apply to databases you create in the future.
  • 18. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Installing Additional Instances •SQL Server 2012 supports up to 50 instances of the Database Engine on a single host computer •Instances are functionally separate deployments of SQL Server 2012 features on the same host computer and have separate program files and data directories. •A user or group assigned the SQL Server Administrator role for one instance might not have the role on any other instance even though the same server hosts those other instances.
  • 19. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Installing Additional Instances •You can deploy the following features individually or together as separate instances in SQL Server 2012: •Database Engine Services •SQL Server Replication •Full-Text and Semantic Extractions for Search •Data Quality Services •Analysis Services •Reporting Services –Native
  • 20. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Instance Names •Instance names have the following properties and limitations: •They are not case sensitive. •If you specify MSSQLServeras the instance name, the installation routine installs the default instance. If a default instance already exists on the host, the installer presents you with an error. •You can’t use the name DEFAULT or any other reserved keywords such as ADD, ALL, EXECUTE, ALTER, PRIMARY, or RECONFIGURE •Instance names can be a maximum of 16 characters. •The first character in an instance name must be a letter. •You cannot use the backslash (), comma (,), colon (:), semicolon (;), single quote ('),ampersand (&), embedded space, or at sign (@) in an instance name.
  • 21. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Deploying Software Updates •Software update deployment and patch management on a computer on which you have deployed a single instance of SQL Server 2012 is straightforward: •You can configure Windows Update to retrieve updates for SQL Server 2012 either from Microsoft Update or from your organization’s local Windows Server Update Services (WSUS) server. •Or you can download and deploy the updates manually.
  • 22. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Deploying Software Updates •You must update all features associated with a SQL Server 2012 instance at the sametime. For example, if you have deployed Analysis Services with the Database Engine in an instance, you must update both. •Remember that each instance on a server has its own separate program files. This means that if you have multiple instances of SQL Server 2012 deployed on the same host server, you must use care when applying updates and service packs. You will need to choose whether to update all instances or only specific instances
  • 23. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Resource Governor •Resource Governor is a SQL Server 2012 feature that enables you to place limits on the consumption of CPU and memory resources within a SQL Server 2012 Database Engine instance. •Resource Governor has the following limitations: •You can use it with the SQL Server Database Engine only. You cannot use Resource Governor to manage system resources for Analysis Services, Integration Services, or Reporting Services. •You cannot use Resource Governor to perform workload monitoring or workload management between SQL Server Database Engine instances. •Resource Governor applies only to CPU bandwidth and memory managed by the SQL Server 2012 Database Engine. •Online transaction processing (OLTP) queries are often short and do not use the CPU long enough for Resource Governor constraints to apply.
  • 24. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Cycle SQL Server Error Logs •The SQL Server error log stores information about processes that have completed successfully such as backup operations, batch commands, and scripts. •It also stores system information messages indicating issues or failures. •Each time the Database Engine instance is started, the current error log cycles and is renamed errorlog.1. The file named errorlog.1 becomes errorlog. •2, errorlog.2 becomes errorlog.3, and so on until errorlog.6. •SQL Server 2012 default settings retain the current error log and the five most recent error logs. •To modify the number of error logs stored, use SQL Server Management Studio and right-click the right-click the Management SQL Server Logs node, select Limit The Number Of Error Logs Before They Are Cycled.