Rebuild Indexes SQL 2000

Posted on 2009-12-28
Last Modified: 2012-05-08

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.

Question by:codyvance1
    LVL 60

    Accepted Solution

    LVL 75

    Assisted Solution

    by:Aneesh Retnakaran
    exec sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?')"
    LVL 60

    Expert Comment

    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.  

    Author Closing Comment

    Thanks for your help, this will at least give me somewhere to start :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now