how to get my database.mdf files to show most recent update

  • Basically when I look into my files sytem through explorer at my databse.mdf file, I look at the last modified date column. the only time this time/date value for the database.mdf file changes is when I shutdown and restart the sql server service. How can i make the data/modified vaule here refresh without stopping and restarting sql server service?

     

    Basically, we have data coming into the sql 2000 server from a blackberry server and I need a way to check each day that the database was synchronized with the blackberry server.

    thanks!!!

  • In Windows a files Modified date does not change until the file closes. A database opens and event thou constantly change never closes until the server shuts down or active ceases (if you happen to have the Auto Close option set for the database). As the Auto Close impacts the first users into the dataabse because the caches flush for the closing database it is generally frowned upon. You best bet is to look at the transaction log (DBCC LOG or a vendor tool) or put a marker of some kind in the data that gives you a clue.

  • Also, the timestamp changes when file growth happens.  So, you could shrink the database file, then insert enough data so that the file grows.  That will update the timestamp on the file.

    This is probably not a very good idea, but if you have an absolute business requrement that the timestamp gets changed, you can make it happen in this manner.

    If you can tell generaly "what happens" during the replication, we might be able to suggest a better way to detect what you're looking for.

    jg

     

     

     

  • Just verified you really are goin to have to take my other suggestions. When SQL Server is stopped databases that have had no transaction also will update the file modified date. So stopping SQL Server or doign as suggested in th previous proves nothing about the occurance of changes you are looking for. You need to add somethin to your process to stamp the records with Date/Time or a table that writes when the last push occurrs or buy a tool such as LogFX to look for the transactions in the log file.

  • thanks very much for you help and time!!!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply