What's the most efficient way to reclaim disk space after deleting lots of data from a database on Sybase ASE 15?

Posted by Ernie Longmire on Server Fault See other posts from Server Fault or by Ernie Longmire
Published on 2011-10-26T20:52:56Z Indexed on 2012/06/27 3:17 UTC
Read the original article Hit count: 584

As I understand it, based on some research but zero real-world experience with Sybase ASE, the only way to reclaim disk space once it's been allocated to a database is to export that database, create a new DB with the same schema, and reload all the exported data to the new database. Is this correct, or is there some other method?

Then: assuming the above is correct and a full export-recreate-reload is required, what's the most efficient way to do that? Are there tools that will automate all or part of that process? I'm being told we would have to write separate bcp export and import commands for each and every object in the database, which if true sounds easily scriptable by someone who knows Sybase ASE well enough. (I don't.)

This seems to me like a really basic housekeeping task, and it feels like I'm missing something obvious.

© Server Fault or respective owner

Related posts about database-backup

Related posts about database-restore