摘要:
sql server会在一下三种情况下认为你不需要维护日志备份:使用BACKUP LOG WITH NO_LOG 或者 BACKUP LOG WITH TRUNCATE_ONLY来进行日志备份简单恢复模式从来没有进行过完整备份对于上述情况,数据库日志会在“足够满”的时候自动截断,以使VLFs重用。日志截断虽然是VLFs重用,但是不会收缩日志文件的大小。---实验:验证日志的自动截断与日志收缩-------------------------------新建pubs数据库USE pubs--step1:查看pubs数据库中的VLFs信息,第一个VLFs的FSeqNo=23,Status=0,其他 阅读全文
摘要:
参考文献:SQL 2005修改系统表SQL Server 2005中修改系统表的方法如何登入DAC(SQL Server 2005)ResourceDB Location ChangesResourceDB Location Changes1.What is resourcedb?(from msdn)The Resource database is a read-only database that contains all the system objects that are included with SQL Server. SQL Server system objects, suc 阅读全文
摘要:
Page LSNs and RecoveryEvery database page has an LSN in the page header that reflects the location in the transaction log of the last log entry that modified a row on this page. Each log record for changes to a data page has two LSNs associated with it. In addition to the LSN for the actual log reco 阅读全文
摘要:
原文:http://msdn.microsoft.com/en-us/library/ms179355(SQL.90).aspx检查点在数据库中的执行过程:在日志文件中写入LOP_BEGIN_CKPT表示checkpoint开始、记录MinLSN,MinLSN=min(LSN of the start of the checkpoint,LSN of the start of the oldest active transaction)如果数据库使用的是简单恢复模式,则截断(truncate)MinLSN之前的所有VLFs。如果是完整恢复或者是大容量日志模式,不会截断任何事务日志。将dirty 阅读全文
摘要:
官方原文:http://msdn.microsoft.com/en-us/library/ms179355(SQL.90).aspxThe transaction log in a database maps over one or more physical files. Conceptually, the log file is a string of log records(一串日志记录). Physically, the sequence of log records is stored efficiently in the set of physical files that imp 阅读全文