SlideShare a Scribd company logo
1 of 22
Managing and Configuring Databases 
Ram Kedem
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
SQL Server Data Files 
•The primary data file(mandatory) 
•is the starting point of the database and points to the other files in the database. 
•Every database has one primary data file. 
•The recommended file name extension for primary data files is .mdf
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
SQL Server Data Files 
•Secondary data files(Optional) 
•Secondary data files comprise all of the data files other than the primary data file. Some databases may not have any secondary data files, while others have multiple secondary data files. 
•The recommended file name extension for secondary data files is .ndf
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
SQL Server Data Files 
•Log files(mandatory) 
•Log files hold all of the log information used to recover the database. 
•There must be at least one log file for each database 
•The recommended file name extension for log files is .ldf
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Database Structure
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Extents 
•SQL Server has two classes of extents: uniformand mixed. 
•Uniform Extentsare dedicated to a single object. Normally SQL Server allocates multiple uniform extents for each data table. 
•Mixed Extent- 
•However, if a table is small, SQL Server won't allocate an entire extent for it. Instead it will allocate data pages from a mixed extent, which can be thought of as a pool of pages for small tables. 
•Each mixed extent can be shared by multiple tables. 
•Since each extent has eight data pages, up-to eight objects can share data pages from a single mixed extent. 
•When you first create a table SQL Server starts by allocating a data page to it from a mixed extent.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Extents 
(Mixed Extents continued) 
•Once the table has enough data to warrant a full extent, SQL Server will allocate a uniform extent to it. 
•Similarly if you build an index on a table that has at least eight pages SQL Server will dedicate a uniform extent for storing the index data.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Pages 
•In SQL Server, the page size is 8 KB. 
•This means SQL Server databases have 128 pages per megabyte. 
•Each page begins with a 96-byte header that is used to store system information about the page. 
•This information includes the page number, page type, the amount of free space on the page, and the allocation unit ID of the object that owns the page.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Creating User Databases 
•1. Auto Options (such as auto statistics) 
•2. Page Verify 
•CHECKSUM. This option advises SQL Server to calculate a checksum over the contents of each data / index page when it is written to disk. This value is stored in the page header. When the page is read from the disk, checksum is computed again and compared to the value in page header 
• 
•TORN_PAGE_DETECTION 
•Saves a specific bit for each 512-byte sector in the 8-kilobyte (KB) database page and stored in the database page header when the page is written to disk. When the page is read from disk, the torn bits stored in the page header are compared to the actual page sector information. Unmatched values indicate that only part of the page was written to disk. In this situation, error message 824 (indicating a torn page error) is reported to both the SQL Server error log and the Windows event log. 
•3. Recovery Model 
•4. State Options
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Shrink Database
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Detach and Attach 
•UPDATE STATISTICS OPTION-updates statistics on table and index before detaching which might be a good option, if the database is attached in a read-only environment. But it is typically not a good choice if the database should just be moved to a new location. 
•DROP CONNECTIONS-closes all sessions connected to the same DB (when there is more than one session connected, this is the only option to detach a Database)
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Determining File Placement and Number of Files 
1. Isolate log and data files at the physical disk levelFor performance and safety reasons. 
•Performance -The access patterns of data and log files are very different as there is mainly sequential access to log filesand random disk access on data files (especially in OLTP). 
•Safety -Also in case of a storage failure there is a better chance to recover the database fully if only parts of the database files are corrupt.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Determining File Placement and Number of Files 
2. Use appropriate RAID levels 
RAID (originally redundant array of inexpensive disks; now commonly redundant array of independent disks) is a data storage virtualization technology that combines multiple disk drive components into a logical unit for the purposes of data redundancy or performance improvement
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Determining File Placement and Number of Files 
2.1 RAID 0 
•RAID 0 consists of striping, without mirroring. 
•Striping distributes the contents of files roughly equally among all disks in the set, which makes concurrent read or write operations on the multiple disks almost inevitable. 
•The concurrent operations make the throughput of most read and write operations equal to the throughput of one disk multiplied by the number of disks. Increased throughput is the big benefit of RAID 0 versus spanned volume
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Determining File Placement and Number of Files 
2.2 RAID 1 
•RAID 1 consists of mirroring, without parity or striping. 
•Data is written identically to two (or more) drives, thereby producing a "mirrored set". Thus, any read request can be serviced by any drive in the set. 
•Actual read throughput of most RAID 1 implementations is slower than the fastest drive. Write throughput is always slower because every drive must be updated, and the slowest drive limits the write performance.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Determining File Placement and Number of Files 
2.3. RAID 10 
•Combines RAID 1 and RAID 0 
•Also called “stripe of mirrors” 
•Minimum of 4 disks
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Determining File Placement and Number of Files 
2.4. RAID 5 
With RAID 5, data is striped for speed like a RAID 0, but a duplication or parity is built in to protect your data from a single drive failure. This results in fast performance comparable to a RAID 0, but with the added benefit of protection.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
Determining File Placement and Number of Files 
•Ensuring Sufficient File Capacity 
•It is important to estimate the maximum size of the database, indexes, transaction log and tempdb, through a predicted growth module. 
•Set the size to a reasonable size: 
•Leave enough space for new data, without the need to expand often 
•Monitordataand log file usage 
•Plan for manual expansion 
•Keep autogrowthenabledto allow for unexpected growth
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
System Databases Supplied with SQL Server 
•Master Database 
•Themasterdatabase records all the system-level information for a SQL Server system. This includes instance-wide metadata such as logon accounts, endpoints, linked servers, and system configuration settings. 
•masteris the database that records the existence of all other databases and the location of those database files and records the initialization information for SQL Server. 
•Therefore, SQL Server cannot start if themasterdatabase is unavailable.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
System Databases Supplied with SQL Server 
•TempdbDatabase 
•Thetempdbsystem database is a global resource that is available to all users connected to the instance of SQL Server and is used to hold the following: 
•Temporary user objects that are explicitly created, such as: global or local temporary tables, temporary stored procedures, table variables, or cursors. 
•Internal objects that are created by the SQL Server Database Engine.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
System Databases Supplied with SQL Server 
•Model Database 
•Themodeldatabase is used as the template for all databases created on an instance of SQL Server. 
•The entire contents of themodeldatabase, including database options, are copied to the new database. 
•Becausetempdbis created every time SQL Server is started, themodeldatabase must always exist on aSQL Server system. 
•Some of the settings ofmodelare also used for creating a newtempdbduring start up
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent 
System Databases Supplied with SQL Server 
•MSDB Database 
•Mainly Provides the capability us to save information about automation and backup & recovery 
•Themsdbdatabase is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker and Database Mail. 
•For example, SQL Server automatically maintains a complete online backup-and-restore history within tables inmsdb.

