This is just on of those "That's the way the database works" issues. DBMSes which
use file-based data stores (Ora, MS, INF, DB2, but not PG) manage the blocks
themselves. The blocks must be preallocated so initial inserts to a new table
*won't* change the file size, unless there's so many inserts that auto-grow
allocates more storage.
- V
What sort of solutions for such very challenging issue?
At the end of the day, I need to have a safe copy for my mdf files
Best
Jamal
Every connect to a database changes the files, but you can't identify which blocks
have been changed unless you let the database tell you. Again, this is a "that's
the way they work" issue. If your sync software doesn't recognize this, then it's
not a problem with the database, it's with the sync software (neither of which
is particularly on-topic for this forum).
- V
Jamal,
The solution is not to rely on synch software, but to use the build-in options of the DBMS to do the job in an automated scheduled way.
Here are some links that may be of use for SQL Server, but you can find a ton others by Googling:
http://msdn.microsoft.com/en-us/library/ms186289.aspx
http://technet.microsoft.com/en-us/library/ms187510.aspx
http://weblogs.asp.net/sreejukg/archive/2010/01/20/scheduling-automated-backup-using-sql-server-2008...
http://outcoldman.com/en/blog/show/214
Thank you very much Marco,
Yes. We do like to hear from experts some kind of solutions! And that�??s what you did Marco!
Well, I would prefer to have my mdf files synchronized with my software to ensure that all types of other data are backed up IN ONE GO!
However, this is a good solution
[ATTACH=CONFIG]23998[/ATTACH]
Appreciated
Jamal
I think the recommended approach is to let the RDBMS handle the backup of your databases, as this takes care of recent edits in transaction logs as well if you choose to backup those as well, as shown in the links I posted.
That said, you may wish to do a system image backup of your server as well once in a while, if you are concerned with the entire state of the PC and all its software. On a regular Windows 7 / 8 "Home edition" type test machine, you can use the System Image backup option to do that (Control Panel / Backup). This will allow you to restore the entire system to a new hard disk in one go in case of a fatal hard disk failure. You will probably need to restore your database afterwards as well to get to the most recent state of the database.
There are probably more issues and things to take care of in a true Windows Server 2008/2012 server machine backup, consult the Microsoft pages for that. E.g. http://technet.microsoft.com/en-us/library/jj713536.aspx