Databases Reference
In-Depth Information
Figure 5-6
Start the Profiler as configured in Figure 5-5.
From the first query window, execute the following UPDATE to modify a data row in the Address table
of the SQL Server sample database Adventureworks. You are intentionally leaving the transaction open
so that you can trigger the blocking event.
--Connection A
BEGIN TRAN
UPDATE Adventureworks.Person.Address
SET AddressLine1 = '40 Ellis Street'
WHERE AddressLine1 = '40 Ellis St.'
AND City = 'Bothell'
AND PostalCode = '98011'
From the second query window, execute the following query to display the same data row. Since the data
has been blocked by the UPDATE transaction, this query will be blocked.
--Connection B (open another session)
SELECT *
FROM Adventureworks.Person.Address
Search WWH ::




Custom Search