More Related Content

What's hot

Scaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL ServersScaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL Serversheraflux
 
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)Gary Jackson MBCS
 
VMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing DatabasesVMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing DatabasesVMworld
 
PostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use CasesPostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use CasesAshnikbiz
 
Dmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL ServerDmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL ServerZeba Ansari
 
SQL Server Database Migration
SQL Server Database MigrationSQL Server Database Migration
SQL Server Database MigrationZeba Ansari
 
505 kobal exadata
505 kobal exadata505 kobal exadata
505 kobal exadataKam Chan
 
Virtualization in Community Banks
Virtualization in Community BanksVirtualization in Community Banks
Virtualization in Community BanksScott Sharp
 
Always on in SQL Server 2012
Always on in SQL Server 2012Always on in SQL Server 2012
Always on in SQL Server 2012Fadi Abdulwahab
 
X-DB Replication Server and MMR
X-DB Replication Server and MMRX-DB Replication Server and MMR
X-DB Replication Server and MMRAshnikbiz
 
Implementing sql server always on
Implementing sql server always onImplementing sql server always on
Implementing sql server always onSarabpreet Anand
 
Deploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDeploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDenish Patel
 
Enterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesEnterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesAshnikbiz
 
Storage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, WhiptailStorage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, WhiptailInternet World
 
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...Continuent
 
NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5UniFabric
 
Database as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance PlatformDatabase as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance PlatformMaris Elsins
 
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree Ashnikbiz
 
MySQL Server Settings Tuning
MySQL Server Settings TuningMySQL Server Settings Tuning
MySQL Server Settings Tuningguest5ca94b
 

What's hot (20)

Scaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL ServersScaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL Servers
 
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
 
OEM_Case_Study_ABC
OEM_Case_Study_ABCOEM_Case_Study_ABC
OEM_Case_Study_ABC
 
VMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing DatabasesVMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing Databases
 
PostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use CasesPostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use Cases
 
Dmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL ServerDmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL Server
 
SQL Server Database Migration
SQL Server Database MigrationSQL Server Database Migration
SQL Server Database Migration
 
505 kobal exadata
505 kobal exadata505 kobal exadata
505 kobal exadata
 
Virtualization in Community Banks
Virtualization in Community BanksVirtualization in Community Banks
Virtualization in Community Banks
 
Always on in SQL Server 2012
Always on in SQL Server 2012Always on in SQL Server 2012
Always on in SQL Server 2012
 
X-DB Replication Server and MMR
X-DB Replication Server and MMRX-DB Replication Server and MMR
X-DB Replication Server and MMR
 
Implementing sql server always on
Implementing sql server always onImplementing sql server always on
Implementing sql server always on
 
Deploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDeploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQL
 
Enterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesEnterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional Databases
 
Storage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, WhiptailStorage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, Whiptail
 
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
 
NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5
 
Database as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance PlatformDatabase as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance Platform
 
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
 
MySQL Server Settings Tuning
MySQL Server Settings TuningMySQL Server Settings Tuning
MySQL Server Settings Tuning
 

Viewers also liked

An introduction to CityGRID: without text
An introduction to CityGRID: without textAn introduction to CityGRID: without text
An introduction to CityGRID: without textRollo Home
 
6A_SlideDesign-Plan of Salvation-MillerLaura
6A_SlideDesign-Plan of Salvation-MillerLaura6A_SlideDesign-Plan of Salvation-MillerLaura
6A_SlideDesign-Plan of Salvation-MillerLauraLaura Miller
 
Cancer article
Cancer articleCancer article
Cancer articleSteven Lim
 
Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...
Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...
Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...Crescando
 
Presentacion Tucumán Turistico
Presentacion Tucumán TuristicoPresentacion Tucumán Turistico
Presentacion Tucumán TuristicoRomina Soro
 
El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...
El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...
El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...FAO
 
Varför du ska använda UTM-taggar i din digitala marknadsföring
Varför du ska använda UTM-taggar i din digitala marknadsföringVarför du ska använda UTM-taggar i din digitala marknadsföring
Varför du ska använda UTM-taggar i din digitala marknadsföringContentbyrån
 
Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...
Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...
Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...Amazon Web Services
 
Apresentação dos Resultados do 3T16
Apresentação dos Resultados do 3T16Apresentação dos Resultados do 3T16
Apresentação dos Resultados do 3T16Celesc
 
Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recoveryacap paei
 

Viewers also liked (16)

An introduction to CityGRID: without text
An introduction to CityGRID: without textAn introduction to CityGRID: without text
An introduction to CityGRID: without text
 
Presentation valeria v.
Presentation valeria v.Presentation valeria v.
Presentation valeria v.
 
6A_SlideDesign-Plan of Salvation-MillerLaura
6A_SlideDesign-Plan of Salvation-MillerLaura6A_SlideDesign-Plan of Salvation-MillerLaura
6A_SlideDesign-Plan of Salvation-MillerLaura
 
Cancer article
Cancer articleCancer article
Cancer article
 
Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...
Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...
Frukostföreläsning: Sluta skjut från höften! Målinriktad Content Marketing B2...
 
Unite 8 carotte bâton
Unite 8 carotte bâtonUnite 8 carotte bâton
Unite 8 carotte bâton
 
Presentacion Tucumán Turistico
Presentacion Tucumán TuristicoPresentacion Tucumán Turistico
Presentacion Tucumán Turistico
 
Unite 9 finalite
Unite 9 finaliteUnite 9 finalite
Unite 9 finalite
 
Introduction to the Relational Model and SQL
Introduction to the Relational Model and SQLIntroduction to the Relational Model and SQL
Introduction to the Relational Model and SQL
 
arenanallavillkontrollera
arenanallavillkontrolleraarenanallavillkontrollera
arenanallavillkontrollera
 
El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...
El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...
El Salvador: Avances y retos en la ejecución del proyecto de escuelas sosteni...
 
Varför du ska använda UTM-taggar i din digitala marknadsföring
Varför du ska använda UTM-taggar i din digitala marknadsföringVarför du ska använda UTM-taggar i din digitala marknadsföring
Varför du ska använda UTM-taggar i din digitala marknadsföring
 
Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...
Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...
Drive Digital Media Innovation with AWS Cloud - Kingsley Wood, Amazon Web Ser...
 
Egypt ASBU B0
Egypt ASBU B0Egypt ASBU B0
Egypt ASBU B0
 
Apresentação dos Resultados do 3T16
Apresentação dos Resultados do 3T16Apresentação dos Resultados do 3T16
Apresentação dos Resultados do 3T16
 
Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recovery
 

Similar to Managing and Configuring Databases

Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red_Hat_Storage
 
Configuring Aerospike - Part 2
Configuring Aerospike - Part 2 Configuring Aerospike - Part 2
Configuring Aerospike - Part 2 Aerospike, Inc.
 
Database Administration & Management - 01
Database Administration & Management - 01Database Administration & Management - 01
Database Administration & Management - 01FaisalMashood
 
DBAM-01.pdf
DBAM-01.pdfDBAM-01.pdf
DBAM-01.pdfhania80
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Knut Relbe-Moe [MVP, MCT]
 
Lesson 1 configuring
Lesson 1   configuringLesson 1   configuring
Lesson 1 configuringRam Kedem
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadMarius Adrian Popa
 
Data Warehouse Design Considerations
Data Warehouse Design ConsiderationsData Warehouse Design Considerations
Data Warehouse Design ConsiderationsRam Kedem
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnikbiz
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld
 
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endSPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endKnut Relbe-Moe [MVP, MCT]
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Antonios Chatzipavlis
 
Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inRahulBhole12
 
Get your SharePoint spinning with SQL Server
Get your SharePoint spinning with SQL ServerGet your SharePoint spinning with SQL Server
Get your SharePoint spinning with SQL ServerKnut Relbe-Moe [MVP, MCT]
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMariaDB plc
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMariaDB plc
 
Storage talk
Storage talkStorage talk
Storage talkchristkv
 
Establishing Environment Best Practices T12 Brendan Law
Establishing Environment Best Practices T12 Brendan LawEstablishing Environment Best Practices T12 Brendan Law
Establishing Environment Best Practices T12 Brendan LawFlamer
 

Similar to Managing and Configuring Databases (20)

Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
 
Configuring Aerospike - Part 2
Configuring Aerospike - Part 2 Configuring Aerospike - Part 2
Configuring Aerospike - Part 2
 
Database Administration & Management - 01
Database Administration & Management - 01Database Administration & Management - 01
Database Administration & Management - 01
 
DBAM-01.pdf
DBAM-01.pdfDBAM-01.pdf
DBAM-01.pdf
 
Redis meetup
Redis meetupRedis meetup
Redis meetup
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
 
Lesson 1 configuring
Lesson 1   configuringLesson 1   configuring
Lesson 1 configuring
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
 
Data Warehouse Design Considerations
Data Warehouse Design ConsiderationsData Warehouse Design Considerations
Data Warehouse Design Considerations
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
 
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endSPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014
 
Azure DBA with IaaS
Azure DBA with IaaSAzure DBA with IaaS
Azure DBA with IaaS
 
Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation in
 
Get your SharePoint spinning with SQL Server
Get your SharePoint spinning with SQL ServerGet your SharePoint spinning with SQL Server
Get your SharePoint spinning with SQL Server
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Storage talk
Storage talkStorage talk
Storage talk
 
Establishing Environment Best Practices T12 Brendan Law
Establishing Environment Best Practices T12 Brendan LawEstablishing Environment Best Practices T12 Brendan Law
Establishing Environment Best Practices T12 Brendan Law
 

More from Ram Kedem

Impala use case @ edge
Impala use case @ edgeImpala use case @ edge
Impala use case @ edgeRam Kedem
 
Advanced SQL Webinar
Advanced SQL WebinarAdvanced SQL Webinar
Advanced SQL WebinarRam Kedem
 
Managing oracle Database Instance
Managing oracle Database InstanceManaging oracle Database Instance
Managing oracle Database InstanceRam Kedem
 
Power Pivot and Power View
Power Pivot and Power ViewPower Pivot and Power View
Power Pivot and Power ViewRam Kedem
 
Data Mining in SSAS
Data Mining in SSASData Mining in SSAS
Data Mining in SSASRam Kedem
 
