Storing SGS Databases on a PostgreSQL Server

SGS has three main databases: catalog, catalog_messages, and catalog_sgstatistics. Each database is stored in a separate SQLite file. For greater reliability when working in a multi-server environment and to support a higher number of users and requests, these databases can be stored on a PostgreSQL server, including Amazon Aurora (a PostgreSQL compatible database built for the cloud).

To store SGS databases on a PostgreSQL server:

1.     Install SGS. See "Installing/Running SkylineGlobe Server" in this chapter for more information.

2.     Install the following:

§  PostgreSQL Server (if not already installed) – This can be installed on your computer, network server, or Amazon Aurora.

§  pgAdmin 4. See "https://www.pgadmin.org/download/" for more information.

3.     In pgAdmin, do the following for each of the three main databases: catalog, catalog_messages, and catalog_sgstatistics, that you are creating:

a.     In the navigation pane, right-click Databases, and in the shortcut menu select Create > Database. The Create Database dialog is displayed.

b.     On the General tab in the Database field, type the corresponding catalog name (catalog, catalog_messages, or catalog_sgstatistics), and click Save.

c.     In the navigation pane, right-click catalog (under Databases), and select Query Tool. The Query Editor is displayed.

d.     Copy and paste the respective catalog script content (located in the .\SG\Resources\DB_Scripts folders) into the Editor, and click Execute/Refresh (F5) .

4.     Edit the Web.config file located in the application’s installation folder:

a.     Set the value of the "CatalogDBType" key to "postgresql".

b.     Set the value of the "CatalogPostgreSqlConnString" key (server, port, uid, and password parameters). Do not modify the database parameter.
E.g.,

<add key="CatalogDBType" value="postgresql"/>

<add value="C:\SkylineGlobeServerConfiguration\catalog.db" key="CatalogConnPath"/>

<add key="CatalogPostgreSqlConnString" value="server=192.168.202.1;port=3306;database={0};uid=admin;pwd=admin;"/>