Initializing the database system as a non-admin database user
The database initialization system allows you to use a non-admin database user for JReport Server. However, the database initialization has to be divided into three phases:
- The database administrator creates new database tables using script files.
- The non-admin database user starts JReport Server. In this phase, the old version's database tables will be updated if they exist. If the server has updated the old version's table data, you will be able to see a record of it in the debug file.
- The database administrator deletes the old version' tables in the database using script files.
Script files
JReport Server supports these different databases: Apache Derby, HSQLDB, MySQL, Microsoft SQL Server, IBM DB2, Oracle, Sybase, and Informix.
The script files are stored in <install_root>\script_files
. There are three types of script files:
Script files used for creating new database tables
The following files are used to create new database tables, and are stored in <install_root>\script_files\create_new_tables
:
- db2_c.txt - Creates new tables for DB2 database.
- derby_c.txt - Creates new tables for Derby database.
- hsqldb_c.txt - Creates new tables for HSQLDB database.
- informix_c.txt - Creates new tables for Informix database.
- mysql_c.txt - Creates new tables for MySQL database (for single-byte charset, e.g latin1).
- mysql_mb2_c.txt - Creates new tables for MySQL database (for MBCS two-byte charset, e.g. gbk).
- mysql_mb3_c.txt - Creates new tables for MySQL database (for MBCS three- byte charset, e.g. utf8).
- oracle_c.txt - Creates new tables for Oracle database.
- sqlserver_c.txt - Creates new tables for Microsoft SQL Server database.
- sybase_c.txt - Creates new tables for Sybase database.
Script files used for deleting the old version' tables
The following files are used to delete the old version' tables, and are stored in <install_root>\script_files\delete_old_tables
:
- db2_do.txt - Deletes old version tables for DB2 database.
- derby_do.txt - Deletes old version tables for Derby database.
- hsqldb_do.txt - Deletes old version tables for HSQLDB database.
- informix_do.txt - Deletes old version tables for Informix database.
- mysql_do.txt - Deletes old version tables for MySQL database.
- oracle_do.txt - Deletes old version tables for Oracle database.
- sqlserver_do.txt - Deletes old version tables for Microsoft SQL Server database.
- sybase_do.txt - Deletes old version tables for Sybase database.
Script files used for deleting the current version' tables
The following files are used to delete the current version' tables, and are stored in <install_root>\script_files\delete_current_tables
:
- db2_dc.txt - Deletes current version tables for DB2 database.
- derby_dc.txt - Deletes current version tables for Derby database.
- hsqldb_dc.txt - Deletes current version tables for HSQLDB database.
- informix_dc.txt - Deletes current version tables for Informix database.
- mysql_dc.txt - Deletes current version tables for MySQL database.
- oracle_dc.txt - Deletes current version tables for Oracle database.
- sqlserver_dc.txt - Deletes current version tables for Microsoft SQL Server database.
- sybase_dc.txt - Deletes current version tables for Sybase database.