博客
关于我
强烈建议你试试无所不能的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/

你可能感兴趣的文章
链路聚合
查看>>
CodingTMD’s Reading List
查看>>
如何将可执行文件打包至APK并运行(转)
查看>>
值类型与引用类型
查看>>
<转>如何测试大型ERP软件?
查看>>
Python爬虫学习==>第一章:Python3+Pip环境配置
查看>>
大数据-09-Intellij idea 开发java程序操作HDFS
查看>>
小米4c jni调用CallStaticIntMethod报错问题解决
查看>>
centos7安装配置git
查看>>
Unattend.xml应答文件制作(WISM)
查看>>
Mysql中文乱码问题完美解决方案
查看>>
Linux编程 15 文件权限(用户管理 useradd,userdel,usermod,passwd,chpasswd,chsh, chfn,chage)
查看>>
Linux编程 21 shell编程(环境变量,用户变量,命令替换)
查看>>
神经网络和深度学习 笔记
查看>>
Python全栈学习_day010作业
查看>>
JAVA面向对象()上)
查看>>
搭建LNMP环境(CentOS 6)
查看>>
C# 面向对象零碎知识点
查看>>
【RMAN】使用RMAN的 Compressed Backupsets备份压缩技术 (转载)
查看>>
博弈论之威佐夫博弈(转载)
查看>>