3 回答

TA貢獻(xiàn)1858條經(jīng)驗(yàn) 獲得超8個(gè)贊
您可以使用無證件
DBCC LOG(databasename, typeofoutput)
其中typeofoutput:
0: Return only the minimum of information for each operation -- the operation, its context and the transaction ID. (Default)
1: As 0, but also retrieve any flags and the log record length.
2: As 1, but also retrieve the object name, index name, page ID and slot ID.
3: Full informational dump of each operation.
4: As 3 but includes a hex dump of the current transaction log row.
例如,DBCC LOG(數(shù)據(jù)庫,1)
您也可以嘗試fn_dblog。
為了使用事務(wù)日志回滾事務(wù),我將看一下使用事務(wù)日志的 Stack Overflow 回滾事務(wù)。

TA貢獻(xiàn)2039條經(jīng)驗(yàn) 獲得超8個(gè)贊
您無法輕松讀取事務(wù)日志文件,因?yàn)樵撐募]有正確記錄?;旧嫌袃煞N方法可以做到這一點(diǎn)。使用未記錄或半記錄的數(shù)據(jù)庫功能或使用第三方工具。
注意:僅當(dāng)數(shù)據(jù)庫處于完全恢復(fù)模式時(shí),這才有意義。
SQL函數(shù):
DBCC LOG和fn_dblog- 此處和此處有更多詳細(xì)信息。
第三方工具:
Toad for SQL Server和ApexSQL Log。

TA貢獻(xiàn)1772條經(jīng)驗(yàn) 獲得超8個(gè)贊
我不小心在錯(cuò)誤的環(huán)境中刪除了一大堆數(shù)據(jù),而這篇文章是我發(fā)現(xiàn)的第一批數(shù)據(jù)之一。
因?yàn)橥瑫r(shí)恐慌和尋找解決方案,所以我去了第一眼看到的東西-ApexSQL Logs,這是2000美元,這是可以接受的費(fèi)用。
但是,從那以后,我發(fā)現(xiàn)Toad for Sql Server可以從事務(wù)日志中生成撤消腳本,它的價(jià)格僅為655美元。
最后,找到了一個(gè)更便宜的SysToolsGroup Log Analyzer選項(xiàng),價(jià)格僅為300美元。
- 3 回答
- 0 關(guān)注
- 1201 瀏覽
添加回答
舉報(bào)