what is relation between mdf and ldf.If my ldf is on drive C and mdf is on drive D.then in case of file group running out of space I need to create space on D.But in some of cases when I shrink ldf on C the file group space alert goes of autometically.what login is this?
The MDF is the SQL Server database data file; the LDF is the transaction log file.
My first reaction would be to check that your backups are running properly - you should, as well as doing Full backups, be periodically backing up the transaction log (assuming your database isn't in SIMPLE recovery mode).
If the TLogs are being backed up regularly, and you're still getting the problem, then it may be that either you've not got sufficient space for the TLog to grow itself (or you've disabled autogrowth), or you need to reconsider the frequency at which you're doing TLog backups, or you've got some outstanding transaction that's causing issues.
answered May 04 '12 at 03:10 PM
If all you have are the two files then, by default, they work like this. The mdf is a data file. That's where all your data and structures and stored procedures, etc., are stored for the database in question. The ldf is a log file. That stores the transaction logs for the database. Every transaction gets written to the log. Then, depending on the recovery model, they either get cleaned off automatically (for Simple recovery) or you have to run a log backup (for Bulk Logged & Full recovery).
The filegroup is an additional management mechanism that you can use to rearrange groups of files if you have multiple files assigned to your database. In your case, with only a single .mdf file, you'll only have the default filegroup. If the filegroup is running out of space, it's probably referring to the data file on your D: drive, but it could be that you have limited file growth on one or both files which could also spawn the error.
I don't understand wht you mean by "What login is this?" These are files stored on disks and have no relations directly to logins in your SQL Server instance.
answered May 04 '12 at 03:12 PM
Grant Fritchey ♦♦