Re: execute SP at same time??
From: hngo01 (hngo01_at_hotmail.com)
Date: 02/26/04
- Next message: hngo01: "Re: execute SP at same time??"
- Previous message: Dejan Sarka: "Re: Storing the result of a EXEC(something) in a variable"
- In reply to: Erland Sommarskog: "Re: execute SP at same time??"
- Next in thread: hngo01: "Re: execute SP at same time??"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 26 Feb 2004 06:55:32 -0800
Overview of my application: I have two small applications.
1st application will be running on two computers. Its
functionality is to get a first available record and using
Account number to get other info such as [scc4PolicyNum]
and [scc4PolicyHolder] from different source. Then update
these fields to the Database.
The whole process takes about 5 seconds.
Seconds PC will do the same thing. (Make sure don't get
the same record with the 1st PC. That's what I have
trouble now!)
2nd application will be running on 3 computers (3 users).
Its functionality is to get a first available record that
UPDATED by the 1st application. Users will read this
record and update more info to the Database.
Here is my table structure. I don't have Index should I
need too. Thank you for your help?
CREATE TABLE [dbo].[tblScc4] (
[AutoKey] [int] IDENTITY (1, 1) NOT NULL ,
[LastName] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstName] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,
[MI] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,
[SSN] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,
[DOB] [datetime] NULL ,
[Account] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,
[Status] [int] NOT NULL ,
[CompleteDateTime] [datetime] NULL ,
[CompletedBy] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ProcessByPC] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ProcessByPCDateTime] [datetime] NULL ,
[StateMedID] [varchar] (10) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Pgm] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[scc4PolicyNum] [varchar] (200) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[scc4PolicyHolder] [varchar] (200) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
>-----Original Message-----
>hngo01 (hngo01@hotmail.com) writes:
>> I appreciated your response
>> Can you please explain to me why you remove "return 0" ?
>
>Because I had placed BEGIN TRANSACTION on procedure
entry, and had
>RETURN 0 remained in place, you would have left the
procedure without
>committing the transaction.
>
>> This method is for table-level locking!!
>> How about for row-level locking method? How do you do
this?
>
>The method is not for table-locking per se, but depending
how you call
>it and which indexes you have, the strategy may lead to
serializing
>access to the table completely.
>
>Since I don't know you application, I cannot really
comment in detail.
>Could you post the CREATE TABLE and CREATE INDEX
statemets for your
>table?
>
>--
>Erland Sommarskog, SQL Server MVP, sommar@algonet.se
>
>Books Online for SQL Server SP3 at
>http://www.microsoft.com/sql/techinfo/productdoc/2000/book
s.asp
>.
>
- Next message: hngo01: "Re: execute SP at same time??"
- Previous message: Dejan Sarka: "Re: Storing the result of a EXEC(something) in a variable"
- In reply to: Erland Sommarskog: "Re: execute SP at same time??"
- Next in thread: hngo01: "Re: execute SP at same time??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|