Link to home
Start Free TrialLog in
Avatar of rwheeler23
rwheeler23Flag for United States of America

asked on

SQL Locate data log files

I understand how SQL has data files and log files. Now let's say we have the recovery model set to full and transaction log backups are done every hour. People make changes to a customer record once every hour over a five hour period. Now I come along and look for data for this customer. SQL goes into the index to get the original data but then what does it do to get the msot recent version? Does it go though each transaction log file to get the final version?
Avatar of sventhan
sventhan
Flag of United States of America image

If the data is available (committed/checkpoint)  then it comes from the datafile. Whenever checkpoint happen the committed data is flushed from the log file to data file.

Mostly you will not touch the transaction log file when you search for the data.
ASKER CERTIFIED SOLUTION
Avatar of sventhan
sventhan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial