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


Rebuild Index Task fails in Maintenance Plan


Rebuild Index Task fails in Maintenance Plan

Author
Message
Senthil-437023
Senthil-437023
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 14
Hi Friends,

I am new to SQL Server Administration.

I have created the Daily Maintenance plan as below and the Rebuild Index task fails once in a week.

Backup Database Task - All Databases --> Maintenance Cleanup Task - Older than 1 weeks --> Check Database Integrity Task - Include Indexes --> Shrink Database Task - All Databases --> Rebuild Index Task - Object Tables and Views --> Update Statistics Full Scan

Now once or twice in a week the Rebuild Index Task is fails as below

FailedSad-1073548784) Executing the query "ALTER INDEX [PK_TestSet_Now] ON [dbo].[TestSet_Now] REBUILD WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, SORT_IN_TEMPDB = OFF, ONLINE = OFF )
" failed with the following error: "Transaction (Process ID 66) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Kindly do let help me on this to get it resolved.

Regards
Senthil
Deepak Sahu
Deepak Sahu
Mr or Mrs. 500
Mr or Mrs. 500 (545 reputation)Mr or Mrs. 500 (545 reputation)Mr or Mrs. 500 (545 reputation)Mr or Mrs. 500 (545 reputation)Mr or Mrs. 500 (545 reputation)Mr or Mrs. 500 (545 reputation)Mr or Mrs. 500 (545 reputation)Mr or Mrs. 500 (545 reputation)

Group: General Forum Members
Points: 545 Visits: 236
The reindex job is failing because the other process(from other job scheduled) may be causing blocking on the tables\databases.so probably you can reschedule the reindex job.

Thanks,
Deepak Sahu
Senthil-437023
Senthil-437023
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 14
Thanks Deepak for your speedy update.

No other Job's are Scheduled in the Maintenance Plan. Also i am attaching the Screenshot of the rebuild index task. Let me know if anything has to be done.

Thanks
Senthil
Attachments
Rebuild Index Task.png (81 views, 5.00 KB)
subbu_e
subbu_e
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1695 Visits: 173
if any of your application hold an lock while the rebuild index running on. if no other job creating a problem try to create trace only for deadlock to find which process or sp ,query creating an deadlock issuse.

Regards,
Subbu
http://mssqlforum.wordpress.com

Regards,
Subbu
Click here to Get Speedy answer or solution
Senthil-437023
Senthil-437023
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 14
Thanks Subbu,

Could you please instruct me to create a trace for deadlock to find the process.

Regards
Senthil
subbu_e
subbu_e
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1695 Visits: 173
you can configure them by using an interface

open the SQL Server profiler > File > NeW Trace
it will ask you the Credential the server you want to trace upon sucessfull login it will open up the Trace Properties Window , here you need to select the Template TSQL_lock will have the deadlock events you can select and run the trace do not forgot to select the Deadlock chain , will have the detail information about the deadlock.

Note : Running a trace is resource intensive process. please run this from the different machine don't run them on the Production Servers

Regards,
Subbu
Click here to Get Speedy answer or solution
Senthil-437023
Senthil-437023
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 14
Thanks subbu.
:-)
Senthil-437023
Senthil-437023
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 14
Noticed that Everyday my Maintenance Plan log is empty as below when the tasks Succeeded. The Maintenance Plan has the following tasks

Backup Database Task --> Maintenance Cleanup Task --> Check Database Integrity Task --> Shrink Database Task --> Rebuild Index Task --> Update Statistics Full Scan

Log:
===
Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.1399
Report was generated on "VERSIONONE-NEW".
Maintenance Plan: V1MaintenancePlan
Duration: 00:00:00
Status: Succeeded.
Details:

When the rebuild index task fails the complete log is available, otherwise the log will be empty.

Please let me know what could be the issue and how to solve this.
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