which data can be stored in log files i.e commited or uncommited?
-
Wednesday, August 22, 2012 4:12 PM
hi sir,
plz expline exact which data can be stored in log files?
i.e coomiteddata
or
uncommited data
sir iam self lerning sa sqldba plz briefly explaine which data can be stored in which files.
Regards:
Bhaskar
All Replies
-
Wednesday, August 22, 2012 4:54 PM
plz expline exact which data can be stored in log files?
Hello Bahskar,
Youself can't store anything directly in the log file, it's utilized by SQL Server to handle transaction data.
See MSDN The Transaction Log (SQL Server) and follow up links.
- Edited by Olaf HelperMicrosoft Community Contributor Wednesday, August 22, 2012 4:54 PM
- Marked As Answer by Shulei ChenModerator Thursday, August 30, 2012 9:30 AM
-
Wednesday, August 22, 2012 10:55 PM
You can store both commited or uncommited type of data in log files of database. But recycle of ldf depands on database recovery model.
- Full recovery model - Every commited or uncommited data stores in log file > data commited & log backup occure > Log file become empty for reuse
- Bulk-logged recovery model - Every commited or uncommited data stores in log file depand on bulk opearation or not > data commited & log backup occure > Log file become empty for reuse
- Simple recovery model - Every commited or uncommited data stores in log file > data commited & checkpoint occur > Log file become empty for reuse
Please click the Mark as Answer or Vote As Helpful if a post solves your problem or is helpful!
- Proposed As Answer by vr.babu Monday, August 27, 2012 1:20 PM
- Marked As Answer by Shulei ChenModerator Thursday, August 30, 2012 9:30 AM
-
Friday, August 24, 2012 8:55 AMModerator
plz briefly explaine which data can be stored in which files.
Hi Bhaskar,
SQL Server databases have three types of files:
- Primary data files
The primary data file is the starting point of the database and points to the other files in the database. Every database has one primary data file. The recommended file name extension for primary data file is .mdf. - Secondary data files
Secondary data files make up all the data files, other than the primary data file. Some databases may not have any secondary data files, while others have several secondary data files. The recommended file name extension for secondary data file is .ndf. - Log files
Log files hold all the log information that is used to recover the database. There must be at least one log file for each database, although there can be more than one. The recommended file name extension for log files is .ldf.
For more details, please refer to this article: Files and Filegroups Architecture.
Best Regards,
Ray Chen- Edited by Shulei ChenModerator Friday, August 24, 2012 8:57 AM
- Marked As Answer by Shulei ChenModerator Thursday, August 30, 2012 9:30 AM
- Primary data files

