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


Index defrag script (21005/2008)


Index defrag script (21005/2008)

Author
Message
GregoryF
GregoryF
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2930 Visits: 885
Comments posted to this topic are about the item Index defrag script (21005/2008)

/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!
Sailor
Sailor
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2174 Visits: 861
GregoryF (8/24/2010)
Comments posted to this topic are about the item <A HREF="/scripts/Reindex/70985/">Index defrag script (21005/2008)</A>


When I try to run SQL 2008 R 2 Service Pack 2:


Msg 102, Level 15, State 1, Line 55
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 73
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 74
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 75
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 76
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 77
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 78
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 79
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 80
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 81
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 82
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 83
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 84
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 85
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 86
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 87
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 88
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 89
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 90
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 91
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 92
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 93
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 94
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 95
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 96
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 97
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 99
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 100
Must declare the scalar variable "@Stats".
Msg 102, Level 15, State 1, Line 103
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 106
Must declare the scalar variable "@PAD_Index".
Msg 102, Level 15, State 1, Line 109
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 112
Must declare the scalar variable "@SortInTempDB".
Msg 102, Level 15, State 1, Line 115
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 118
Must declare the scalar variable "@OnlineReq".
Msg 102, Level 15, State 1, Line 121
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 124
Must declare the scalar variable "@FillFactor".
Msg 102, Level 15, State 1, Line 127
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 130
Must declare the scalar variable "@ReBuildTheshold".
Msg 102, Level 15, State 1, Line 133
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 136
Must declare the scalar variable "@ReOrgThreshold".
Msg 102, Level 15, State 1, Line 139
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 143
Must declare the scalar variable "@MaxFrag".
Msg 102, Level 15, State 1, Line 146
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 149
Must declare the scalar variable "@MinPageCount".
Msg 102, Level 15, State 1, Line 152
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 155
Must declare the scalar variable "@MaxPageCount".
Msg 102, Level 15, State 1, Line 158
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 161
Must declare the scalar variable "@ChangeRecoveryModel".
Msg 102, Level 15, State 1, Line 164
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 167
Must declare the scalar variable "@MinPageCount".
Msg 102, Level 15, State 1, Line 170
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 173
Must declare the scalar variable "@DB".
Msg 137, Level 15, State 2, Line 175
Must declare the scalar variable "@DB".
Msg 137, Level 15, State 2, Line 177
Must declare the scalar variable "@DB".
Msg 137, Level 15, State 2, Line 178
Must declare the scalar variable "@ErrorTxt".
Msg 137, Level 15, State 2, Line 184
Must declare the scalar variable "@ReBuildTheshold".
Msg 137, Level 15, State 2, Line 184
Must declare the scalar variable "@ReBuildTheshold".
Msg 102, Level 15, State 1, Line 188
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 189
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 194
Must declare the scalar variable "@SQLEdition".
Msg 102, Level 15, State 1, Line 197
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 200
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 202
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 202
Must declare the scalar variable "@DB".
Msg 102, Level 15, State 1, Line 205
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 205
Must declare the scalar variable "@DB".
Msg 102, Level 15, State 1, Line 211
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 213
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 214
Must declare the scalar variable "@DBName".
Msg 102, Level 15, State 1, Line 217
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 221
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 223
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 226
Must declare the scalar variable "@DBName".
Msg 137, Level 15, State 2, Line 227
Must declare the scalar variable "@RecoveryModel".
Msg 137, Level 15, State 2, Line 229
Must declare the scalar variable "@DBName".
Msg 137, Level 15, State 2, Line 230
Must declare the scalar variable "@DBName".
Msg 137, Level 15, State 2, Line 231
Must declare the scalar variable "@SQLCmdRecovery".
Msg 102, Level 15, State 1, Line 236
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 244
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 246
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 247
Must declare the scalar variable "@ObjectID".
Msg 102, Level 15, State 1, Line 250
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 251
Must declare the scalar variable "@DBName".
Msg 102, Level 15, State 1, Line 258
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 258
Must declare the scalar variable "@SQLCmdID".
Msg 137, Level 15, State 2, Line 264
Must declare the scalar variable "@DBName".
Msg 102, Level 15, State 1, Line 266
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 266
Must declare the scalar variable "@SQLCmdID".
Msg 137, Level 15, State 2, Line 271
Must declare the scalar variable "@DBName".
Msg 102, Level 15, State 1, Line 273
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 273
Must declare the scalar variable "@SQLCmdID".
Msg 102, Level 15, State 1, Line 277
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 277
Must declare the scalar variable "@frag".
Msg 137, Level 15, State 2, Line 279
Must declare the scalar variable "@IndexName".
Msg 137, Level 15, State 2, Line 281
Must declare the scalar variable "@frag".
Msg 137, Level 15, State 2, Line 283
Must declare the scalar variable "@IndexName".
Msg 137, Level 15, State 2, Line 287
Must declare the scalar variable "@FillFactor".
Msg 137, Level 15, State 2, Line 287
Must declare the scalar variable "@FillFactor".
Msg 137, Level 15, State 2, Line 288
Must declare the scalar variable "@Online".
Msg 102, Level 15, State 1, Line 289
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 289
Must declare the scalar variable "@PAD_Index".
Msg 102, Level 15, State 1, Line 290
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 290
Must declare the scalar variable "@SortInTempDB".
Msg 102, Level 15, State 1, Line 292
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 292
Must declare the scalar variable "@PartitionCount".
Msg 137, Level 15, State 2, Line 292
Must declare the scalar variable "@SQLCmdBk".
Msg 102, Level 15, State 1, Line 296
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 297
Must declare the scalar variable "@frag".
Msg 137, Level 15, State 2, Line 299
Must declare the scalar variable "@SQLCmdFill".
Msg 137, Level 15, State 2, Line 299
Must declare the scalar variable "@SQLCmdWith".
Msg 137, Level 15, State 2, Line 300
Must declare the scalar variable "@SQLCmdOnline".
Msg 137, Level 15, State 2, Line 300
Must declare the scalar variable "@SQLCmdWith".
Msg 137, Level 15, State 2, Line 301
Must declare the scalar variable "@SQLCmdPad".
Msg 137, Level 15, State 2, Line 301
Must declare the scalar variable "@SQLCmdWith".
Msg 137, Level 15, State 2, Line 302
Must declare the scalar variable "@SQLCmdSort".
Msg 137, Level 15, State 2, Line 302
Must declare the scalar variable "@SQLCmdWith".
Msg 137, Level 15, State 2, Line 305
Must declare the scalar variable "@SQLCmdWith".
Msg 137, Level 15, State 2, Line 305
Must declare the scalar variable "@SQLCmdWith".
Msg 137, Level 15, State 2, Line 306
Must declare the scalar variable "@SQLCmdWith".
Msg 137, Level 15, State 2, Line 306
Must declare the scalar variable "@SQLCmdBk".
Msg 137, Level 15, State 2, Line 307
Must declare the scalar variable "@SQLCmdBk".
Msg 137, Level 15, State 2, Line 310
Must declare the scalar variable "@SQLCmd".
Msg 137, Level 15, State 2, Line 311
Must declare the scalar variable "@SQLCmd".
Msg 137, Level 15, State 2, Line 313
Must declare the scalar variable "@ObjectID".
Msg 102, Level 15, State 1, Line 319
Incorrect syntax near ' '.
Msg 137, Level 15, State 2, Line 320
Must declare the scalar variable "@RecoveryModel".
Msg 137, Level 15, State 2, Line 322
Must declare the scalar variable "@DBName".
Msg 137, Level 15, State 2, Line 323
Must declare the scalar variable "@DBName".
Msg 137, Level 15, State 2, Line 324
Must declare the scalar variable "@SQLCmdRecovery".
Msg 137, Level 15, State 2, Line 326
Must declare the scalar variable "@Exit".
Msg 137, Level 15, State 2, Line 328
Must declare the scalar variable "@DBName".



GregoryF
GregoryF
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2930 Visits: 885
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.

/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!
Iwas Bornready
Iwas Bornready
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: 34960 Visits: 886
Thanks for the script.
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