According to Microsoft, sysfiles.status:
0x80 = File has been written to since last backup.
Unfortunately, this query is not returning what I expect. That is, if I have inserted/updated/deleted any records, I belive that some underlying file must be written to.
So, I tried:
Code Snippet
select * from sysfiles where status & 0x80 <> 0I updated several fields in my database, doubled and tripled the size etc. I can't get the above query to return any results.
Does anyone have any experience with this particular flag? I was hoping to check the sysfiles and know if a backup was needed or not.
Thanks mucho.
There might be some ways to take advantage of the differential changed map to determine if a database has changed since the last backup, but the only way I know to read it isn't well suited for inclusion in a batch job.
Code Snippet
DBCC TRACEON(3604)
DBCC PAGE(databasename, 1, 6, 3)
Granted, a database larger than about 4 GB is probably going to have more than one dcm page, and I'm not entirely sure how to determine where subsequent pages are located.
没有评论:
发表评论