If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Re-build index

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-09, 16:36
pvvsnaveen pvvsnaveen is offline
Registered User
 
Join Date: Feb 2007
Location: India
Posts: 56
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
Reply With Quote
  #2 (permalink)  
Old 12-30-09, 02:18
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,258
sp_spaceused <table_name>
will show you the current size of the table
Reply With Quote
  #3 (permalink)  
Old 12-30-09, 10:26
pvvsnaveen pvvsnaveen is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 01-06-10, 08:00
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,258
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On