MasterRacker
New member
I'm easing into maintenance plans on a SQL 2005 server with about 10 DBs on it. One of the first things I ran into was a rebuild index failing on one of the DBs. These are all commercial products, so I won't be able to actually change anything in the DB, but I would like to understand what this problem is so I've included the log below.
Eventually, given time, I plan to look at creating individual plans tailored to the quirks of each DB, but for now I've removed the rebuild index task so I have a general plan for all user DBs that checks consistency, reorganizes indexes and backs up. That seems pretty safe. Comments?
This seems to be saying I can rebuild the index, but have to take the DB offline to do it. Is this common?
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
Eventually, given time, I plan to look at creating individual plans tailored to the quirks of each DB, but for now I've removed the rebuild index task so I have a general plan for all user DBs that checks consistency, reorganizes indexes and backs up. That seems pretty safe. Comments?
Code:
Rebuild Index Task (XXXXX)
Rebuild index on Local server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Object: Tables and views
Original amount of free space
Task start: 2009-07-22T15:33:33.
Task end: 2009-07-22T15:33:34.
Failed:(-1073548784) Executing the query "ALTER INDEX [PK_ANIMALS] ON [dbo].[ANIMALS] 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_ANIMALS' because the index contains column 'NOTES' of data type text, ntext, image, varchar(max), nvarchar(max), varbinary(max) or xml. For non-clustered index the column could be an include column of the index, for clustered index it could be any column of the table. In case of drop_existing the column could be part of new or old index. The operation must be performed offline.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]