August 24, 2010 at 10:34 pm
Comments posted to this topic are about the item Index defrag script (21005/2008)
/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!
August 15, 2011 at 2:10 pm
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".
August 15, 2011 at 3:15 pm
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!
May 18, 2016 at 1:05 pm
Thanks for the script.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply