May 3, 2011 at 12:40 am
:-)Can we set the VLFs(Virtual Log file) on our own wish...or May We know how much VLFs is currently using by our log file.
If yes:Will this number be same for all databases log file?
Thanks
May 3, 2011 at 1:10 am
The Database Engine chooses the size of the virtual log file dynamically when log files are created or extended, so you should not able to manully modify virtual log file size.
http://msdn.microsoft.com/en-us/library/ms178037.aspx
http://msdn.microsoft.com/en-us/library/ms179355.aspx
However, you could view virutal log files status with command DBCC LOGINFO. This will give you information about your virtual logs inside your transaction log. The primary thing to look at here is the Status column. Since this file is written sequentially and then looped back to the beginning, you want to take a look at where the value of "2" is in the output. This will tell you what portions of the log are in use and which are not in use Status = 0. Another thing to keep an eye on is the FSeqNo column. This is the virtual log sequence number and the latest is the last log. If you keep running this command as you are issuing transactions you will see these numbers keep changing.
May 3, 2011 at 1:27 am
Thanks...
Can a database exist without Ldf.
Thanks
May 3, 2011 at 1:31 am
No, SQL Server need LDF file. The .ldf file stores the transaction log information used to recover data in disaster recovery scenarios.
May 3, 2011 at 2:01 am
Not just disaster recovery. The log is used for transaction rollbacks and restart-recovery, among other things.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply