网站大量收购独家精品文档,联系QQ:2885784924

数据库压缩2(Database compression 2).doc

  1. 1、本文档共7页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库压缩2(Database compression 2)

数据库压缩2(Database compression 2) DBCC SHRINKDATABASE Shrinks the size of the data file specified in the database. grammar DBCC SHRINKDATABASE (database_name [[target_percent]] [TRUNCATEONLY] |, {NOTRUNCATE} ) parameter Database_name Is the name of the database to be contracted. The database name must conform to the rules of identifiers. For more information, see using identifiers. Target_percent Is the amount of space available in the database file after the database shrinks. NOTRUNCATE Causes the reserved file space to be kept in the database file. If not specified, the released file space is released to the operating system. TRUNCATEONLY This results in the release of any unused space in the data file to the operating system and shrinks the file to the last allocated size, thus reducing the size of the file without moving any data. Rows that do not attempt to reposition an unassigned page. When using TRUNCATEONLY, ignore target_percentis. Notes Microsoft, SQL, Server? Can shrink: All data and log files for a particular database. Execute DBCC SHRINKDATABASE. Data or log files at a time in a particular database. Execute DBCC SHRINKFILE. DBCC SHRINKDATABASE shrinks the data files in each file. However, when DBCC SHRINKDATABASE shrinks the log file, it looks as if all the log files are in a continuous log pool. Suppose the database named mydb has two data files and two log files. These data files and log files are 10 MB in size. The first data file contains 6 MB data. For each file, SQL Server calculates the target size, that is, the size of the file to be contracted. When specifying DBCC SHRINKDATABASE with target_percent, the target size of SQL Server is the size of the target_percent space available in the contracted file. For example, if specified, press target_percent 25 to shrink mydb. The target size of the file calculated by SQL Server is 8 MB (6 MB data plus 2 MB of free space). Therefore, SQL Server moves any data from the last 2 MB of the data file to the ava

您可能关注的文档

文档评论(0)

jgx3536 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档