D********g 发帖数: 650 | 1 请问如果我的DB有periodical的full backup,是不是就不需要保留transaction log了?
谢谢 |
a**d 发帖数: 4285 | 2 一般full backup不能很频繁,就需要full backup之间还有diffential和transaction
log这两种backup。
了?
【在 D********g 的大作中提到】 : 请问如果我的DB有periodical的full backup,是不是就不需要保留transaction log了? : 谢谢
|
i****a 发帖数: 36252 | 3 什麼叫不 "保留transaction log"? set DB to be simple mode? not doing tran log
backup?
If you have full backup then you can restore with that backup. And you are
sure don't need anything after that backup, then you don't need to do/keep
tran log back up. it depends on your requirement.
了?
【在 D********g 的大作中提到】 : 请问如果我的DB有periodical的full backup,是不是就不需要保留transaction log了? : 谢谢
|
gy 发帖数: 620 | 4 What do you mean "就不需要保留transaction log了"?
In full recovery model, the TLog backup is used to point-in-time recovery.
了?
【在 D********g 的大作中提到】 : 请问如果我的DB有periodical的full backup,是不是就不需要保留transaction log了? : 谢谢
|
D********g 发帖数: 650 | 5 谢谢,我目前是每周做一次full backup,每天做一次differential backup.
我现在有35G的transaction log,真正的data back up file每次只有150M。
我试过了:
DBCC SHRINKFILE (T_Log, 1000);
transaction log还是35G。有没有办法能把transaction log的大小控制在一定范围内?
transaction
【在 a**d 的大作中提到】 : 一般full backup不能很频繁,就需要full backup之间还有diffential和transaction : log这两种backup。 : : 了?
|
gy 发帖数: 620 | 6 1. You may have orphaned transaction. Use DBCC OPENTRAN to check.
Or 2. Some jobs or activities made the TLog bigger. You should figure out
what's going on.
内?
【在 D********g 的大作中提到】 : 谢谢,我目前是每周做一次full backup,每天做一次differential backup. : 我现在有35G的transaction log,真正的data back up file每次只有150M。 : 我试过了: : DBCC SHRINKFILE (T_Log, 1000); : transaction log还是35G。有没有办法能把transaction log的大小控制在一定范围内? : : transaction
|
a9 发帖数: 21638 | 7 截断后得压缩空间才会减小。
感觉你这样做法不好。transaction log的目的是你可以回到数据库的任意时刻的状态
。你这样备份法如果不用日志,只能回到你备份的状态。
内?
【在 D********g 的大作中提到】 : 谢谢,我目前是每周做一次full backup,每天做一次differential backup. : 我现在有35G的transaction log,真正的data back up file每次只有150M。 : 我试过了: : DBCC SHRINKFILE (T_Log, 1000); : transaction log还是35G。有没有办法能把transaction log的大小控制在一定范围内? : : transaction
|
i****a 发帖数: 36252 | 8 You can't just shrink the tran log file if it is holding transactions.
Your options are:
A. Do a tranlog backup periodically.
B. Set database to simple mode.
C. Limit tranlog file grow size. But I suspect this will make processes fail
because something generated that much log.
D. See what process is generating 35g tranlog and optamize it.
内?
[发表自未名空间手机版 - m.mitbbs.com]
【在 D********g 的大作中提到】 : 谢谢,我目前是每周做一次full backup,每天做一次differential backup. : 我现在有35G的transaction log,真正的data back up file每次只有150M。 : 我试过了: : DBCC SHRINKFILE (T_Log, 1000); : transaction log还是35G。有没有办法能把transaction log的大小控制在一定范围内? : : transaction
|
z***y 发帖数: 7151 | 9 就是这个说到点子上了。
【在 gy 的大作中提到】 : What do you mean "就不需要保留transaction log了"? : In full recovery model, the TLog backup is used to point-in-time recovery. : : 了?
|
D********g 发帖数: 650 | 10 Thanks!
I do have a process actively making lots of transactions. But I don't need
to be able to recover to every time point. Basically the process mentioned
above is a crawling process which bulk writes into the DB. I tried to set
the DB recovery in BULK_LOGGED mode before bulk write and set it back to
FULL after the bulk write. Hopefully this will reduce the transaction log
size, otherwise, I might need to set it to SIMPLE.
fail
【在 i****a 的大作中提到】 : You can't just shrink the tran log file if it is holding transactions. : Your options are: : A. Do a tranlog backup periodically. : B. Set database to simple mode. : C. Limit tranlog file grow size. But I suspect this will make processes fail : because something generated that much log. : D. See what process is generating 35g tranlog and optamize it. : : 内? : [发表自未名空间手机版 - m.mitbbs.com]
|