[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 520
  • Last Modified:

Rebuild Indexes SQL 2000

Experts,

Can someone please provide me with the command to Rebuild Indexes for every table in a database rather than going one by one?  The name of the database is EVEREST_TMA.  Is there even one available or do I need to do it each table at a time?  I am not very knowledgeable of SQL so anything would help.

Thanks,
0
Cody Vance
Asked:
Cody Vance
  • 2
2 Solutions
 
chapmandewCommented:
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
exec sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?')"
0
 
chapmandewCommented:
Its not a great idea to just blindly go and reindex every table in your db w/o checking to see how fragmented it is, by the way.  
0
 
Cody VanceSr. Analyst - ERPAuthor Commented:
Thanks for your help, this will at least give me somewhere to start :)
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now