Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2005, 04:27 PM
Authorized User
 
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to hlchuah77
Default How to implement locks and timestamp protocol?

Hi, I want to know whether sql server 2000 can implement locks and timestamp protocol for concurrency control. If yes, how to implement it?

 
Old January 23rd, 2005, 10:50 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Please provide a few examples of your task.

Jaime E. Maccou
 
Old January 23rd, 2005, 12:36 PM
Authorized User
 
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to hlchuah77
Default

Actually I am trying to update data from two different PCs at almost the same time, so how can I have concurrency control in sql server 2000 so to ensure serializability.

For example, if two users from two different PCs are updating data to sql server at exactly the same time, how sql server knows which data is updated first? I just want to know how to configure sql server to ensure concurrency.

 
Old January 23rd, 2005, 02:18 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

The SQL Server query optimizer automatically makes the correct determination and issue a record lock on the first to grab the record. If you want to change the default behavior you must issue table, record lock hints.

If you look on books online it will tell how to issue these lock hints to ensure concurrency.

I hope this helps

Jaime E. Maccou
 
Old January 23rd, 2005, 02:31 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Additional: you may look up information on setting the TRANSACTION ISOLATION LEVEL Change certain lock may also escalate the locking process.

Jaime E. Maccou
 
Old January 24th, 2005, 03:15 PM
Authorized User
 
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to hlchuah77
Default

Thanks a lot, jemacc. I will try on that. :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access locks up after multiple emails sent Paulsh Access VBA 2 December 30th, 2005 03:20 PM
Clearing record level locks IronStar MySQL 1 July 5th, 2005 08:58 PM
ASP.Net application times out, locks up computer davidayres VS.NET 2002/2003 0 March 18th, 2005 11:30 AM
Locks on my access db in win xp patricolsson Classic ASP Databases 6 December 17th, 2003 09:31 AM
¿Record Locks? Concurrency Multiple Users p_nut33 ADO.NET 0 November 18th, 2003 10:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.