Data mining In SSAS
Data mining In SSASData mining In SSAS
Data mining In SSASRam Kedem
 
SQL Injections - Oracle
SQL Injections - OracleSQL Injections - Oracle
SQL Injections - OracleRam Kedem
 
SSAS Attributes
SSAS AttributesSSAS Attributes
SSAS AttributesRam Kedem
 
DDL Practice (Hebrew)
DDL Practice (Hebrew)DDL Practice (Hebrew)
DDL Practice (Hebrew)Ram Kedem
 
DML Practice (Hebrew)
DML Practice (Hebrew)DML Practice (Hebrew)
DML Practice (Hebrew)Ram Kedem
 
Exploring Oracle Database Architecture (Hebrew)
Exploring Oracle Database Architecture (Hebrew)Exploring Oracle Database Architecture (Hebrew)
Exploring Oracle Database Architecture (Hebrew)Ram Kedem
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQLRam Kedem
 
Introduction to Databases
Introduction to DatabasesIntroduction to Databases
Introduction to DatabasesRam Kedem
 
Deploy SSRS Project - SQL Server 2014
Deploy SSRS Project - SQL Server 2014Deploy SSRS Project - SQL Server 2014
Deploy SSRS Project - SQL Server 2014Ram Kedem
 
Pig - Processing XML data
Pig - Processing XML dataPig - Processing XML data
Pig - Processing XML dataRam Kedem
 
SSAS Cubes & Hierarchies
SSAS Cubes & HierarchiesSSAS Cubes & Hierarchies
SSAS Cubes & HierarchiesRam Kedem
 
SSRS Basic Parameters
SSRS Basic ParametersSSRS Basic Parameters
SSRS Basic ParametersRam Kedem
 
SSRS Conditional Formatting
SSRS Conditional FormattingSSRS Conditional Formatting
SSRS Conditional FormattingRam 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

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Managing and Configuring Databases

  • 1. Managing and Configuring Databases Ram Kedem
  • 2. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent SQL Server Data Files •The primary data file(mandatory) •is the starting point of the database and points to the other files in the database. •Every database has one primary data file. •The recommended file name extension for primary data files is .mdf
  • 3. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent SQL Server Data Files •Secondary data files(Optional) •Secondary data files comprise all of the data files other than the primary data file. Some databases may not have any secondary data files, while others have multiple secondary data files. •The recommended file name extension for secondary data files is .ndf
  • 4. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent SQL Server Data Files •Log files(mandatory) •Log files hold all of the log information used to recover the database. •There must be at least one log file for each database •The recommended file name extension for log files is .ldf
  • 5. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Database Structure
  • 6. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Extents •SQL Server has two classes of extents: uniformand mixed. •Uniform Extentsare dedicated to a single object. Normally SQL Server allocates multiple uniform extents for each data table. •Mixed Extent- •However, if a table is small, SQL Server won't allocate an entire extent for it. Instead it will allocate data pages from a mixed extent, which can be thought of as a pool of pages for small tables. •Each mixed extent can be shared by multiple tables. •Since each extent has eight data pages, up-to eight objects can share data pages from a single mixed extent. •When you first create a table SQL Server starts by allocating a data page to it from a mixed extent.
  • 7. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Extents (Mixed Extents continued) •Once the table has enough data to warrant a full extent, SQL Server will allocate a uniform extent to it. •Similarly if you build an index on a table that has at least eight pages SQL Server will dedicate a uniform extent for storing the index data.
  • 8. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Pages •In SQL Server, the page size is 8 KB. •This means SQL Server databases have 128 pages per megabyte. •Each page begins with a 96-byte header that is used to store system information about the page. •This information includes the page number, page type, the amount of free space on the page, and the allocation unit ID of the object that owns the page.
  • 9. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Creating User Databases •1. Auto Options (such as auto statistics) •2. Page Verify •CHECKSUM. This option advises SQL Server to calculate a checksum over the contents of each data / index page when it is written to disk. This value is stored in the page header. When the page is read from the disk, checksum is computed again and compared to the value in page header • •TORN_PAGE_DETECTION •Saves a specific bit for each 512-byte sector in the 8-kilobyte (KB) database page and stored in the database page header when the page is written to disk. When the page is read from disk, the torn bits stored in the page header are compared to the actual page sector information. Unmatched values indicate that only part of the page was written to disk. In this situation, error message 824 (indicating a torn page error) is reported to both the SQL Server error log and the Windows event log. •3. Recovery Model •4. State Options
  • 10. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Shrink Database
  • 11. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Detach and Attach •UPDATE STATISTICS OPTION-updates statistics on table and index before detaching which might be a good option, if the database is attached in a read-only environment. But it is typically not a good choice if the database should just be moved to a new location. •DROP CONNECTIONS-closes all sessions connected to the same DB (when there is more than one session connected, this is the only option to detach a Database)
  • 12. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Determining File Placement and Number of Files 1. Isolate log and data files at the physical disk levelFor performance and safety reasons. •Performance -The access patterns of data and log files are very different as there is mainly sequential access to log filesand random disk access on data files (especially in OLTP). •Safety -Also in case of a storage failure there is a better chance to recover the database fully if only parts of the database files are corrupt.
  • 13. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Determining File Placement and Number of Files 2. Use appropriate RAID levels RAID (originally redundant array of inexpensive disks; now commonly redundant array of independent disks) is a data storage virtualization technology that combines multiple disk drive components into a logical unit for the purposes of data redundancy or performance improvement
  • 14. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Determining File Placement and Number of Files 2.1 RAID 0 •RAID 0 consists of striping, without mirroring. •Striping distributes the contents of files roughly equally among all disks in the set, which makes concurrent read or write operations on the multiple disks almost inevitable. •The concurrent operations make the throughput of most read and write operations equal to the throughput of one disk multiplied by the number of disks. Increased throughput is the big benefit of RAID 0 versus spanned volume
  • 15. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Determining File Placement and Number of Files 2.2 RAID 1 •RAID 1 consists of mirroring, without parity or striping. •Data is written identically to two (or more) drives, thereby producing a "mirrored set". Thus, any read request can be serviced by any drive in the set. •Actual read throughput of most RAID 1 implementations is slower than the fastest drive. Write throughput is always slower because every drive must be updated, and the slowest drive limits the write performance.
  • 16. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Determining File Placement and Number of Files 2.3. RAID 10 •Combines RAID 1 and RAID 0 •Also called “stripe of mirrors” •Minimum of 4 disks
  • 17. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Determining File Placement and Number of Files 2.4. RAID 5 With RAID 5, data is striped for speed like a RAID 0, but a duplication or parity is built in to protect your data from a single drive failure. This results in fast performance comparable to a RAID 0, but with the added benefit of protection.
  • 18. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Determining File Placement and Number of Files •Ensuring Sufficient File Capacity •It is important to estimate the maximum size of the database, indexes, transaction log and tempdb, through a predicted growth module. •Set the size to a reasonable size: •Leave enough space for new data, without the need to expand often •Monitordataand log file usage •Plan for manual expansion •Keep autogrowthenabledto allow for unexpected growth
  • 19. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent System Databases Supplied with SQL Server •Master Database •Themasterdatabase records all the system-level information for a SQL Server system. This includes instance-wide metadata such as logon accounts, endpoints, linked servers, and system configuration settings. •masteris the database that records the existence of all other databases and the location of those database files and records the initialization information for SQL Server. •Therefore, SQL Server cannot start if themasterdatabase is unavailable.
  • 20. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent System Databases Supplied with SQL Server •TempdbDatabase •Thetempdbsystem database is a global resource that is available to all users connected to the instance of SQL Server and is used to hold the following: •Temporary user objects that are explicitly created, such as: global or local temporary tables, temporary stored procedures, table variables, or cursors. •Internal objects that are created by the SQL Server Database Engine.
  • 21. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent System Databases Supplied with SQL Server •Model Database •Themodeldatabase is used as the template for all databases created on an instance of SQL Server. •The entire contents of themodeldatabase, including database options, are copied to the new database. •Becausetempdbis created every time SQL Server is started, themodeldatabase must always exist on aSQL Server system. •Some of the settings ofmodelare also used for creating a newtempdbduring start up
  • 22. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent System Databases Supplied with SQL Server •MSDB Database •Mainly Provides the capability us to save information about automation and backup & recovery •Themsdbdatabase is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker and Database Mail. •For example, SQL Server automatically maintains a complete online backup-and-restore history within tables inmsdb.