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

推荐订阅源

Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
U
Unit 42
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
B
Blog RSS Feed
Vercel News
Vercel News
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Jina AI
Jina AI
小众软件
小众软件
T
Threatpost
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
B
Blog
腾讯CDC
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
S
Schneier on Security
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
K
Kaspersky official blog
G
Google Developers Blog
T
Tor Project blog
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Latest news
Latest news
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客

博客园 - LiAnGcAt

禁用Ctrl+鼠标滚轮缩放VS代码窗体文字大小 Win/Mac 下修复exFAT 分区 “System.AccessViolationException”类型的未经处理的异常在 System.Data.dll 中发生 SQLServer的ERRORLOG太大怎么办 sql查询重复记录 访问 IIS 元数据库失败 关于并发控制的笔记 笔记,随笔,摘 SQLServer 2005 在VISTA下重新安装并硬恢复数据库后,SA登陆异常 在Vista下配置VS2003 SQL Server的游标 SQL Server 2000 Agent自动关闭? 服务器HTTPS和HTTPS的session SQL 笔记 二 Ctrl + 0!!!怎么就记不住呢 当link button无法提交form 当你的SQLServer没有启动~ SQLServer学习:复制表结构 禁用xp_cmdshell!
SQLServer2008 收缩日志
LiAnGcAt · 2015-05-27 · via 博客园 - LiAnGcAt
USE [master]
GO


ALTER DATABASE DBName SET RECOVERY SIMPLE WITH NO_WAIT
GO

ALTER DATABASE DBName SET RECOVERY SIMPLE --简单模式
GO

USE DBName
GO

DBCC SHRINKFILE (N'DBName_log',0, TRUNCATEONLY) 
GO

USE [master]
GO

ALTER DATABASE DBName SET RECOVERY FULL WITH NO_WAIT
GO

ALTER DATABASE DBName SET RECOVERY FULL --还原为完全模式
GO

----------------

不知道日志名字,查询方法:

USE DBName 
GO

SELECT file_id, name FROM sys.database_files;
GO

posted on 2015-05-27 15:37  LiAnGcAt  阅读(1230)  评论(0)    收藏  举报