Overview
Version
Report Server Version | Functional Change |
---|---|
11.0 | / |
11.0.3 | (1) When configuring an external database for the first time, you can determine whether to select Migrate Data to Database to Be Enabled. (2) The prompts displayed in the process of migrating data to external databases are refined for you to better understand the migration progress. |
Function Description
If an external database is configured for the report system, the report system will become more stable in cluster environments or situations with large amounts of data.
You can configure external databases during initialization or Oracle databases on the platform.
Note:
If the external database is configured, do not modify the username and password of the external database. Otherwise, project startup will fail.
If you need to modify them, see Modifying the Account and Password of the External Database.
External Database Preparation
Database Version
The following table describes the types and versions supported by the external database.
Database Type | Report Server Version | Supported Database Version |
---|---|---|
Oracle | 11.0 | 10g/11g/12c |
Hardware Configuration
Configuration Type | Minimum Configuration | Recommended Configuration |
---|---|---|
Memory | 1 GB | 2 GB |
CPU | 4 cores | 8 cores |
Internet speed | 50 Mbps | 100 Mbps |
FineDB-occupied space | 1 GB | 2 GB |
Server disk space | 100 GB | 200 GB |
Disk read/write speed | 50 MB/s | 100 MB/s |
Note:
1. You need to modify the occupied space according to the usage rate. You can configure the space to be one to two times larger than the size of the finedb folder in webapps/webroot/WEB-INF/embed (estimated size based on the actual size).
2. You are advised to use the memory with the same size of the memory reserved for the project configuration library.
3. The external database should be in the same network segment as the report project to avoid network fluctuations.
Database Creation
Account Creation
For Oracle databases, you had better create a separate account (create a table space and specify it as the default tables pace for the user) before configuration.
User creation:
CREATE USER "FINEDB" IDENTIFIED BY "123456" ACCOUNT UNLOCK DEFAULT TABLESPACE "USERS"
Permission assignment:
GRANT "CONNECT", "RESOURCE" TO "FINEDB"
ALTER USER "FINEDB" QUOTA UNLIMITED ON "USERS"
Table Space Creation
Create a FineDB table space for storing migration data in Oracle. You need to set Database Name to the name of the table space to which migration data is stored during subsequent external database configuration.
1. Different FineReport projects cannot share the same FineDB table space. Otherwise, data may become disordered.
2. You are advised to use an empty table space when migrating data from the FineDB database.
Driver Replacement
Database Version | Driver Replacement |
---|---|
10g | You need to replace the built-in-in driver as follows: (1) Download the ojdbc14.jar driver package from the Oracle official website. (2) Close the report project. (3) Delete the ojdbc8.jar driver package from the webapps\webroot\WEB-INF\lib directory of the project. (4) Upload the ojdbc14.jar driver package to the webapps\webroot\WEB-INF\lib directory of the project. (5) Restart the report project. |
11g/12c | You do not need to replace the built-in driver. The ojdbc8.jar driver package embedded in FineReport already meets the use requirement. |
External Database Configuration
External Database Configuration Entry
The three external database configuration entries are as follows:
(1) You can configure an external database for the decision-making system upon login as the super administrator for the first time.
(2) For systems that use built-in databases, you can log in to the decision-making system as the admin, choose System Management > System Setting > General > External Database > To Be Configured, and configure the external database for the system for the first time.
(3) For systems for which external databases have been enabled, you can log in to the decision-making system as the admin, choose System Management > System Setting > General > External Database > Configured, and migrate data to a new external database for the system.
External Database Configuration
After entering the external database configuration page, select the database type and enter the corresponding information of the actual database.
Setting Item
The following table describes each setting item.
Setting Item | Description |
---|---|
Database Type | Select Oracle. |
Driver | This parameter does not need to be modified manually. |
Database Name | For details, see the table space name in section "Database Creation." Note: Your project must not share the table space with other projects. You are advised to create a table space. The table space name can contain only numbers, letters, underscores, and periods (.). |
Username/Host/Password/Port | Set these parameters according to the actual information of the local database. Note: The host name can contain only numbers, letters, underscores, hyphes (-), and periods (.). You need to have the create, delete, alter, update, select, insert, and index permissions. |
Mode | You can select a mode from the drop-down list. After correctly setting the above parameters, select Click to Connect Database from the drop-down list. The system will automatically connect to the database and read modes. You just need to select a node (better select the one corresponding to the database username). Note: If a prompt indicating database connection failure is displayed, check the settings above. |
Database Connection URL | The database connection URL can be set as following: (1) Oracle standalone jdbc:oracle:thin:@<host>:<port>:<SID>2) Oracle Cluster Method 1: jdbc:oracle:thin:@//<host>:<port>/<service_name> Method 2: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.2)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxrac))) |
Migrating Data to the Database to Be Enabled
You can determine whether to select Migrate Data to Database to Be Enabled based on your own needs. The following describes the details:
(1) Select Migrate Data to Database to Be Enabled when the new external database is empty.
After you click Enable New Database, the platform data of the original FineDB database will be migrated to the new external database.
(2) Select Migrate Data to Database to Be Enabled when the platform data already exists in the new external database.
After you click Enable New Database, the message "The platform data already exists in the database. Before data import, the original platform data will be cleared. Sure to connect to the database?" pops up.
After you click OK, the original platform data will be cleared, and the platform data of the original FineDB database will be migrated to the new external database.
(3) Deselect Migrate Data to Database to Be Enabled when the new external database is empty.
After you click Enable New Database, the message "The target database is a new database and can be used after the current data is migrated to the target database." pops up.
After you click Migrate and Enable, the platform data of the original FineDB database will be migrated to the new external database.
(4) Deselect Migrate Data to Database to Be Enabled when the platform data already exists in the new external database.
After you click Enable New Database, the project will automatically detect whether the JAR package version corresponding to the data in the target database is consistent with that in the current project.
If the versions are inconsistent, the message "Unable to enable it. Project version required to enable the new database: xxx Current project version: xxx Ensure that the project version is consistent." is displayed. In this case, you fail to configure external databases.
If the JAR package versions are consistent and the original FineDB database is a built-in database, the new external database is enabled directly.
If the JAR package versions are consistent and the original FineDB database is an external database, the configuration information of the original database is automatically backed up before migration (as result of which the db.properties.bak file is generated in webapps\webroot\WEB-INF\config), and the new external database is enabled directly.
Successful Migration
Wait until the migration is successful. Different pop-up prompts may appear depending on the migration situation.
(1) New external database using data of the original FineDB database
The message "The target database has been enabled successfully." pops up. Click OK to complete the migration.
(2) New external database using data of the original FineDB database (which is a built-in database)
The message "Successfully switched to the target database. If data is different between the old and new databases, system running may be affected. You are advised to restart the project for normal use." pops up.
Click OK and restart the report project to complete the migration.
(3) New external database using data of the original FineDB database (which is an external database)
The following two messages pop up:
Successfully switched to the target database. If data is different between the old and new databases, system running may be affected. You are advised to restart the project for normal use.
The original database configuration has been backed up to the config folder. You can use the backup file to restore the database configuration if necessary.
Click OK and restart the report project to complete the migration.
Deleting Built-in Database Data Connections
The built-in FineDB database is an HSQL database that creates an in-memory database when used, which will occupy a large amount of memory when the data volume is large.
Therefore, after configuring the external database, check whether a data connection exists for the built-in FineDB database in Data Connection.
If so, delete the data connection in time. Otherwise, the connection will continue to occupy server memory.