Professional Documents
Culture Documents
Page: 8 KB
Extent: eight
contiguous 8 KB pages
Considerations for Disk Storage Devices
RAID 0 RAID 1
ACEGIK ABCDEF
BDFHJL ABCDEF
RAID 5 RAID 10
A#EG#K ACEGIK
BC#HI# BDFHJL
#DF#JL ACEGIK
BDFHJL
Determining File Placement and Number of Files
System
Description
Database
master Stores all system-level configuration
• tempdb:
• Contains temporary data for internal objects, row
versioning, and user objects
• Is truncated or rebuilt with every restart of the instance
• Occupies varying amounts of space
• Should be tested with real-life workloads
• Create databases:
• In SQL Server Management
Studio
• By using the CREATE
DATABASE statement
Option Description
Defines whether some operations should occur
Auto options
automatically within the database
Defines how the page should be verified when
Page verify
read from disk; should be set to CHECKSUM
Recovery
Defines the recovery model of the database
model
Sets the state of the database, such as
State options
Online/Offline, Restricted Access or Read Only
Demonstration: Creating Databases
• Shrinking databases:
• DBCC SHRINKDATABASE
• DBCC SHRINKFILE
• TRUNCATE_ONLY
Introduction to Filegroups
PRIMARY
D:\Data1.mdf D:\Data2.ndf
Custom_FG
E:\Data.mdf F:\Data.ndf
L:\Log.ldf
Creating and Managing Filegroups
• Creating filegroups
• CREATE DATABASE … FILEGROUP (<files>)
• ALTER DATABASE … ADD FILEGROUP <filegroup>
Logon Information
Virtual machine: 20765C-MIA-SQL
User name: ADVENTUREWORKS\Student
Password: Pa55w.rd
• Review Question(s)
• Best Practice