- First, Locate and copy the necessary jdbc driver for your database into <frevvo-home>\tomcat\lib.
- Edit the file <frevvo-home>\tomcat\conf\server.xml
- You will see a data source definition for the frevvo database type name="jdbc/sharedfrevvoDS". See the sample below of the HSQLDB data source in the frevvoserver.xml file.
- Comment out the pair of the definitions for the default database (HSQLDB) using the <!-- --> comment characters. The entire section must be commented out:
<!-- SQLSERVER Resource --> <Resource auth="Container" maxActive="200" maxIdle="20" maxWait="10000" validationQuery="select 1" testOnBorrow="true" testOnIdle="true" timeBetweenEvictionRunsMillis="10000" removeAbandoned="true" logAbandoned="true" name="jdbc/sharedfrevvoDS" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" username="root" password="" type="javax.sql.DataSource" url="jdbc:sqlserver://localhost:1433;databaseName=frevvo;"/>
Database configuration has been removed from the <frevvo-home>\tomcat\conf\Catalina\localhost\frevvo.xml file. It is now done in the C:<frevvo-home>\tomcat\conf\server.xml file. Also, notice the database resource name has been changed to jdbc/sharedfrevvoDS. When you configure your database, make the changes to the v7.0 server.xml. Do not copy configured sections from a frevvo.xml of a previous release into the v7.0 server.xml file.
Configure the frevvo database
- Locate the sharedfrevvoDS data source url parameter and decide on a name for the frevvo database. For the SQL Server it would look like this: "url="jdbc:sqlserver://localhost:1433;databaseName=frevvo". You can change the name "frevvo" to whatever you wish, "
" for example. But it must match the database name you create in your SQL server. See configure the connection Url below.
- Create a UTF-8 encoded database "frevvo" (assuming you left the url parameter database name as the default) in your SQL server
- Set the sharedfrevvoDS data source url parameter to your database server. See configure the connection Url below.
Set the sharedfrevvoDS data source username and password parameters to a user that has read and write permissions to the frevvo database.
- The frevvo database setup is now complete.
will create all the necessary tables upon startup.
For your selected database type in frevvoserver.xml:
1) Set the frevvoDS sharedfrevvoDS data source url parameter to your database server. If
2) Verify that the user and password required to connect to the frevvo database are correct.
3) Make sure that the user configured in the data sources has permissions to read and write to the frevvo database.
If you are using SQL Server, it is recommended that you append the sendStringParametersAsUnicode property with a value of false to your database connection URL. This property will improve performance. You can find more information about this property on this Microsoft website. If you do not see the property, when configuring the Connection URL to your database, add it.
Non Standard Databases
If you are trying a different database type and do not see an example in frevvoserver.xml for your database, you can create a new data source entry. Hibernate supports the following dialects however
The frevvo database must be created with UTF-8 encoding.
If you're using a improperly encoded database for frevvoDS sharedfrevvoDS you may run into one or more of the following runtime issues:
You can convert a database and/or table to UTF-8 . Using using the mySQL MySQL configuration file or via the mySQL MySQL cmd tool.
Via the configuration Configuration file:
[mysqld] default-character-set=utf8 default-collation=utf8_unicode_cii
Via the mySQL MySQL cmd tool:
ALTER DATABASE frevvo CHARACTER SET utf8 COLLATE utf8_unicode_ci; ALTER TABLE `frevvo16089`.`formsubmission` CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Configure Snapshot Isolation for SQL Server Databases
If you are using SQL Server as your Live Forms database, it is highly recommended that you turn on the READ COMMITTED SNAPSHOT setting in the database.
You do not have to do this if you are using MySQL or Oracle databases because the READ SUBMITTED SNAPSHOT is turned on by default.
There are two ways to turn on the option:
Using DDL ( Data Definition Language) - Run the commands listed below
ALTER DATABASE <your frevvo database schema> - replace <your frevvo database schema> with the name of your frevvo database schema SET READ_COMMITTED_SNAPSHOT ON
- Using SQL Server Management Studio:
- Turn on the “Is Read Committed Snapshot On” Option under database properties.
Install a JDBC Driver
If you don't find what you need pre-installed you will need to locate a driver compatible to your database. Usually you can download your driver from the internet. Try one of these locations
- SQL Server JDBC Driver
- MySQL - 5.1.11 or later is recommended to resolve Tomcat memory leak issues. Versions 5.1.31 - 5.1.36 of the MySQL JDBC driver are recommended if you are using MySQL 5.6+
Once you have the driver you need, copy it to <frevvo-home>/tomcat/lib.
It is also appropriate to copy the driver into any location that is in the CLASSPATH of your servlet container. In a tomcat installation another . Another location would be <CATALINA_HOME>/lib.