Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

SQL 2005 Rebuild\Reorganize Indexes with Reports Expand / Collapse
Author
Message
Posted Wednesday, February 18, 2009 3:45 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, May 13, 2014 2:31 PM
Points: 76, Visits: 152
Comments posted to this topic are about the item SQL 2005 Rebuild\Reorganize Indexes with Reports

Farhan F. Sabzaali
PMP, MCP, MCDBA, MCSA, MCSE
Post #659216
Posted Monday, March 16, 2009 6:11 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, December 1, 2009 7:50 AM
Points: 21, Visits: 88
Maybe I am missing a step but this proc doesn't compile.

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 57
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 146
....

edited out numerous errors.
Post #676405
Posted Monday, March 16, 2009 6:54 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, May 13, 2014 2:31 PM
Points: 76, Visits: 152
It seems the script that got published has space unicode characters in it - I am attaching a zip file with compiled query - let me know if that works for you.

Thanks,

Farhan Sabzaali


Farhan F. Sabzaali
PMP, MCP, MCDBA, MCSA, MCSE


  Post Attachments 
ReorgScript-031609.zip (94 views, 9.69 KB)
Post #676434
Posted Monday, March 16, 2009 7:21 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, December 1, 2009 7:50 AM
Points: 21, Visits: 88
That worked great. Very nice job.
Post #676456
Posted Monday, March 16, 2009 8:03 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, August 14, 2014 9:45 PM
Points: 229, Visits: 276
Nice, very comprehensive, lot of work.



Post #676512
Posted Monday, March 16, 2009 9:11 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 8:53 PM
Points: 33,204, Visits: 15,353
I have updated the script with code from Farhan as well.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #676602
Posted Monday, March 16, 2009 6:19 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 23, 2009 11:39 PM
Points: 1, Visits: 6

The comments in the sp say its for SQL 2005 only, but will it run on sql 2008?
Post #677084
Posted Monday, March 16, 2009 8:35 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, May 13, 2014 2:31 PM
Points: 76, Visits: 152
To be honest, I have not tried as I don't have access to one - if you can test it on dev or test environment, it would help.

Farhan F. Sabzaali
PMP, MCP, MCDBA, MCSA, MCSE
Post #677127
Posted Monday, June 1, 2009 12:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 26, 2009 6:25 AM
Points: 2, Visits: 9
This has been working well for me for several weeks, then we recently updated a vendor product and I'm getting an error. Looks like they updated their code to frequently create temporary tables and delete them. It appears the rebuild procedure doesn't handle tables that have been deleted after the procedure was started:

Msg 1088, Level 16, State 9, Line 1
Cannot find the object "NetPerfMon.dbo.NetFlowDetail_579_1382041" because it does not exist or you do not have permissions.

Any suggestions appreciated.
Post #726883
Posted Monday, June 1, 2009 12:17 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, May 13, 2014 2:31 PM
Points: 76, Visits: 152
Ideally, you should run these type of jobs when database is in maintenance window - if possible, try to schedule it when the application is not using the DB. If that is not possible, try running it with Online option = 0 - that should only look for existing tables. If that does not work, I may have to review code in detail to help you.

Farhan F. Sabzaali
PMP, MCP, MCDBA, MCSA, MCSE
Post #726889
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse