Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

I know that in Microsoft Access there is a mechanism called Repair Database, which as result optimizes the performance and the size of the database.

Is there any similar mechanism in SQL Anywhere?

We have currently problems of database size (some gigabytes), and we know that the actual data is not that big, but the most of size is 'debris' remaining from INSERT and DELETE

asked 09 May '20, 14:07

Baron's gravatar image

Baron
2.2k144153181
accept rate: 48%

edited 09 May '20, 14:27

Volker%20Barth's gravatar image

Volker Barth
40.5k365556827


In many cases, space that has been used in the database and freed will get reused. If that is not the case in your environment (the growth is an one-time event), rebuilding the database makes sense. Otherwise, the cost of rebuilding a database that will grow again may not provide much benefit.

There are two approaches to rebuilding a database that is involved in replication or synchronization.

permanent link

answered 10 May '20, 10:01

Chris%20Keating's gravatar image

Chris Keating
8.0k50131
accept rate: 32%

You can use dbinfo or various system procedures to check for free pages, and you can use reorganize table for a running database or a complete reload to minimize size. There are many FAQ here related to this topic.

Aside: Having used MS Access as a database in former times, I would really refrain from comparing it and its "repair mode" to a "real" database system like SQL Anywhere...

permanent link

answered 09 May '20, 14:25

Volker%20Barth's gravatar image

Volker Barth
40.5k365556827
accept rate: 34%

converted 10 May '20, 03:33

Thanks for the comment.

What you mean exactly with Reload? Do you mean Unload + Load into a new empty database?

(09 May '20, 14:56) Baron
Replies hidden
Comment Text Removed
1

Yes. That's the only way to reduce the database size.

(09 May '20, 15:49) Volker Barth

This process we do sometimes.

But this process does not always result a new product DB which can functionally replace the original one!

An example is a DB with SQL Remote, or even with Mobilink!

(09 May '20, 17:43) Baron
3

You certainly CAN reload databases for SR or ML - you just have to do this as required, see the docs - it's easiest via dbunload -ar directory...

(09 May '20, 17:47) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×276
×17
×15
×9

question asked: 09 May '20, 14:07

question was seen: 1,643 times

last updated: 11 May '20, 02:45