Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do you reindex DB?
Message
General information
Forum:
Microsoft SQL Server
Category:
Indexing
Miscellaneous
Thread ID:
01680338
Message ID:
01680459
Views:
29
Yes, it's right.

MartinaJ
>
>Could you please if I applied your change correctly?
>
>OPEN @lorsData
> WHILE 0 = 0 BEGIN
>   FETCH NEXT FROM @lorsData INTO @lcTABNAME, @lcNAME, @lfDFG
>   IF @@FETCH_STATUS <> 0 BREAK
>
>   BEGIN TRY 
>    EXEC('ALTER INDEX ['+@lcNAME+'] ON ['+@lcTABNAME+'] REBUILD ')
>    PRINT CAST(@lfDFG AS VARCHAR(30))+' ALTER INDEX ['+@lcNAME+'] ON ['+@lcTABNAME+'] REBUILD /*WITH(ONLINE = ON)*/'
>   END TRY 
>   BEGIN CATCH
>     PRINT 'FAILED: '+@lcTABNAME+' '+@lcNAME 
>   END CATCH
>   
> END
> CLOSE @lorsData
> DEALLOCATE @lorsData
>
>
>Thank you!
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Reply
Map
View

Click here to load this message in the networking platform