Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Rebuild Index job failing

Author  Topic 

ksr39
Posting Yak Master

193 Posts

Posted - 2012-06-05 : 14:08:35
Hi Experts,

There is a Index Rebuild job running every saturday late night, i found that it is getting failed due to one column which is stopping it, please go through the below error which i found in the log's.

Executed as user: XYZ\ABCDEF. ...ackage Utility Version 9.00.5000.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 10:25:47 AM Progress: 2012-06-04 10:25:53.40 Source: {456E60F3-039D-4887-A4B7-9D1CC465CD9E} Executing query "DECLARE @Guid UNIQUEIDENTIFIER EXECUTE msdb..sp_ma".: 100% complete End Progress Error: 2012-06-04 10:32:44.99 Code: 0xC002F210 Source: Rebuild Index 1 Execute SQL Task Description: Executing the query "ALTER INDEX [PK__acctyp_v2__3E69B4A9] ON [dbo].[acctyp_v2] REBUILD WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, SORT_IN_TEMPDB = OFF, ONLINE = ON ) " failed with the following error: "Online index operation cannot be performed for index 'PK__acctyp_v2__3E69B4A9' because the index contains column 'ldap_access_group' of data type text, ntext, image, varchar(max), nvarchar(max), varbinary(max) or xml. For non-clustered index the column cou. The step failed.

do I need to run the Index Rebuild job with online option off, if so then it will make a problem for the users when the job is running.
Please let me know what to be done.

Thank you in Advance

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-06-05 : 14:11:02
Yes, you'll have to turn off online indexing. You could also just reorganize/defragment the index, that's an online operation, and if there's little fragmentation it will run faster than a full rebuild.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-05 : 14:18:53
This is a prime example of why you should use custom code to do the index rebuilds. Custom code can determine when to use online and when to use offline.

Here's an example of such code (mine): http://weblogs.sqlteam.com/tarad/archive/2009/11/03/DefragmentingRebuilding-Indexes-in-SQL-Server-2005-and-2008Again.aspx

There are several other authors of code like this, such as Ola Hallengren and Michelle Ufford.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ksr39
Posting Yak Master

193 Posts

Posted - 2012-06-05 : 14:20:39
Thank you for the quick response. will the offline indexing will create any issues for the users.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-05 : 14:31:27
quote:
Originally posted by ksr39

Thank you for the quick response. will the offline indexing will create any issues for the users.



Yes. The index will be offline during the operation. Use custom code instead to avoid this for those indexes that can be done online.

Or use REORGANIZE instead.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ksr39
Posting Yak Master

193 Posts

Posted - 2012-06-05 : 15:00:23
Thank you Tara for your valuable information.
Go to Top of Page
   

- Advertisement -