If you can’t use the js-install scripts to create the JasperReports Server database and the sample databases, you can create them manually. Follow the instructions for your database to create the repository database and optional sample databases:
• | PostgreSQL |
• | MySQL |
• | Oracle |
• | DB2 |
• | SQL Server |
The commands in these sections have been tested at Jaspersoft, but the commands you need to use on your database instance may be different.
PostgreSQL
To manually create the JasperReports Server database in PostgreSQL:
1. | On the Windows, Linux, or Mac command line, enter these commands to create and initialize the JasperReports Server database: |
2. | (Optional) Run the following commands if you want to install sample databases: |
3. | If you did not install the optional sample databases, complete the installation with these commands: |
cd <js-install>/buildomatic
js‑ant import-minimal-pro
js-ant deploy-webapp-pro
If you installed the optional sample databases, complete the installation with these commands:
cd <js-install>/buildomatic
js‑ant import-sample-data-pro
js-ant deploy-webapp-pro
For more information about executing the Ant scripts, see Installing the WAR File Manually.
4. | Set Java JVM Options, as described in Setting JVM Options for Application Servers. This step is required. |
5. | Set up the JasperReports Server License as described in Setting Up the JasperReports Server License. This step is required. |
MySQL
To manually create the JasperReports Server database in MySQL:
The MySQL client software, mysql.exe or mysql, can be used to interact with the MySQL database.
For specific details on connecting to the MySQL database and setting privileges for databases and db users, please refer to the documentation provided with your database. |
1. | On the Windows, Linux, or Mac command line, enter these commands to create and initialize the JasperReports Server database: |
2. | (Optional) Run these commands to install sample databases: |
3. | If you did not install the optional sample databases, complete the installation with these commands: |
cd <js-install>/buildomatic
js‑ant import-minimal-pro
js-ant deploy-webapp-pro
If you installed the optional sample databases, complete the installation with these commands:
cd <js-install>/buildomatic
js‑ant import-sample-data-pro
js-ant deploy-webapp-pro
For more information about executing the Ant scripts, see Installing the WAR File Manually.
4. | Set Java JVM Options, as described in Setting JVM Options for Application Servers. This step is required. |
5. | Set up the JasperReports Server License as described in Setting Up the JasperReports Server License. This step is required. |
Oracle
To manually create the JasperReports Server database in Oracle:
The Oracle client software, sqlplus.exe or sqlplus, can be used to interact with Oracle.
For specific details on connecting to the Oracle database and setting privileges for databases and db users, please refer to the documentation provided with your database. |
1. | On the Windows, Linux, or Mac command line, enter these commands to create and initialize the JasperReports Server database: |
2. | (Optional) Special edit to the sugarcrm.sql script which creates the sugarcrm sample database. The sqlplus command line tool interprets SQL statements differently than a JDBC call (that is, the way buildomatic executes SQL scripts). Because of this, the sugarcrm.sql file must be edited in order to execute using sqlplus. To make these edits do the following: |
• | Unzip the sugarcrm.zip file to get the sugarcrm.sql file. Open sugarcrm.sql for editing: |
• | Uncomment the "-- set define off" line to look like this "set define off" (Line 7) |
• | Uncomment the "--/" line that follows the CREATE TRIGGER statements (there are 12 of these toward the very end of the file on line 71,282. Just before the CREATE INDEX statements). Change to be just "/". (This terminates the trigger procedure definition in sqlplus.) |
• | Save the file. |
If you build and load the sample databases using buildomatic, the NLS_LANG setting is automatically handled via a JDBC driver setting. If you load the sample databases using buildomatic, you will not need to set any variables or make any script edits. |
3. | (Optional) Set the NLS_LANG variable. The sugarcrm database has test data that requires a specific NLS_LANG setting in order to load into Oracle correctly. You will need to set this in your shell environment if you are manually loading the sugarcrm database. |
Windows: | |
Linux: |
4. | (Optional) Run the following commands if you want to install sample databases: |
5. | If you did not install the optional sample databases, complete the installation with these commands: |
cd <js-install>/buildomatic
js‑ant import-minimal-pro
js-ant deploy-webapp-pro
If you installed the optional sample databases, complete the installation with these commands:
cd <js-install>/buildomatic
js‑ant import-sample-data-pro
js-ant deploy-webapp-pro
For more information about executing the Ant scripts, see Installing the WAR File Manually.
6. | Set Java JVM Options, as described in Setting JVM Options for Application Servers. This step is required. |
7. | Set up the JasperReports Server License as described in Setting Up the JasperReports Server License. This step is required. |
DB2
To manually create the JasperReports Server database in DB2:
The DB2 client software, db2 or db2cmd, can be used to interact with DB2.
For specific details on connecting to the DB2 database and setting privileges for databases and db users, please refer to the documentation provided with your database. |
1. | Change to the following directory: |
cd <js-install>/buildomatic/install_resources/sql/db2
2. | Enter these commands in the DB2 command window to create and initialize the repository database, called jsprsrvr in DB2 to conform to the 8-character limitation: |
3. | (Optional) Run the following commands in the DB2 command window if you want to install sample databases: |
4. | If you did not install the optional sample databases, complete the installation with these commands: |
cd <js-install>/buildomatic
js‑ant import-minimal-pro
js-ant deploy-webapp-pro
If you installed the optional sample databases, complete the installation with these commands:
cd <js-install>/buildomatic
js‑ant import-sample-data-pro
js-ant deploy-webapp-pro
For more information about executing the Ant scripts, see Installing the WAR File Manually.
5. | Set Java JVM Options, as described in Setting JVM Options for Application Servers. This step is required. |
6. | Set up the JasperReports Server License as described in Setting Up the JasperReports Server License. This step is required. |
Further considerations:
• | If you are using DB2 8.1, set the LOGFIL_SIZ parameter to at least 3000 to avoid possible log file errors while loading the foodmart database. Configure your foodmart database right after creating it by using Control Center. |
• | If JasperReports Server is deployed on the same host as DB2, delete the following file to avoid conflicts: |
<db2>/SQLLIB/java/db2jcc.jar
SQL Server
Using the sqlcmd utility to manually build the jasperserver database.
For specific details on connecting to the SQL Server database and setting privileges for databases and db users, please refer to the documentation provided with your database. |
To manually create the JasperReports Server database in SQL Server:
1. | Open a Command Prompt and enter the following commands using the administrator (sa) user name and password. |
2. | From the Windows Start Menu, select Microsoft SQL Server > SQL Server Management Studio. |
3. | Connect to SQL Server as the administrative database user, and check that the jasperserver database appears in the Object Explorer. |
4. | Expand Tables in the jasperserver database, and check that the tables have been added. |
To manually create the optional sample databases in SQL Server:
5. | Extract the files in the sugarcrm.zip file to the level above your current directory, placing the sugarcrm.sql file in this directory: |
<js-install>jasperserverbuildomaticinstall_resourcessqlsqlserver
6. | Enter these commands to create and initialize the sugarcrm database: |
7. | Extract the files in the FoodMartCreateData.zip into your current directory. |
8. | Enter these commands to create and initialize the foodmart database: |
To complete the manual installation of databases in SQL Server:
9. | If you did not install the optional sample databases, complete the installation with these commands: |
cd <js-install>/buildomatic
js‑ant import-minimal-pro
js-ant deploy-webapp-pro
If you installed the optional sample databases, complete the installation with these commands:
cd <js-install>/buildomatic
js‑ant import-sample-data-pro
js-ant deploy-webapp-pro
For more information about executing the Ant scripts, see Installing the WAR File Manually.
10. | Set Java JVM Options, as described in Setting JVM Options for Application Servers. This step is required. |
11. | Set up the JasperReports Server License as described in Setting Up the JasperReports Server License. This step is required. |
Recommended Comments
There are no comments to display.