Olympia Frequently Asked Questions
- How can I change the database engine in Olympia?
- How can I enable InMemory sessions mode in Olympia?
- How can I run Olympia session server on Windows x64?
How can I change the database engine in Olympia?
By default, Olympia is configured to use SQLite.NET as the default database engine, but you can also use MS SQL, MS SQL CE or Firebird to store Olympia data. To change the Olympia database engine you have to:
- Create a database using the SQL script below.
Note: This SQL script is for MS SQL CE. For other database servers, you should compose silmilar SQL script or create a database of the same structure using the management tool. Database creation scripts for MS SQL, MS SQL CE, SQLite.NET and Firebird are shipped with Olympia sources.
CREATE TABLE [EVENTDATA] ([EVENTID] nchar(36) NOT NULL
, [ORIGIN] nchar(36) NOT NULL
, [SENT] datetime NOT NULL
, [DATA] image NULL
);
CREATE TABLE [EVENTUSER] ([USERID] nchar(36) NOT NULL
, [LASTUSE] datetime NOT NULL
);
CREATE TABLE [EVENTUSERDATA] ([EVENTUSER] nchar(36) NOT NULL
, [EVENTID] nchar(36) NOT NULL
);
CREATE TABLE [SESSION] ([ID] nchar(36) NOT NULL
, [APPLICATIONID] nchar(36) NOT NULL
, [LASTACCESSED] datetime NOT NULL
, [DATA] image NOT NULL
, [CREATED] datetime NOT NULL
, [EXPIRED] int NOT NULL DEFAULT 0
);
ALTER TABLE [EVENTDATA] ADD PRIMARY KEY ([EVENTID]);
ALTER TABLE [EVENTUSER] ADD PRIMARY KEY ([USERID]);
ALTER TABLE [EVENTUSERDATA] ADD PRIMARY KEY ([EVENTUSER],[EVENTID]);
ALTER TABLE [SESSION] ADD PRIMARY KEY ([ID]);
- Create or modify the
Olympia.daConnections
file using Schema Editor, some XML editor or even Notepad: Set the default property to True for one of the predefined connections and modify its connection string - it should point to the database created at step 1.
Default contents of Olympia.daConnections file:
<?xml version="1.0" encoding="utf-8"?>
<Connections>
<PoolingEnabled>True</PoolingEnabled>
<PoolingBehavior>Wait</PoolingBehavior>
<MaxPoolSize>10</MaxPoolSize>
<WaitIntervalSeconds>1</WaitIntervalSeconds>
<PoolTimeoutSeconds>60</PoolTimeoutSeconds>
<Definitions>
<Definition><Name>Olympia.MSSQL.NET</Name><ConnectionString>MSSQL.NET?Server=localhost;Database=Olympia;Integrated Security=SSPI</ConnectionString><Default>False</Default><Description></Description><ConnectionType>MSSQL</ConnectionType></Definition>
<Definition><Name>Olympia.MSSQLCE.NET</Name><ConnectionString>MSSQLCE.NET?Server=localhost;Database=%OLYMPIA%\Olympia.sdf;</ConnectionString><Default>False</Default><Description></Description><ConnectionType>MSSQLCE</ConnectionType></Definition>
<Definition><Name>Olympia.SQLite.NET</Name><ConnectionString>SQLite.NET?Server=localhost;Database=%OLYMPIA%\Olympia.sqb;Synchronous=Off;</ConnectionString><Default>True</Default><Description></Description><ConnectionType>SQLite</ConnectionType></Definition>
<Definition><Name>Olympia.FB.NET</Name><ConnectionString>FB.NET?Server=localhost;Database=%OLYMPIA%\OLYMPIA.GDB;UserID=sysdba;Password=masterkey;</ConnectionString><Default>False</Default><Description></Description><ConnectionType>Interbase</ConnectionType></Definition>
</Definitions>
</Connections>
Delete all other connection definitions - they aren't needed.
-
Put the modified Olympia.daConnections file next to ROOlympiaServer.exe
-
Put the
ROOlympiaServer.exe.config
file next to ROOlympiaServer.exe and modify it (again, you can use a XML editor or plain Notepad). Modify theMaxOlympiaPoolSize
property. This property defines how many simultaneous connections the Olympia server can establish to the underlying database. For MS SQL you should set this value to 16.
Default contents of the ROOlympiaServer.exe.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="ROOlympiaServer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="OlympiaGUIServer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<OlympiaGUIServer.Properties.Settings>
<setting name="Port" serializeAs="String">
<value>8011</value>
</setting>
<setting name="EventTimeout" serializeAs="String">
<value>00:30:00</value>
</setting>
<setting name="SessionTimeout" serializeAs="String">
<value>00:30:00</value>
</setting>
<setting name="RequireAuthentication" serializeAs="String">
<value>False</value>
</setting>
<setting name="ValidUsernames" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>Username1=Password1</string>
<string>Username2=Password2</string>
</ArrayOfString>
</value>
</setting>
<setting name="MaxOlympiaPoolSize" serializeAs="String">
<value>1</value>
</setting>
<setting name="InMemoryMode" serializeAs="String">
<value>False</value>
</setting>
</OlympiaGUIServer.Properties.Settings>
</userSettings>
</configuration>
Also note the Port property:
<setting name="Port" serializeAs="String">
<value>8011</value>
</setting>
Using it, you can change the port Olympia uses from the default one (8011) to any other port.
Note: You cannot change these properties on-the-fly. You have to restart the Olympia server if you change any of these properties while the server is running.
How can I enable InMemory sessions mode in Olympia?
You need to start Olympia server with "-im"
command line argument.
Another way to do it is to set InMemoryMode parameter in ROOlympiaServer.exe.config. See more details in How can I change the database engine in Olympia?
Note: A few other arguments are also available:
'-im', '/im', '--inmemorymode', '/inmemorymode'
'-i', '/i', '--install', '/install'
- installs Olympia Server as a service'-u', '/u', '--uninstall', '/uninstall'
- uninstalls Olympia service'-c', '/c', '--commandline', '/commandline'
- starts Olympia in command line mode
How can I run Olympia session server on Windows x64?
By default Olympia is shipped with x86 version of SQLite.NET driver, so Olympia is not able to load it while runing as x64 process. So you need to replace System.Data.SQLite assembly with its x64 version. You can download it from http://sourceforge.net/projects/sqlite-dotnet2/files/ . Pease make sure that you download the same version of driver assembly (f.e. 1.0.65.0).