惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 含羞草

Jenkins的pipeline脚本中获取git代码变更用户名和email - 含羞草 CentOS7安装配置SonarQube - 含羞草 CentOS安装Harbor Gitlab自动触发Jenkins构建项目 - 含羞草 CentOS7安装Jenkins Master - 含羞草 解决win7下打开Excel2007,报“向程序发送命令时出现问题”的错误 - 含羞草 转:老调重弹:const char*, char const* and char *const WebService:System.InvalidOperationException: 无法生成临时类 PowerBuilder:表中字段的数据长度的修改对数据窗口的影响 转:使用SET NOCOUNT优化存储过程 转:如何使用SQL Server 2005 专用管理员连接(DAC)登录到服务器 四遥量 - 含羞草 VS.NET开发环境的WIN FORM中怎样加入ActiveX控件 - 含羞草 C# Winform程序如何获取运行路径 - 含羞草 转:类型"string"的值无法转换为"System.Drawing.Color" - 含羞草 转: Simple ASP.NET 2.0 Tips and Tricks that You May (or may not) have Heard About (一些简单的、你可能已经知道或者不知道的ASP.NET 2.0技巧) Asp.net : 访问嵌套模版页中的控件 SQL Server 2005 : 服务器不允许远程客户端登录的解决办法 安装删除服务
SQL Server 2005 : 清空数据库日志
含羞草 · 2007-04-17 · via 博客园 - 含羞草

日志文件满而造成SQL数据库无法写入文件时,可用两种方法:
方法一:清空日志。
1.打开查询分析器,输入命令
DUMP TRANSACTION 数据库名 WITH NO_LOG
2.再打开企业管理器--右键你要压缩的数据库--所有任务--收缩数据库--收缩文件--选择日志文件--在收缩方式里选择收缩至XXM,这里会给出一个允许收缩到的最小M数,直接输入这个数,确定就可以了。

另一种方法有一定的风险性,因为SQL SERVER的日志文件不是即时写入数据库主文件的,如处理不当,会造成数据的损失。
 方法二:
1: 删除LOG
分离数据库 企业管理器->服务器->数据库->右键->分离数据库
2:删除LOG文件
附加数据库 企业管理器->服务器->数据库->右键->附加数据库
此法生成新的LOG,大小只有500多K。

注意:建议使用第一种方法。

如果想以后不让它增长
企业管理器--服务器--右键数据库--属性--事务日志--将文件增长限制为xM(x是你允许的最大数据文件大小)

--SQL语句的设置方式:
alter database 数据库名 modify file(name=逻辑文件名,maxsize=20)