﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Gregory Ferdinandsen  / Index defrag script (21005/2008) / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 22:09:37 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Index defrag script (21005/2008)</title><link>http://www.sqlservercentral.com/Forums/Topic974618-2621-1.aspx</link><description>This sometime happens when copyine scripts off SSC, I've had it happen several times.  The whitespace leading a line gets converted to control characters.  Reply back with your email address and tomorrow when I get to work, I'll forward you the must current version of the defrag script.</description><pubDate>Mon, 15 Aug 2011 15:15:09 GMT</pubDate><dc:creator>GregoryF</dc:creator></item><item><title>RE: Index defrag script (21005/2008)</title><link>http://www.sqlservercentral.com/Forums/Topic974618-2621-1.aspx</link><description>[quote][b]GregoryF (8/24/2010)[/b][hr]Comments posted to this topic are about the item [B]&amp;lt;A HREF="/scripts/Reindex/70985/"&amp;gt;Index defrag script (21005/2008)&amp;lt;/A&amp;gt;[/B][/quote]When I try to run SQL 2008 R 2 Service Pack 2:Msg 102, Level 15, State 1, Line 55Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 73Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 74Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 75Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 76Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 77Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 78Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 79Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 80Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 81Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 82Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 83Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 84Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 85Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 86Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 87Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 88Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 89Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 90Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 91Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 92Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 93Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 94Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 95Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 96Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 97Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 99Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 100Must declare the scalar variable "@Stats".Msg 102, Level 15, State 1, Line 103Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 106Must declare the scalar variable "@PAD_Index".Msg 102, Level 15, State 1, Line 109Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 112Must declare the scalar variable "@SortInTempDB".Msg 102, Level 15, State 1, Line 115Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 118Must declare the scalar variable "@OnlineReq".Msg 102, Level 15, State 1, Line 121Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 124Must declare the scalar variable "@FillFactor".Msg 102, Level 15, State 1, Line 127Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 130Must declare the scalar variable "@ReBuildTheshold".Msg 102, Level 15, State 1, Line 133Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 136Must declare the scalar variable "@ReOrgThreshold".Msg 102, Level 15, State 1, Line 139Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 143Must declare the scalar variable "@MaxFrag".Msg 102, Level 15, State 1, Line 146Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 149Must declare the scalar variable "@MinPageCount".Msg 102, Level 15, State 1, Line 152Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 155Must declare the scalar variable "@MaxPageCount".Msg 102, Level 15, State 1, Line 158Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 161Must declare the scalar variable "@ChangeRecoveryModel".Msg 102, Level 15, State 1, Line 164Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 167Must declare the scalar variable "@MinPageCount".Msg 102, Level 15, State 1, Line 170Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 173Must declare the scalar variable "@DB".Msg 137, Level 15, State 2, Line 175Must declare the scalar variable "@DB".Msg 137, Level 15, State 2, Line 177Must declare the scalar variable "@DB".Msg 137, Level 15, State 2, Line 178Must declare the scalar variable "@ErrorTxt".Msg 137, Level 15, State 2, Line 184Must declare the scalar variable "@ReBuildTheshold".Msg 137, Level 15, State 2, Line 184Must declare the scalar variable "@ReBuildTheshold".Msg 102, Level 15, State 1, Line 188Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 189Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 194Must declare the scalar variable "@SQLEdition".Msg 102, Level 15, State 1, Line 197Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 200Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 202Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 202Must declare the scalar variable "@DB".Msg 102, Level 15, State 1, Line 205Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 205Must declare the scalar variable "@DB".Msg 102, Level 15, State 1, Line 211Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 213Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 214Must declare the scalar variable "@DBName".Msg 102, Level 15, State 1, Line 217Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 221Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 223Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 226Must declare the scalar variable "@DBName".Msg 137, Level 15, State 2, Line 227Must declare the scalar variable "@RecoveryModel".Msg 137, Level 15, State 2, Line 229Must declare the scalar variable "@DBName".Msg 137, Level 15, State 2, Line 230Must declare the scalar variable "@DBName".Msg 137, Level 15, State 2, Line 231Must declare the scalar variable "@SQLCmdRecovery".Msg 102, Level 15, State 1, Line 236Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 244Incorrect syntax near ' '.Msg 102, Level 15, State 1, Line 246Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 247Must declare the scalar variable "@ObjectID".Msg 102, Level 15, State 1, Line 250Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 251Must declare the scalar variable "@DBName".Msg 102, Level 15, State 1, Line 258Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 258Must declare the scalar variable "@SQLCmdID".Msg 137, Level 15, State 2, Line 264Must declare the scalar variable "@DBName".Msg 102, Level 15, State 1, Line 266Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 266Must declare the scalar variable "@SQLCmdID".Msg 137, Level 15, State 2, Line 271Must declare the scalar variable "@DBName".Msg 102, Level 15, State 1, Line 273Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 273Must declare the scalar variable "@SQLCmdID".Msg 102, Level 15, State 1, Line 277Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 277Must declare the scalar variable "@frag".Msg 137, Level 15, State 2, Line 279Must declare the scalar variable "@IndexName".Msg 137, Level 15, State 2, Line 281Must declare the scalar variable "@frag".Msg 137, Level 15, State 2, Line 283Must declare the scalar variable "@IndexName".Msg 137, Level 15, State 2, Line 287Must declare the scalar variable "@FillFactor".Msg 137, Level 15, State 2, Line 287Must declare the scalar variable "@FillFactor".Msg 137, Level 15, State 2, Line 288Must declare the scalar variable "@Online".Msg 102, Level 15, State 1, Line 289Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 289Must declare the scalar variable "@PAD_Index".Msg 102, Level 15, State 1, Line 290Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 290Must declare the scalar variable "@SortInTempDB".Msg 102, Level 15, State 1, Line 292Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 292Must declare the scalar variable "@PartitionCount".Msg 137, Level 15, State 2, Line 292Must declare the scalar variable "@SQLCmdBk".Msg 102, Level 15, State 1, Line 296Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 297Must declare the scalar variable "@frag".Msg 137, Level 15, State 2, Line 299Must declare the scalar variable "@SQLCmdFill".Msg 137, Level 15, State 2, Line 299Must declare the scalar variable "@SQLCmdWith".Msg 137, Level 15, State 2, Line 300Must declare the scalar variable "@SQLCmdOnline".Msg 137, Level 15, State 2, Line 300Must declare the scalar variable "@SQLCmdWith".Msg 137, Level 15, State 2, Line 301Must declare the scalar variable "@SQLCmdPad".Msg 137, Level 15, State 2, Line 301Must declare the scalar variable "@SQLCmdWith".Msg 137, Level 15, State 2, Line 302Must declare the scalar variable "@SQLCmdSort".Msg 137, Level 15, State 2, Line 302Must declare the scalar variable "@SQLCmdWith".Msg 137, Level 15, State 2, Line 305Must declare the scalar variable "@SQLCmdWith".Msg 137, Level 15, State 2, Line 305Must declare the scalar variable "@SQLCmdWith".Msg 137, Level 15, State 2, Line 306Must declare the scalar variable "@SQLCmdWith".Msg 137, Level 15, State 2, Line 306Must declare the scalar variable "@SQLCmdBk".Msg 137, Level 15, State 2, Line 307Must declare the scalar variable "@SQLCmdBk".Msg 137, Level 15, State 2, Line 310Must declare the scalar variable "@SQLCmd".Msg 137, Level 15, State 2, Line 311Must declare the scalar variable "@SQLCmd".Msg 137, Level 15, State 2, Line 313Must declare the scalar variable "@ObjectID".Msg 102, Level 15, State 1, Line 319Incorrect syntax near ' '.Msg 137, Level 15, State 2, Line 320Must declare the scalar variable "@RecoveryModel".Msg 137, Level 15, State 2, Line 322Must declare the scalar variable "@DBName".Msg 137, Level 15, State 2, Line 323Must declare the scalar variable "@DBName".Msg 137, Level 15, State 2, Line 324Must declare the scalar variable "@SQLCmdRecovery".Msg 137, Level 15, State 2, Line 326Must declare the scalar variable "@Exit".Msg 137, Level 15, State 2, Line 328Must declare the scalar variable "@DBName".</description><pubDate>Mon, 15 Aug 2011 14:10:46 GMT</pubDate><dc:creator>Sailor</dc:creator></item><item><title>Index defrag script (21005/2008)</title><link>http://www.sqlservercentral.com/Forums/Topic974618-2621-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Reindex/70985/"&gt;Index defrag script (21005/2008)&lt;/A&gt;[/B]</description><pubDate>Tue, 24 Aug 2010 22:34:22 GMT</pubDate><dc:creator>GregoryF</dc:creator></item></channel></rss>