Starcounter database consists of the following items:
0 - 1
Archived transaction log files.
0 - ∞
Transaction log file.
0 - ∞
Compressed transaction log file.
Database configuration file.
0 - ∞
Database events log.
- Required: specifies whether this item is a required database part; for example, when moving or backing up a database.
- Platform Specific:
No- the file is platform independent;
Yes- the file is platform specific and not cross-compatible between Windows / Linux versions of Starcounter.
Note: due to the
.cfgfile being platform specific, it is not currently possible to copy databases between Windows and Linux.
The very first database transaction log file is created during the first database startup. A created, but never started database does not contain any transaction log files.
When database grows, Starcounter:
- Creates new transaction log files.
- Compresses existing transaction log files into
- Moves compressed transaction log files into the
*Note: due to the current limitations, it is important to start the database at least once before using it from multiple different processes.*
This file contains all required information about the database.
Starcounter logs database events into this file. Sample content:
20191118T090843 Debug DatabaseName Starcounter - Database load started.
20191118T090843 Debug DatabaseName Starcounter - Database load completed. 0 transactions recovered.
On Windows, it's not possible to delete database files while the
scdataprocess is running. On Linux operating systems, however, it is, which may lead to potential issues. Consider the following scenario:
- A database is created at
scdataprocess is started for the database.
- The database files are deleted.
- New database is created in exactly the same location.
- An app tries to connect to the new database.
- Starcounter detects, that there is a running
scdataprocess associated with this database path.
- The app connects to the existing
scdataprocess, which still operates on the deleted files. The filesystem will keep those files around for the
scdataprocess, as long as it's running.
- The app continues to run as expected, but the next time
scdatais restarted, for example due to a system restart, the database files will be removed from the system completely, taking all the app's database data with them.