Simple, use undocumented stored procedure sp_msforeachtable. Since its undocumented there is no gurantee that it will be available in all the future versions. But in SQL Server 2000 and 2005 it works.
Use YourdatabaseName
EXEC sp_msforeachtable 'DBCC DBREINDEX( ''?'')'
Thursday, May 1, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment