Join Simon Allardice for an in-depth discussion in this video Introducing transactions, part of SQL Server 2008 Essential Training.
When we're updating data in our databases we'll often need to work with transactions.…A transaction is an incredibly important thing in the world of databases.…And to understand them the best way is to think about what we think of as a…transaction in the regular world.…If you talk about making a transaction, you often mean something in the world of commerce.…Say you hand over $15 to the bookseller;…the bookseller gives you the book.…That's the transaction.…It's important that both of these things happen. If you hand over the money you…expect to get the book.…
If they hand you the book they expect to get the money.…Either both of these things happen or neither of them do.…In a computing system, a classic example of a transaction is a banking system.…Imagine that you log on to your bank's web site and you want to transfer $1000…from one of your accounts to the other.…That's going to require to update operations. One, to subtract $1000 from…account A, and the next to add $1000 to account B.…
If the first part of this transaction happened and then we tried to add a…
- Using T-SQL (Transact-SQL)
- Managing databases with SQL Server Management Studio
- Understanding database normalization
- Using SELECT statements
- Building indexes
- Monitoring database size and integrity
- Backing up and restoring databases
- Creating functions and stored procedures
- Managing database permissions
- Creating and formatting reports
- Adding charts to reports
- Creating and executing a simple SSIS package
Skill Level Beginner
Q: I'm having problems installing the free Express R2 version of SQL Server on Windows XP. I tried 64-bit and 32-bit versions. In the videos, the author installs from a DVD. Do I need to do the same?
<div>A: While the author installs from a DVD, it's not strictly necessary. There certainly shouldn't be a problem installing the Express edition from a regular download. That's the way it's intended to be installed.</div> <div><br /> </div> <div>If you're using Windows XP, the only officially supported version is the 32-bit version. However, you do need to make sure that your Windows XP install is completely up-to-date and patched, with XP Service Pack 3 installed. (See <a href="http://msdn.microsoft.com/en-us/library/ms143506.aspx#Express32" target="_blank">http://msdn.microsoft.com/en-us/library/ms143506.aspx#Express32</a> for formal requirements.)</div> <div><br /> </div> <div>It's not unusual for the install process to take a while, and with older operating systems like XP, you'll often have to back it out and try again, as usually there's a bunch of prerequisites that need to be installed. (Like the .NET Framework 3.5 SP1, the correct version of Windows Installer, etc.)</div>
Q: The link to the installer for the AdventureWorks sample database, as shown in the Chapter 2 movie "Installing sample databases," no longer works. Where can I find the installer?
A: Microsoft has reorganized its site. The sample files are still there, but they're a bit harder to find. To install them:<br /><br />1) Visit <a target="_blank" href="http://msftdbprodsamples.codeplex.com/">http://msftdbprodsamples.codeplex.com/</a>.<br />2) Click the link to "SQL Server 2008 R2 OLTP."<br />3) Click the AdventureWOkrs2008R2 Data File link and agree to the conditions to download the MDF file.<br />4) Move the MDF file to your SQL Server Directory, usually located at C:\Program Files\Microsfot SQL Server\MSSQL 10_50.MSSQLSERVER\MSSQL\DATA.<br />5) Open the SQL Sever Management Studio and connect to your instance using an account with administrative privileges.<br />6) Attach the sample database by right-clicking the Databases folder in the Object Explorer and choosing Attach from the pop-up menu.<br />7) Click the Add button in the next menu and navigate to the MDF file in the Locate Database Files window that appears. Select it and click OK.<br />8) Remove the reference to the log file in the "AdventureWorks2008R2" database details: pane by selecting the Log entry and clicking removing.*<br />9) Click OK to return to SQL Server Management Studio and complete the attachment process.<br /><br />*MDF files are the "data" files for SQL Server databases. They often come along with LOG files (ldf files). This one didn't so we need to REMOVE the reference to the non-existent log file. Select the second row in the lower section (it should say File Type: Log and Message: Not Found) and click the REMOVE button.<br /><br />For an illustrated version of these instructions (with screenshots), click <a target="_blank" href="http://files2.lynda.com/prodfaqs/351-1761667F-422C/Installing_AdventureWorks_Sample_Databases.pdf">here</a> for a PDF version.
1. Getting Started
2. Installing SQL Server 2008 R2
3. Tools and System Databases
SQL Server system databases2m 22s
4. Creating Databases
5. Importing Existing Data
6. Retrieving Data with SQL
7. Inserting and Updating Data
8. SQL Functions
9. Stored Procedures and Transactions
10. Core Administration Tasks
11. Backing Up and Restoring
12. Security Features
13. Reporting Services
14. Integration Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.