SQL Sever Trans Log

I am attending a SQL Server 2005 class, and have already learned a few new things. First of which is what SQL server does when you execute T-SQL commands. I would presume that it takes the command, interprets it and then persists the data to memory, writes the trans log, and eventually persist the memory to disk. Well this is not the case! From what I understand, the first thing it does after interpreting the commands, is write the instruction set to the transaction log. it then plays the transaction log back to apply to the db in memory. The last step would be to persist the in memory db to disk. This is pretty neat to know and kinda makes sense. The trans log is used for point in time recovery thus it makes perfect sense to write to this first. Another reason this is important information to know is because it has an impact on how you would setup a certain kinda of trigger (more on that later). This peek into how SQL server works under the hood is good to know, as all sorts of things make sense now. This explains several aspects of database maintenance planning and the importance of the trans log. Before I thought it was a simple standard log of what went on. Now I understand that the trans log is the actual working file for SQL Server. The trans log is basically a recorded macro file. This means that you can do "playback" from the trans log thus its importance in point in time recovery. Cool stuff!!

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner