cancel
Showing results for 
Search instead for 
Did you mean: 

SQL anywhere 16 -wasted disk space

former_member329524
Active Participant
0 Kudos

Hello, all

Database, which has only around 30M of actual data has grown to 800,000MB due to user error (500,000 rows were inserted into one table, and later deleted).

Is there a way to "compress" the DB file, so it would not take so much disk space without rebuilding the whole DB? I do not want to take the users off line for something that does not actually interfere with their work.

Accepted Solutions (1)

Accepted Solutions (1)

ddeconin
Advisor
Advisor
0 Kudos

dbunload/reload is the way to 'shrink' a db.

http://dcx.sybase.com/index.html#sa160/en/dbadmin/dbunload.html

former_member329524
Active Participant
0 Kudos

I know that. I specifically stated that I would like to do it without going through the whole rebuilding process.

reimer_pods
Participant
0 Kudos

IMHO rebuilding the database is the only way to free unused space within the db file.

JasonHinsperger
Advisor
Advisor
0 Kudos

Reimer is correct.  The only way to return space allocated in the database to the OS is to rebuild the database.

--Jason

former_member188493
Contributor
0 Kudos

You might try creating a High Availability setup with a brand-new secondary database created via unload/reload. Once the HA setup is running, and the slim secondary is up-to-date with respect to the bloated primary, stop the bloated primary database and let the slim secondary database become the primary.

Answers (0)