SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Reorganize Index Task


Reorganize Index Task

Author
Message
lkarthikraj-609584
lkarthikraj-609584
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 38
Hi,

While running maintenance plan for reoranizing the index for user database we are getting the following error

"FailedSad-1073548784) Executing the query "ALTER INDEX [PK__EventStage__46AF6B36] ON [Event].[EventStage] REORGANIZE WITH ( LOB_COMPACTION = OFF )
" failed with the following error: "Cannot find index 'PK__EventStage__46AF6B36'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

Please help us to resolve this issue.

The error occurs while reorganizing the index for operations manager database.

Regards,
Karthikraj.L
GilaMonster
GilaMonster
SSC Guru
SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)

Group: General Forum Members
Points: 220391 Visits: 46279
Please run the following query in that database. What does it return?

SELECT count(*) from sys.objects
where name = 'PK__EventStage__46AF6B36'

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Abhijit More
Abhijit More
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1959 Visits: 767
Also verify whether index exists or not from below query...

SELECT * FROM sys.indexes WHERE name = 'PK__EventStage__46AF6B36'

Abhijit - http://abhijitmore.wordpress.com
Looser Ivo
Looser Ivo
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 71
We have the same Problem. Take a look here http://www.eggheadcafe.com/software/aspnet/30972265/optimization--index-prob.aspx

I removed the OperationsManagerDW from Indexing.
Rob44
Rob44
SSC-Enthusiastic
SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)

Group: General Forum Members
Points: 155 Visits: 14
Let's suppose the command returns 0! What's the next step if the rebuild of the index in the maintenance plan is unsuccessful?
Bhuvnesh
Bhuvnesh
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13030 Visits: 4077
Rob44 (3/8/2010)
Let's suppose the command returns 0! What's the next step if the rebuild of the index in the maintenance plan is unsuccessful?

We can give manual run to
ALTER INDEX [PK__EventStage__46AF6B36] ON [Event].[EventStage] REORGANIZE WITH ( LOB_COMPACTION = OFF )

and see if problem persists or not

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Paul White
Paul White
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34954 Visits: 11359
lkarthikraj-609584 (1/12/2009)
Cannot find index 'PK__EventStage__46AF6B36'

That's the problem with relying on system-generated names for constraints, such as primary keys.
You would think Microsoft would know better.


USE tempdb;
GO
CREATE TABLE #SystemGenerated
(
-- No constraint name specified
row_id INTEGER IDENTITY NOT NULL PRIMARY KEY
);
GO
CREATE TABLE #Explicit
(
row_id INTEGER IDENTITY NOT NULL,

-- Explicitly named constraint
CONSTRAINT [PK #Explicit row_id]
PRIMARY KEY CLUSTERED (row_id ASC)
WITH (FILLFACTOR = 100)
ON [PRIMARY]
);
GO
-- Show primary key details
SELECT constraint_name = name,
type_desc,
is_system_named,
table_schema = SCHEMA_NAME([schema_id]),
table_name = OBJECT_NAME(parent_object_id)
FROM sys.key_constraints
WHERE parent_object_id = OBJECT_ID(N'tempdb..#SystemGenerated', N'U')
OR parent_object_id = OBJECT_ID(N'tempdb..#Explicit', N'U');
GO
-- Clean up
DROP TABLE
#SystemGenerated,
#Explicit;



Paul



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
sudhakara
sudhakara
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2350 Visits: 1386
Bhuvnesh (3/10/2010)
Rob44 (3/8/2010)
Let's suppose the command returns 0! What's the next step if the rebuild of the index in the maintenance plan is unsuccessful?

We can give manual run to
ALTER INDEX [PK__EventStage__46AF6B36] ON [Event].[EventStage] REORGANIZE WITH ( LOB_COMPACTION = OFF )

and see if problem persists or not


Hi ,

its working fine while running this on query analyzer. issues coming while running the maintanance plan.

Karthik Pls update if you found solution.
sudhakara
sudhakara
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2350 Visits: 1386
sudhakara (6/6/2010)
Bhuvnesh (3/10/2010)
Rob44 (3/8/2010)
Let's suppose the command returns 0! What's the next step if the rebuild of the index in the maintenance plan is unsuccessful?

We can give manual run to
ALTER INDEX [PK__EventStage__46AF6B36] ON [Event].[EventStage] REORGANIZE WITH ( LOB_COMPACTION = OFF )

and see if problem persists or not


Hi ,

its working fine while running this on query analyzer. issues coming while running the maintanance plan.

Karthik Pls update if you found solution.



Simulated and Fixed: There is a DTS job for creating and dropping the objects in the database everyday at perticular time. This has been found by using the schema change report in sql server 2005 and fixed by changing the job time of the Reorganize index.
TheSQLGuru
TheSQLGuru
SSC-Dedicated
SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)

Group: General Forum Members
Points: 31689 Visits: 8671
I would say to stop using the maintenance plans for maintenance activities. Use Ola Hallengren's stuff instead. Sooooo much better!

http://ola.hallengren.com/

Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search