PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > Problem Entering Item Into A Table
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Problem Entering Item Into A Table

Réponse
 
LinkBack Outils de la discussion
Vieux 09/10/2008, 22h41   #1
Neil
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Problem Entering Item Into A Table

Having trouble with inserting a record into a table. It's a list of names.
But, for some reason, it won't take a particular name. When a user tries to
enter a name into the table, the system hangs (users are using Access 2000
via ODBC linked table).

I went into QA (SQL 7) and tried an Insert Into statement, but I got the
same result from QA: the system just hung. No error message. After 5
minutes, the query was still trying to execute.

There's no problem entering any other name into the table. Also, I have a
copy of the database on my development machine. And on my development
machine copy, there's no problem entering this name.

So something must have happened when the user was entering this name that's
causing the live copy of the database to reject the name, though, since it
works on my machine, there's nothing intrinsically wrong about the name in
terms of violating any rules.

Ideas?

Thanks!

Neil


  Réponse avec citation
Vieux 09/10/2008, 23h13   #2
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem Entering Item Into A Table

Neil (nospam@nospam.net) writes:
> Having trouble with inserting a record into a table. It's a list of
> names. But, for some reason, it won't take a particular name. When a
> user tries to enter a name into the table, the system hangs (users are
> using Access 2000 via ODBC linked table).
>
> I went into QA (SQL 7) and tried an Insert Into statement, but I got the
> same result from QA: the system just hung. No error message. After 5
> minutes, the query was still trying to execute.
>
> There's no problem entering any other name into the table. Also, I have a
> copy of the database on my development machine. And on my development
> machine copy, there's no problem entering this name.


Check for blocking with sp_who2. Run your INSERT, and then in another
window run sp_who. Check for numbers in the Blk column, that's the spid
of the blocker. Locate the client of that spid, find the form that is
open, and on that form find a combo with many elements. Scroll to the
bottom of that combo. Go back to the INSERT window. The name should now
be inserted.

This happens because when a combo is linked against a column, Access
does not complete the query, and if there are more than approx 450 rows,
some data remains unfetch in SQL Server, causing locks to be remained.


Disclaimer: I have never worked with Access, but I've seen this
discussed on the newsgroups in the past, so this certainly is a bit
of speculation. But I'm quite confident that this is a blocking issue.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

  Réponse avec citation
Vieux 09/10/2008, 23h54   #3
Neil
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem Entering Item Into A Table


"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns9B32EF064AE4BYazorman@127.0.0.1...
> Neil (nospam@nospam.net) writes:
>> Having trouble with inserting a record into a table. It's a list of
>> names. But, for some reason, it won't take a particular name. When a
>> user tries to enter a name into the table, the system hangs (users are
>> using Access 2000 via ODBC linked table).
>>
>> I went into QA (SQL 7) and tried an Insert Into statement, but I got the
>> same result from QA: the system just hung. No error message. After 5
>> minutes, the query was still trying to execute.
>>
>> There's no problem entering any other name into the table. Also, I have a
>> copy of the database on my development machine. And on my development
>> machine copy, there's no problem entering this name.

>
> Check for blocking with sp_who2. Run your INSERT, and then in another
> window run sp_who. Check for numbers in the Blk column, that's the spid
> of the blocker. Locate the client of that spid, find the form that is
> open, and on that form find a combo with many elements. Scroll to the
> bottom of that combo. Go back to the INSERT window. The name should now
> be inserted.
>
> This happens because when a combo is linked against a column, Access
> does not complete the query, and if there are more than approx 450 rows,
> some data remains unfetch in SQL Server, causing locks to be remained.
>
>
> Disclaimer: I have never worked with Access, but I've seen this
> discussed on the newsgroups in the past, so this certainly is a bit
> of speculation. But I'm quite confident that this is a blocking issue.
> --


Thanks, Erland! I found the process that was blocking; but I couldn't
determine whose client that was (all users use the same SQL login through
the linked tables, and the Host column wasn't very ful. But I did a Kill
Process on the process that was blocking, and then the query completed. So
thanks!

Question, though: when I did Kill Process, the process didn't go away. After
doing a Refresh under Current Activity (in Enterprise Manager), it still
showed the process same as before; but the process was no longer blocking
the other one. Any idea why the process still showed after doing a Kill
Process?

Also, re:

> Locate the client of that spid, find the form that is
> open, and on that form find a combo with many elements. Scroll to the
> bottom of that combo. Go back to the INSERT window. The name should now
> be inserted.


When you say "find the form that is open," are you referring to in my Access
app or elsewhere?

Thanks!

Neil


  Réponse avec citation
Vieux 10/10/2008, 01h31   #4
Roy Harvey (SQL Server MVP)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem Entering Item Into A Table

On Thu, 9 Oct 2008 16:54:15 -0500, "Neil" <nospam@nospam.net> wrote:

>Question, though: when I did Kill Process, the process didn't go away. After
>doing a Refresh under Current Activity (in Enterprise Manager), it still
>showed the process same as before; but the process was no longer blocking
>the other one. Any idea why the process still showed after doing a Kill
>Process?


Probably doing a ROLLBACK of whatever changes it was in the middle of.
ROLLBACK can take longer than the original change, as it is not as
thoroughly optimized.

Roy Harvey
Beacon Falls, CT
  Réponse avec citation
Vieux 10/10/2008, 09h21   #5
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem Entering Item Into A Table

Neil (nospam@nospam.net) writes:
> Question, though: when I did Kill Process, the process didn't go away.
> After doing a Refresh under Current Activity (in Enterprise Manager), it
> still showed the process same as before; but the process was no longer
> blocking the other one. Any idea why the process still showed after
> doing a Kill Process?


Presumably someone else connected and got that spid.

> When you say "find the form that is open," are you referring to in my
> Access app or elsewhere?


Access. The issue I referred to about a combo is an Access issue.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h17.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11700 seconds with 13 queries