Re: execute SP at same time??

From: hngo01 (hngo01_at_hotmail.com)
Date: 02/26/04


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
>.
>



Relevant Pages

  • Re: execute SP at same time??
    ... functionality is to get a first available record and using ... 2nd application will be running on 3 computers. ... >Because I had placed BEGIN TRANSACTION on procedure ... >Erland Sommarskog, SQL Server MVP, sommar@algonet.se ...
    (microsoft.public.sqlserver.programming)
  • Re: full-Text Search questions
    ... I will search SQL Server BOL for information. ... TopCo Site / Employees ... The functionality in STS was to search the entire set of sites. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Return subquery rows as one delimited column
    ... and concatenates them together - this will be very slow!! ... For SQL Server 2005, there's a method that uses documented functionality ...
    (comp.databases.ms-sqlserver)
  • Re: I have two questions about the TableAdapter Configuration Wizard
    ... something to do with the difficulty in adding functionality to VS2005. ... Hitchhiker's Guide to Visual Studio and SQL Server ... I want to have a TableAdapter that encapsulates a bunch of stored ... I might have 10 delete sprocs that I want to put into one ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Very basic login question
    ... In order to use Windows Authentication the two computers have to be members of the same domain or trusted domains. ... you should have a login at the SQL Server on the XP Pro workstation. ...
    (microsoft.public.sqlserver.security)