Databases Maintenance

Top  Previous  Next

The Database Management & maintenance feature is dedicated to you manage yours software database files.
To open a its window click on the Database Management button located at main software window ribbon bar in Software\Tools group

Select Database
Here you can select which database you want to maintain. You can select one particular database from drop down list, if you do not select then all files are processed.
Backup Location
Here you can enter or select folder where you want to keep copies of your databases. To select a folder please click on a small folder icon on the right edge of text box

Copies all or selected database to your backup folder. We recommend to use this function periodically to create a copies of all databases.
Restores all or selected database from your backup folder.
Creates all new or selected new database. Use only if you want to drop the old database files.

Upgrades databases to a new version. Use it only  when we announce it. It will happen once every few years when Microsoft will release new major version of databases engine this software use

Shrink & Compact
We provide these commands for advance use because some users are very familiar with these things and they might want to use them.
The software databases have built-in Auto Shrink mechanism so for normal software usage you do not have to learn about things described in this topic.

You use the Shrink or Compact methods to reclaim space in the database file.
Database files can grow quickly as you use them, sometimes impeding performance.
As you add and update data and change its design, a database file becomes larger. Databases create temporary, hidden objects to accomplish various asks. Sometimes, these temporary objects remain in your database after software no longer needs them. When you delete a database object, the disk space that the object occupied is not automatically reclaimed — the database file still uses that disk space, even though the object is deleted.  As your database file fills up with the remains of temporary and deleted objects, its performance can degrade. Objects may open more slowly, queries may take longer than normal to run, and typical operations generally seem to take longer.
The difference between Shrink & Compact methods:
When you shrink the database then software will work on your database file directly by reclaiming wasted space in the database by moving empty and unallocated pages to the end of the file, and then truncating the file. When you compact a database then software create a new database, and then copy all objects from the source database to the new database.
When to use these methods:
You can shrink or compact your databases when
1. You edit database data frequently.
    For example you may use shrink command on LotteryDraws.sdf database file as you update game lottery numbers frequently
    Some database files like WheelSystems.sdf (keeps wheel systems properties) do not have to be shrunken or compacted probably never.
2. Database file become very large
   All software database files have capacity of 4GB. For normal software usage this is more than enough, however if you feel that the database file become too large you may try shrink it.
   The auto shrink mechanism will shrink the database automatically when wasted space exceeds 50% of database file anyway.
Note: Compacting or Shrinking does not compress your data — it makes your database file smaller by eliminating unused space.

The database file can also occasionally become corrupted or damaged.
If a database file becomes corrupted, you can try to recover the database file by using the Repair method. The Repair method scans the database and will try to recover corrupted data.
When you use this method the verification process will start first to check if database is corrupted and needs to be repaired
Using this command does not guarantee that the data recovered in whole or will be free of logical corruption.

Always make a backup before the compact or repair process, software may truncate some data from tables that are damaged.
To manage the databases you can also use Microsoft SQL Management Studio which is available free as a part of Microsoft SQL 2005 or 2008 Server Express Free Edition