- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
压缩SQL Server数据库日记文件(国外英文资料)
收缩SQL Server数据库日志文件(国外英文资料)
How does the LDF file shrink the SQL Server database log LDF file
Summary: in fact, two instructions can be completed
BACKUP the LOG DateBaseName WITH TRUNCATE_ONLY
DBCC ShrinkDatabase (DateBaseName)
The best backup log, which can be recovered by logging, is the following log processing method:
Generally is not recommended to do two steps 4, 6, 4 step is not safe, may damage the database or data loss, step 6 if log reach limit, after the database processing will fail, can be restored after clear the log.
All of the library names below refer to the library name of the database you are dealing with
1. Clear the log
The DUMP TRANSACTION library name WITH NO_LOG
Stop the transaction log:
BACKUP LOG library name WITH NO_LOG
Shrink the database file (the database file will not shrink if it is not compressed)
Enterprise manager - right-click on the database you want to compress - all tasks - shrink the database - contract files
- select the log file - in the way choice in contraction to XXM, here will give you a minimum to allow contraction M number, enter this number directly, sure.
- select data file - in the way choice in contraction to XXM, here will give you a minimum to allow contraction M number, enter this number directly, sure.
You can also use SQL statements
- shrink the database
DBCC SHRINKDATABASE (library)
The file number 1 is the file number, which can be queried by the statement: select * from sysfiles
DBCC SHRINKFILE (1)
To minimize log files (if it is SQL 7.0, this step will only be done in the query analyzer)
Separate database: the server -- the database -- right-click -- the database
B. Delete the LOG file on my computer
C. additional database. Enterprise manager - server - database - right-click - attach the database
This method will generate a new LOG size of more than 500 K
Or use the code:
The following sample separation, pubs, and then attach a file of pubs to current server.
A. separate: EXEC sp_detach_db @dbname = libr
您可能关注的文档
最近下载
- 建筑施工高处作业安全技术规范JGJ80-202420240805.pptx VIP
- 【精编版】部编教材四年语文上册全册课后作业(含答案解析) .pdf VIP
- BHE-336F风电-光伏箱变智能监控装置说明书.pdf VIP
- 通力电梯LCE无机房KDM KDL中文注释版电气原理图.pdf
- 第二单元+探索+3+物联网的定位技术+课件+2024—2025学年苏科版(2023)+初中信息技术八年级上册.pptx VIP
- 人教版美术七上 第一单元第1课《情感的表达》课件.pptx
- 2025年招聘考试宝典物流经理竞聘笔试模拟题与答案详解.docx VIP
- 小学语文六年级上册期末试卷 (21).doc VIP
- 关于勤奋学习的名人故事(通用63则).docx VIP
- 2025年压裂装备市场分析报告.docx
文档评论(0)