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 > ms.sqlserver.server > SQL 2005 - lLter Index hangs
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
SQL 2005 - lLter Index hangs

Réponse
 
LinkBack Outils de la discussion
Vieux 15/07/2008, 17h09   #1
frankm
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut SQL 2005 - lLter Index hangs

I have a table with just 75,000 rows that has 1 column as the PK. When I
attempted to run the rebuild command (either through a maintenance plan or
directly running the sql, the process would run many hours (6-8) and
sometimes it did not end at all. This locks the table so that it cannot be
accessed. Code below.

ALTER INDEX [Container_PK] ON [Container] REBUILD WITH ( PAD_INDEX = OFF,
STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON,
SORT_IN_TEMPDB = ON, ONLINE = OFF )

No one else is using the db.
The process viewer just shows "SUSPENDED" with tbl locks and ever increasing
waittimes.
Any ideas, I'm stumped. There is more than enough room for tempdb, tempdb
doesn't even grow in this period.
My solution was to drop and recreate the table, this worked. But it doesn't
explain what happened and why.
Checkdb showed nothing.

Version 2005 SP2+Q934459 9.00.3159

Thanks in advance

frankm


  Réponse avec citation
Vieux 15/07/2008, 17h14   #2
TheSQLGuru
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL 2005 - lLter Index hangs

1) what is the average row size?

2) does the table contain a lot of blob data?


--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"frankm" <frankm@nospam.postalias> wrote in message
news:hL6dnZylSpYDIOHVnZ2dnUVZ_rrinZ2d@centurytel.n et...
>I have a table with just 75,000 rows that has 1 column as the PK. When I
>attempted to run the rebuild command (either through a maintenance plan or
>directly running the sql, the process would run many hours (6-8) and
>sometimes it did not end at all. This locks the table so that it cannot be
>accessed. Code below.
>
> ALTER INDEX [Container_PK] ON [Container] REBUILD WITH ( PAD_INDEX = OFF,
> STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON,
> SORT_IN_TEMPDB = ON, ONLINE = OFF )
>
> No one else is using the db.
> The process viewer just shows "SUSPENDED" with tbl locks and ever
> increasing waittimes.
> Any ideas, I'm stumped. There is more than enough room for tempdb, tempdb
> doesn't even grow in this period.
> My solution was to drop and recreate the table, this worked. But it
> doesn't explain what happened and why.
> Checkdb showed nothing.
>
> Version 2005 SP2+Q934459 9.00.3159
>
> Thanks in advance
>
> frankm
>



  Réponse avec citation
Vieux 15/07/2008, 17h25   #3
frankm
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL 2005 - lLter Index hangs

1) ~900 bytes
2) no blobs (text, image etc)


"TheSQLGuru" <kgboles@earthlink.net> wrote in message
news:p_ydnfR88606I-HVnZ2dnUVZ_s7inZ2d@earthlink.com...
> 1) what is the average row size?
>
> 2) does the table contain a lot of blob data?
>
>
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
>
> "frankm" <frankm@nospam.postalias> wrote in message
> news:hL6dnZylSpYDIOHVnZ2dnUVZ_rrinZ2d@centurytel.n et...
>>I have a table with just 75,000 rows that has 1 column as the PK. When I
>>attempted to run the rebuild command (either through a maintenance plan or
>>directly running the sql, the process would run many hours (6-8) and
>>sometimes it did not end at all. This locks the table so that it cannot be
>>accessed. Code below.
>>
>> ALTER INDEX [Container_PK] ON [Container] REBUILD WITH ( PAD_INDEX = OFF,
>> STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
>> ON, SORT_IN_TEMPDB = ON, ONLINE = OFF )
>>
>> No one else is using the db.
>> The process viewer just shows "SUSPENDED" with tbl locks and ever
>> increasing waittimes.
>> Any ideas, I'm stumped. There is more than enough room for tempdb, tempdb
>> doesn't even grow in this period.
>> My solution was to drop and recreate the table, this worked. But it
>> doesn't explain what happened and why.
>> Checkdb showed nothing.
>>
>> Version 2005 SP2+Q934459 9.00.3159
>>
>> Thanks in advance
>>
>> frankm
>>

>
>



  Réponse avec citation
Vieux 16/07/2008, 08h01   #4
Charles Wang [MSFT]
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL 2005 - lLter Index hangs

Hi Frankm,
Altering index with ONLINE=OFF will hold a table lock on the table. I
recommend that you run "SELECT * FROM sys.dm_tran_locks" to check if there
are any locks that may cause a dead lock. Also I recommend that you check
if your database recovery mode is FULL in which case the INDEX operation
will be fully logged, this will also impact your performance. You may
change the database recovery mode to SIMPLE or BULK_LOGGED to see if it
s. You can check your database recovery mode by running:
SELECT DATABASEPROPERTYEX('database name','Recovery');

To change the recovery mode, you can run:
ALTER DATABASE database_name SET RECOVERY SIMPLE;
GO

You may also refer to this KB article to monitor blocking in SQL Server
2005:
How to monitor blocking in SQL Server 2005 and in SQL Server 2000
http://support.microsoft.com/kb/271509/en-us

If you have any other questions or concerns, please feel free to let me
know. Have a nice day!


Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======




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


É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,11040 seconds with 12 queries