Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 22nd, 2005, 04:27 PM
Authorized User
 
Join Date: Jun 2004
Location: Georgetown, Selangor, Malaysia.
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?

Reply With Quote
  #2 (permalink)  
Old January 23rd, 2005, 10:50 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
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
Reply With Quote
  #3 (permalink)  
Old January 23rd, 2005, 12:36 PM
Authorized User
 
Join Date: Jun 2004
Location: Georgetown, Selangor, Malaysia.
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.

Reply With Quote
  #4 (permalink)  
Old January 23rd, 2005, 02:18 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
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
Reply With Quote
  #5 (permalink)  
Old January 23rd, 2005, 02:31 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
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
Reply With Quote
  #6 (permalink)  
Old January 24th, 2005, 03:15 PM
Authorized User
 
Join Date: Jun 2004
Location: Georgetown, Selangor, Malaysia.
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. :)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:55 AM.


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