数据库ldf文件比mdf数据库多 [英] data base ldf file is more than the data base mdf

查看:204
本文介绍了数据库ldf文件比mdf数据库多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有24gb日志文件,实际上数据大约10gb.how我可以得到内存吗?。我想在sql server中减少日志文件的大小

i am having of 24gb log file and actually data around 10gb.how can i get the memory ?.i want to reduce the log file in size in sql server

推荐答案

1)备份数据库

2)备份数据库转换日志

3)收缩



如果在维护期间完成此操作,缩小数据库或日志文件的最大问题是它们会增长。增长可能会导致性能问题。



数据库的恢复模式是什么?
1) Make backup of database
2) Make backup of database transition log
3) Shrink both

If this is done during a maintenance time, the biggest problem with shrinking either the database or the log file is that they will grow. The growth may cause performance problems.

What recovery mode is the database in?


1)右键单击Management Studio中的数据库 - >属性

2)转到高级选项卡,检查恢复模式的值;如果它'完成',将其更改为'简单'

3)关闭属性窗口。

4)备份数据库

5)收缩日志文件

6)如果您在步骤2中将恢复模式更改为简单,请将其设置回完成。



希望这有帮助。
1) Right click on your database in Management Studio -> Properties
2) Go to 'Advanced' tab, and check for the value of Recovery Mode ; if it 'Complete', change it to 'Simple'
3) Close the properties window.
4) Backup your database
5) Shrink the log file
6) If you have changed the recovery mode to Simple in step 2, set it back to Complete.

Hope this helps.


这篇关于数据库ldf文件比mdf数据库多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