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

SQL Server Index Defragmentation (Updated) Expand / Collapse
Author
Message
Posted Thursday, September 20, 2012 11:50 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, April 23, 2013 3:40 AM
Points: 961, Visits: 794
Comments posted to this topic are about the item SQL Server Index Defragmentation (Updated)

/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!

Post #1362428
Posted Friday, September 21, 2012 8:03 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:38 AM
Points: 93, Visits: 207
It says it supports SQL 2005 or greater but we don't have a DBMonitor database. After searching it looks like this is a 3rd party tool from Devart?

Perhaps this should be mentioned and a discussion of the pros/cons of installing this tool on your database should be included instead of just a teaser of Defrags all indexes.... with no mention of the need to install this.
Post #1362682
Posted Friday, September 21, 2012 8:05 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, April 23, 2013 3:40 AM
Points: 961, Visits: 794
DBMonitor is just the name of our administrative database, it does not belong to a third party tool. You can put the SP in any databasse (master, msdb, etc)

/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!

Post #1362685
Posted Friday, September 21, 2012 8:21 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:38 AM
Points: 93, Visits: 207
AAAH.....Sorry I was confused

Updated it to use our Utilities db and modified name to match our naming standards....

It's so big going through it to make sure I understand which parameters to run is taking some time.
Post #1362701
Posted Thursday, October 04, 2012 5:13 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 6:48 AM
Points: 1,065, Visits: 1,328
Nice script

Just a heads up - found a missing QUOTENAME here: (around @DBName)
(only applies if you have underscores and/or hyphens and/or dashes in your database names)
--Get rid of the brackets :<-->: [IndexName] --> IndexName
set @IndexNameExists = substring(@IndexName, 2, len(@IndexName) - 2)
set @SQLCmdExist = N'select @IndexExists = name from ' + @DBName + '.sys.indexes where name = ''' + @IndexNameExists + ''''
set @PDExist = N'@IndexExists varchar(128) output'
exec sp_executesql @SQLCmdExist, @PDExist, @IndexExists output

Changed to:
set @SQLCmdExist = N'select @IndexExists = name from ' + QUOTENAME(@DBName) + '.sys.indexes where name = ''' + @IndexNameExists + ''''

and now works without any errors on my servers.

Thanks


_____________________________________________________________________________________
gsc_dba
Post #1368304
Posted Thursday, October 04, 2012 5:19 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, April 23, 2013 3:40 AM
Points: 961, Visits: 794
I think you may have just solved my riddle of why it fails on SharePoint DB's that contain GUID's in their names. Thanks!


Just to confirm, I ran it against a test server (with the ISGUID functionality commented out) , and like you said, it now handles _'s and -'s. I've been spending months trying to figure this out, thanks again!


/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!

Post #1368308
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse