Starcounter / Home

Starcounter is an in-memory database application engine.
https://starcounter.io
27 stars 1 forks source link

New database, change TransactionLogDirectory #371

Open careri opened 6 years ago

careri commented 6 years ago

Version: 2.3.2.348.

Hi, I tried to change so that Image and TransactionLog is placed in different folders.

Background

I did this mainly to figure out what the difference between Image and TransactionLog is in starcounter 2. In starcounter 1 it was quite clear, but I'm confused by concepts in starcounter 2.

There seems to be no such thing as an database Image in starcounter 2, only transaction log an optimized such.

The error

Any way, it's not possible to split the two, I changed the values in Starcounter Admin "New Database" Image Directory = C:\Users\careri\Documents\Starcounter\Personal\Data\db2*Image Transaction Log Directory = C:\Users\careri\Documents\Starcounter\Personal\Data\db2*TransLog

This yields an internal server error:

ScErrDbProcTerminated (SCERR10028): The server detected that the database data process unexpectedly terminated during a management operation. scdata.exe, PID=3084, Database=db2, Exitcode=4117 Version: 2.3.2.348. Help page: https://docs.starcounter.io/v/2.3.1/?q=SCERR10028. Help. View the log for more details. Created but failed to start.

More Errors

Starcounter.DbException: ScErrDbProcTerminated (SCERR10028): The server detected that the database data process unexpectedly terminated during a management operation. scdata.exe, PID=1884, Database=db2, Exitcode=4028 Version: 2.3.2.348. Help page: https://docs.starcounter.io/v/2.3.1/?q=SCERR10028. at Starcounter.Server.DatabaseEngine.StartDatabaseProcess(Database database) in C:\TeamCity\BuildAgent\work\sc-14545\Level1\src\Server\Starcounter.Server\CoreServices\DatabaseEngine.cs:line 183 at Starcounter.Server.Commands.Processors.StartDatabaseCommandProcessor.<>c__DisplayClass2_0.b__0(CommandTask task) in C:\TeamCity\BuildAgent\work\sc-14545\Level1\src\Server\Starcounter.Server\Commands\Processors\StartDatabaseCommandProcessor.cs:line 54 at Starcounter.Server.Commands.CommandProcessor.WithinTask(CommandTask task, Func`2 func) in C:\TeamCity\BuildAgent\work\sc-14545\Level1\src\Server\Starcounter.Server\Commands\CommandProcessor.cs:line 510 at Starcounter.Server.Commands.Processors.StartDatabaseCommandProcessor.Execute() in C:\TeamCity\BuildAgent\work\sc-14545\Level1\src\Server\Starcounter.Server\Commands\Processors\StartDatabaseCommandProcessor.cs:line 58 at Starcounter.Server.Commands.CommandProcessor.ProcessCommand(NotifyCommandStatusChangedCallback notifyStatusChangedCallback) in C:\TeamCity\BuildAgent\work\sc-14545\Level1\src\Server\Starcounter.Server\Commands\CommandProcessor.cs:line 300 ErrorCode=10028 HResult=-2146233088 HelpLink=https://docs.starcounter.io/v/2.3.1/?q=SCERR10028 ---> Starcounter.DbException: ScErrCantOpenImageFile (SCERR4028): One of database the image files of the database could not be opened. Version: 2.3.2.348. Help page: https://docs.starcounter.io/v/2.3.1/?q=SCERR4028. ErrorCode=4028 HResult=-2146233088 HelpLink=https://docs.starcounter.io/v/2.3.1/?q=SCERR4028

A fatal error was detected: ScErrCantOpenImageFile (SCERR4028): One of database the image files of the database could not be opened.

ScErrUnexpErrorOpenImageFile (SCERR6009): An unexpected file I/O error occurred when attempting to open an image file. OS error=3 (CreateFile).

careri commented 6 years ago

I did another test like this.

  1. Create database with default values for image and trans
  2. Stopped the database
  3. Modified the config like this:
    <ImageDirectory>C:\Users\careri\Documents\Starcounter\Personal\Data\db2\Image\db2-20180207T081639130</ImageDirectory>
    <TransactionLogDirectory>C:\Users\careri\Documents\Starcounter\Personal\Data\db2\TransLog\db2-20180207T081639130</TransactionLogDirectory>
  4. I then moved the log files in to TransLog folder and the db2.cfg in Image.
  5. Then started the database again

But I still get an error that the Image can't be found