Results 1 to 4 of 4

Thread: Re-build index

  1. #1
    Join Date
    Feb 2007
    Location
    India
    Posts
    56

    Unanswered: Re-build index

    Hi,
    While rebuilding the clustered indexes, we need free space on db which is equivalent to table size(As it has to rearrange all the pages). Do we have any stored procedure to check whether we have space available on db or not to re-create indexes(If we have calculation like how many pages/Bytes additionally required is also fine)? Can anybody help me?


    Thanks In advance.

    With Best Regards,
    Naveen.
    Regards,
    Naveen.
    Sybase DBA-Consultant

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    sp_spaceused <table_name>
    will show you the current size of the table

  3. #3
    Join Date
    Feb 2007
    Location
    India
    Posts
    56
    You are right sp_spaceused <Tablename>,1 will give us the detailed output about the table and their index sizes. But my concern here is i need to calculate the available db space now and differential amount of space needed to re-create index.
    Regards,
    Naveen.
    Sybase DBA-Consultant

  4. #4
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    sp_helpdb <your_db>
    will show you the free space in <your_db>
    look at the code of sp_helpdb and sp_spaceused to develop your own code to calc the differential amount

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •