博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
431.chapter2.configure log and datafiles
阅读量:7261 次
发布时间:2019-06-29

本文共 2694 字,大约阅读时间需要 8 分钟。

operation sysytem file type: mdf&ldf

database file type: mdf&ndf

 

===primary data file

include startup infomation for the database catalog and points to the outher database files

can also contain obj&data, that means can not contain obj&data

当用户自己创建用户自定义文件组,并制定该文件组为默认文件组之后,所有的数据库对象将存在该文件组中

主数据文件保存在主文件组中。主文件组不一定是默认文件组,默认文件组也不一定是主文件组

 

===secondary data file[Max:32776]

obj&user data
***put each sdf on a different disk drive to boost performance

 

===log file

records all database modifications that each transaction make
create multiple log files per database to facilitate faster recovery 

===file group: a logical structure = pfg&ufg
splitting database objects across several filegroups, you can
#take advantage of the differrentdisk subsystems
#allow SQL Server to perform paralled disk operations
#back up and restore files individually

***default filegroup

***read-only filegroup

 

===how to design table

one access-intensive table:create multiple second data file,
store the files on different disk drives,
and group these files in a filegroup or multiple filegroups

 

===how to design filegroup

create at least one user-defined filegroup to hold seconday data files and database objects.
Configure this filegroup as the default filegroup so that SQL Server will store all objects
you create in this filegroup

 

==how to design database files with RAID system

RAID10------Log Files

RAID5-------Data Files

 

ContractedBlock.gif
ExpandedBlockStart.gif
Configuration Database Files and Filegroups
 1None.gifCREATE DATABASE [70431] 
 2None.gifON  
 3None.gif--primary data file
 4None.gifPRIMARY 
 5None.gif    ( NAME = N'70431_pdf', FILENAME = N'D:\DBF\70431_pdf.mdf' , 
 6None.gif    SIZE = 10240KB , MAXSIZE = 102400KB , FILEGROWTH = 20480KB ), 
 7None.gif
 8None.gif--seconday data file 
 9None.gifFILEGROUP [USEDEFINE1] 
10None.gif    ( NAME = N'70431_data1', FILENAME = N'E:\Projects\SQL\DbFiles\70431_data1.ndf' , 
11None.gif    SIZE = 10240KB , MAXSIZE = 102400KB , FILEGROWTH = 20480KB ), 
12None.gif    ( NAME = N'70431_data3', FILENAME = N'E:\Projects\SQL\DbFiles\70431_data3.ndf' , 
13None.gif    SIZE = 10240KB , MAXSIZE = 102400KB , FILEGROWTH = 10240KB ), 
14None.gifFILEGROUP [USERDEFINE2] 
15None.gif    ( NAME = N'70431_data2', FILENAME = N'E:\Projects\SQL\DbFiles\70431_data2.ndf' , 
16None.gif    SIZE = 10240KB , MAXSIZE = 102400KB , FILEGROWTH = 10240KB ), 
17None.gif    ( NAME = N'70431_data4', FILENAME = N'E:\Projects\SQL\DbFiles\70431_data4.ndf' , 
18None.gif    SIZE = 10240KB , MAXSIZE = 102400KB , FILEGROWTH = 10240KB )
19None.gif
20None.gif-- log file 
21None.gifLOG ON 
22None.gif    ( NAME = N'70431_log', FILENAME = N'F:\Projects\SQL\LgFIles\70431_log.ldf' , 
23None.gif    SIZE = 20480KB , MAXSIZE = 204800KB , FILEGROWTH = 20480KB ), 
24None.gif    ( NAME = N'70431-log1', FILENAME = N'F:\Projects\SQL\LgFIles\70431-log1.ldf' , 
25None.gif    SIZE = 20480KB , MAXSIZE = 102400KB , FILEGROWTH = 10240KB )
26None.gif
27None.gif
28None.gifGO
29None.gif
30None.gifALTER DATABASE [70431]
31None.gifMODIFY FILEGROUP [USEDEFINE1] DEFAULT

 

 

转载地址:http://zjldm.baihongyu.com/

你可能感兴趣的文章
2017-2018-1 20155222 《信息安全系统设计基础》第4周学习总结
查看>>
kdump 的使用在linux崩溃时
查看>>
java MongoDB driver error infos
查看>>
Zookeeper的安装配置及基本开发
查看>>
Android菜鸟的成长笔记(24)——Android中的振动器
查看>>
关于用什么作为dll版本号的思考
查看>>
第三周学习进度条
查看>>
55字符串解析
查看>>
使用Topshelf创建Windows服务
查看>>
《面向模式的软件体系结构3-资源管理模式》读书笔记(10)--- Evictor模式
查看>>
spark性能调优02-JVM调优
查看>>
c# 画刻度尺(支持缩放)
查看>>
How to set, print, or list environment variables
查看>>
ubuntu使用中遇到问题及解决方法持续整理
查看>>
大型网站架构设计方向初探
查看>>
中国天气网API
查看>>
php smarty模版引擎中变量操作符及使用方法
查看>>
(转)Excel VBA 操作 Word(入门篇)
查看>>
.NET(C#)开源代码分析
查看>>
Android Notes
查看>>