Author |
Topic |
goalie2
Starting Member
3 Posts |
Posted - 2009-11-26 : 11:02:31
|
Folks, what is the difference between the above? I know .bak is a backup file but not sure what the other two are for? Cheers Derek |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2009-11-26 : 11:08:01
|
.mdf is the primary data file of a SQL database. .ldf is the transaction log file of a SQL database--Gail ShawSQL Server MVP |
 |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2009-11-26 : 18:04:41
|
the .bak contains both the mdf and ldf files |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
goalie2
Starting Member
3 Posts |
Posted - 2009-11-27 : 03:09:42
|
Tara, so I shouldn't need to backup the mdf and ldf files aty night only the bak ones? |
 |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2009-11-27 : 04:20:37
|
ok. tnx 4d info |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2009-11-27 : 05:06:09
|
quote: Originally posted by goalie2 Tara, so I shouldn't need to backup the mdf and ldf files aty night only the bak ones?
Correct. You can't really do a file-level backup of the mdf and ldf, as they're locked by SQL Server while it's running. While there are tools that can backup open files, very often if the mdf and ldf are 'backed up' that way, they're not usable afterwards.Schedule SQL backups (generating a .bak file) regularly. How often depends on how important the data is and when you have maintenance time to do the backups. Also look at log and differential backups if your DB is large or allowable data loss is very small.Back those backup files to tape/remote storage.--Gail ShawSQL Server MVP |
 |
|
goalie2
Starting Member
3 Posts |
Posted - 2009-11-27 : 05:35:38
|
Thank you very much Gail for the info. I now know where to start with my backup procedures. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
behrman
Yak Posting Veteran
76 Posts |
|
|