Configuring Databases
A Model Manager server database can be set as either active or inactive depending on whether or not it should accept connections from COMSOL Multiphysics or the Model Manager server web interface. You would typically deactivate a Model Manager server database when you want to change its configuration settings or perform a restore from backup. One of the databases can also be set as the default one, which is the default server database that users will connect to when accessing the Model Manager server from COMSOL Multiphysics. It is also the database initially selected as the Current Database in the web-based asset management system.
The Databases page, opened by clicking Databases in the System navigation sidebar, shows a table with all configured Model Manager server databases. If you selected during installation to let Model Manager server automatically set up a new database, or if you kept the suggested label when adding the database on first launch, the configuration of a single database — Default managed database — is initially shown in the table.
The table columns are:
The Label column — the label of the database. Used for display purposes in the Model Manager server web interface.
The Status column — the active and default status of a database.
Click on the label of a Model Manager server database on the Databases page to show more details for that database. Click the Add button to add a Model Manager server database.
The Default Managed Database
The Model Manager server database that is created if you selected Automatic under Add a Model Manager server database in the Server step of the installation uses three managed server components:
A managed search index server with label Default managed Apache Solr™ server — see Managed Search Index Servers.
The components are created with default locations for their data directories and backup directories based on the user account running the Model Manager server process — typically on the same disk as the installation itself. These locations are not ideal as, for example, that disk may have limited storage capacity and, moreover, backups are placed on the same physical disk as the data itself. You are strongly recommended to at least change the backup locations to a separate disk.
The Automatic option is only available if you select both the Managed PostgreSQL® and Managed Apache Solr™ checkboxes in the Products step of the Model Manager server installation. If you select just one of them, you must set up the Model Manager server database manually from the web interface — see Adding the Model Manager Server Database on First Login.
Adding Databases
You can add a Model Manager database to the Model Manager server from the Add Database page. This is useful, for example, if you want to use different options than The Default Managed Database but at the same time want to keep the default database around as a reference. You would also need to add the database if you want to connect to one that already exists on the file system, possibly created from another Model Manager server installation, if you opted out from automatically creating a database in the Server step of the Model Manager server installation, or if you want to restore from backup after a server failure that also included loss of the Preference Directory — see Backup and Restore of a Model Manager Server Database.
To add a Model Manager server database:
1
The label is only used for display purposes in the Model Manager server web interface.
2
Write an optional alias for the database in the Alias field. When set, the alias must only contain lowercase Latin alphabet characters, numerical characters, underscores, and dashes. The alias can contain, at most, 100 characters.
The alias field is required if you want to connect to a Model Manager server database other than the default server database from a COMSOL Multiphysics installation.
3
In the SQL Database > Type list, select among the options:
-
Managed — to use a SQL database in one of the existing managed SQL database servers or to create a new managed SQL database if none is available. See Managed SQL Databases for details.
-
External — to use a SQL database in an external SQL database server. See External SQL Databases for details.
4
In the Resources Directory > Type list, select among the options:
-
Managed — to use one of the existing managed resources directories or to create a new managed resources directory if none is available. See Managed Resources Directories for details.
-
External — to use an external directory on the file system. See External Resources Directories for details.
5
In the Search Indexes > Type list, select among the options:
-
Managed — to use search indexes in one of the existing managed search index servers or to create new managed search indexes if none are available. See Managed Search Indexes for details.
-
External — to use search indexes in an external search index server. See External Search Indexes for details.
6
Optionally click Test Connection in the upper right corner to verify that the Model Manager server can successfully connect to all components using the specified configuration settings. The button is disabled when new managed server components will be created as part of the setup.
7
Click Save to add the database.
Saving may take some time in case new data directories are created and initialized. Upon completion, you will be redirected to the Home page. Otherwise, you will either be returned to the Add Database page or be redirected to The Database Page. Read the message at the top of the page to see why the setup did not complete.
While the Model Manager server performs the database setup, the list of steps and their current status are shown in a Progress dialog. Click the Cancel button if you want to cancel the database setup. The step currently being processed will first finish before you are returned to the Add Database page. Make the necessary changes on the page and click Save to resume the setup.
The Database Page
The Database page contains details on the configuration of a Model Manager database added to the Model Manager server. The configuration fields are:
Label. The label of the Model Manager server database. Used for display purposes in the Model Manager server web interface.
Alias. An optional alias for the Model Manager server database.
The alias is used as an identifier to, for example, connect to the Model Manager server database from a COMSOL Multiphysics installation even when the database is not set as the default one.
SQL Database. The SQL database used by the Model Manager database.
Resources Directory. The resources directory used by the Model Manager database.
Search Indexes. The two search indexes used by the Model Manager database.
Click the Edit button to edit the configuration for the database.
Click the Test Connection button to test if the configuration can be used to connect to the database.
Click the Deactivate button to deactivate the database. Users will not be able to connect to the database from COMSOL Multiphysics or the Model Manager server web interface. Click Activate to make the database available again.
If you have configured multiple databases, you can click the Set as Default button to set the database as the current default. Click Remove as Default to remove it as the current default.
Click the Delete Permanently button to permanently delete the database configuration.
Clicking Delete Permanently will only delete the configuration for the Model Manager server database; it will not delete any data. You can add the database again using a new configuration.