Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
flynn82
Starting Member
2 Posts |
Posted - 2010-06-05 : 11:04:13
|
| Hello to all fellow SQL Server users! I’ll start with a brief introduction, as I feel it’s a courtesy to introduce yourself before requesting help from your fellow users. My name is Alex, and I’m currently undertaking an Applications Programming course. SQL Server makes up a large part of this course. I must say I am very much enjoying what I have learnt so far. However, as with any computing book, I always have questions that I like to ask, just to ensure I understand everything correctly. I have recently tried Googling answers to the questions I have, but I figured, why not try and search for a forum with dedicated SQL Server users with whom I can directly interact? With more development time spent on SQL Server, I hope I will eventually be able to give something back to this community and offer advice to users within this forum.I am currently reading “Beginning SQL Server 2008 Express for Developers”, and I’m having some problems understanding how the transaction log works. From what I can gather, the transaction log file fills up with actions, these actions being additions/modifications to the data. The book follows this with the following comment:“Some of these actions will still be within a transaction, and others may form part of a completed transaction ready to be committed to the database.”This is the part I’m having some difficulty understanding. I understand that you perform actions such as adding or deleting data, but I do not understand how “some of these actions will still be within a transaction.”The next issue I’m having is with regards to the checkpoint that is issued when the transaction log reaches a predefined size (the book uses 70% as an example). This is the point I am having trouble understanding: a checkpoint ensures that the data modifications are actually committed to the database. So would I be right in thinking that all actions are recorded first within the transaction log, and when this log reaches 70% full (as an example) these actions are THEN committed to the database? With this in mind, let’s say you perform a brief action, such as adding a row to a table, and let’s say that this action doesn’t cause the transaction log to reach 70%. Would the action be committed to the database, or would we have to wait until the transaction log file reached 70%?I hope my questions aren’t too obvious, and I look forward to any help you people might be able to offer.Thanks once again. |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2010-06-05 : 11:37:14
|
| Think of the log as a time machine...it can take you back to a point in time for historyIn one thought, I am impressed with a noob interested in the inner working of sql server...in another, I wonder were you want to go in your development? You are reading a book about developing...I would worry more to begin with about DDL, DML to begin withBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
flynn82
Starting Member
2 Posts |
Posted - 2010-06-08 : 14:45:16
|
| Hi Brett,Thanks for your reply. I think the problem I've got is I'm trying to delve far too much into how the program works, and at the same time, I'm losing track of the true purpose of what I want to achieve: to be able to build solid, reliable databases.Taking your advice into account, it has made me realise what I've been doing wrong all along: I've been trying to understand every aspect of the inner workings of SQL Server where I should instead be concentrating on the T-SQL code and getting use to the SSMSE (the GUI).Thanks for correcting me Brett!Take care,Alex. |
 |
|
|
|
|
|
|
|