Professional Documents
Culture Documents
pe
File Type
Extension
Description The primary data file contains the startup information for the database and pointers to other files Secondary files can be used to spread user data across multiple disks by putting each file on a different disk drive Log files hold all the information that is used to recover the database
Primary Files
.mdf
Secondary Files
.ndf
Transaction logs
.ldf
Page: 8KB
Buffer Cache
Data pages are located in, or read into, the buffer cache and then modified
Consideration
If you have tables that are frequently used together, you
or RAID array
AdventureWorks Database
sys... sys.filegroups sys.objects sys.indexes
... Sales.SalesOrder
Sales.Customer Production.Product Ord.HistYear2
Ord.HistYear1
C:\
AdventureWorks_ Data.mdf
D:\
OrdHist1.ndf OrdHist2.ndf
E:\
AdventureWorks_ Log.ldf
Primary Filegroup
OrderHistoryGroup
Filegroups can be created when the database is first created or later when more files are added to the database
Files cannot be moved to different filegroups A file cannot be a member of more than one filegroup
Filegroups can contain only data files
Partitioning Scheme
January Orders
File1
February
File2
March
MCTS Daniel Ramos - danielramos@sistemasuni.edu.pe
File3
model database
Primary
Secondary
Log
database_name ON PRIMARY
LOG ON
FILEGROUP filegroup_name COLLATE
MCTS Daniel Ramos - danielramos@sistemasuni.edu.pe
READ_ONLY
RECOVERY SIMPLE
Manually expand a database by allocating additional space Use the MAXSIZE parameter to specify maximum size
The log transaction file can be truncated
Each file within a database can be reduced Both data and transaction log files can be shrunk Files are always shrunk from the end
Contact
(Server1.AdventureWorks2008.Person.Contact)
Sales
Customer
(Server1.AdventureWorks2008.Sales.Customer)
dbo ErrorLog
(Server1.AdventureWorks2008.dbo.ErrorLog)
AdventureWorks2008
List is organized into configuration server groups Actions taken will act on all servers in the server group
Scales across multiple servers Helps enforce consistent policies across enterprise
Conform to Desired Intent
Offers a logical view of the system configuration Defines the configuration of data services
Monitor Performance
Manage the operation of multiple servers Optimize the execution of your data services
Policy-Based Management allows you to define what can or cannot be done on the server
Policies are created and managed with Management Studio The process includes the following steps:
1 2
Define a condition that specifies the management facet Define a policy that contains the filters for the target sets Check if SQL Server is in compliance with the policy
3 4