Friday, February 17, 2012

Concurrency problem

Users A and B execute a simple "SELECT FROM ..." statement at the same
time.Both concurrent requests on SQL server 2000 fail with an error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC
SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access
denied.
The SQL requests are from ASP page on a shared SQL server. How do I enable
several users execute my sql statements at the same time (only reading
data). Is locking
causing this problem or something else? Should I use WITH(UNLOCK)?
Jared Burford
Computer IT/Support
support@.megatech-pc.comThe error has nothing to do with locking. Check the connection and if the
users have rights to access the databse and the table.
AMB
"Jared Burford" wrote:

> Users A and B execute a simple "SELECT FROM ..." statement at the same
> time.Both concurrent requests on SQL server 2000 fail with an error messag
e:
> Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC
> SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access
> denied.
> The SQL requests are from ASP page on a shared SQL server. How do I enable
> several users execute my sql statements at the same time (only reading
> data). Is locking
> causing this problem or something else? Should I use WITH(UNLOCK)?
>
> Jared Burford
> Computer IT/Support
> support@.megatech-pc.com
>
>|||It works ok with one, but fails with more than one user
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:BF533DFA-EC96-4B46-89CD-FE3CD47FFB3C@.microsoft.com...
> The error has nothing to do with locking. Check the connection and if the
> users have rights to access the databse and the table.
>
> AMB
> "Jared Burford" wrote:
>|||just a quick note: both are trying to access the same table which takes in
exxcess of 30 secs.
"Jared Burford" <support@.megatech-pc.com> wrote in message
news:eqGN$IkVFHA.548@.tk2msftngp13.phx.gbl...
> It works ok with one, but fails with more than one user
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
> message news:BF533DFA-EC96-4B46-89CD-FE3CD47FFB3C@.microsoft.com...
>|||Do u think SELECT ... WITH(NOLOCK) ... can help?
If u only want to do dirty read, i think this is fine for u.
"Jared Burford" wrote:

> just a quick note: both are trying to access the same table which takes in
> exxcess of 30 secs.
> "Jared Burford" <support@.megatech-pc.com> wrote in message
> news:eqGN$IkVFHA.548@.tk2msftngp13.phx.gbl...
>
>|||Problem solved... I just open tabe, read it, and close, it, set the flag on
that one so it won't check it next time, and move to the next, and repeat.
This way other uses can read the same table without getting stuck.
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:BF533DFA-EC96-4B46-89CD-FE3CD47FFB3C@.microsoft.com...
> The error has nothing to do with locking. Check the connection and if the
> users have rights to access the databse and the table.
>
> AMB
> "Jared Burford" wrote:
>

No comments:

Post a Comment