Section | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Select your database type
- First, [[#Install_a_JDBC_Driver | Locate and copy the necessary jdbc driver]] for for your database into <frevvo-home>\tomcat\lib.
- Edit the file <frevvo-home>\tomcat\conf\Catalina\localhost\frevvo.xml
- You will see two data source definitions for each database type. '''name="jdbc/frevvoDS"''' is is the form submissions database. ''' name="jdbc/userDS"''' is the user database. See the above sample of the HSQLDB data source in the frevvo.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:
...
For your selected database type in frevvo.xml
- Locate the '''frevvoDS''' data frevvoDS data source url parameter.<nowiki>urlurl="jdbc:jtds:sqlserver://localhost/frevvo"/></nowiki>>. You can change the name "frevvo" to whatever you wish, "Live Forms forms" for example. But it must match the database name you create in your SQL server. See [[#Verify_Connection_Url | verify connection Url]] below.
- Create a [[#UTF8_Encoded_Database | utf8 encoded]] database "frevvo" (assuming you left the url parameter database name as the default) in your SQL server
- In the Live Forms installation locate the script <frevvo-home>/data/sql/forms-<database type>.sql. Ex: for mySQL the script is named <frevvo-home>/data/sql/forms-mysql5.sql
- [[#Run_the_SQL_Scripts | Run that script]] in your "Live Forms" database. That will create all the tables required to persist submissions
- Set the '''frevvoDS''' data source parameters username and password to a user that has write permissions to the "Live Forms" database.
- The submissions database setup is now complete.
...
- Locate the '''userDS ''' data source url parameter.<nowiki>url="jdbc:jtds:sqlserver://localhost/users"/></nowiki>. You can change the name "users" to whatever you wish, "Live Forms users" for example. But it must match the database name you create in your SQL server. See [[#Verify_Connection_Url | verify connection Url]] below below.
- Create a [[#UTF8_Encoded_Database | utf8 encoded]] database "users" (assuming you left the url parameter database name as the default) in your SQL server
- In the Live Forms installation locate the script <frevvo-home>/data/sql/users-<database type>.sql. Ex: for mySQL the script is named <frevvo-home>/data/sql/users-mysql5.sql
- [[#Run_the_SQL_Scripts | Run that script]] in in the "users" database
- Set the '''userDS''' data userDS data source username and password parameter to a user that has write permissions to your "users" database.
...
1) verify that the "url" parameter is pointing to the correct server. If Live Forms and and the database server are collocated "localhost" may be fine.<br/>
The Url parameters depend on the database type and installation choices made when your DBA installed your database software. Consult your DBA for the correct connection values. For example, SQL server installed on a non-default port and running on a machine named e00sca will require that you add a port number and host name to the Url. For example:
...
As of SQL 2000, Microsoft SQL allows installation of multiple [http://msdn.microsoft.com/en-us/library/aa176582%28v=sql.80%29.asp SQL named instances]. If your SQL server was installed this way you must use the instance parameter. For example if you database instance was named xyzzy:
...
If you are trying a different database type and do not see an example in frevvo.xml for your database, you can create a new data source entry. Hibernate supports the following dialects however Live Forms has only been certified to run with a subset of these databases. For additional dialects see Hibernate documentation. [[#Configure_the_database | See the certified database list above]]:
- org.hibernate.dialect.HSQLDialect
- org.hibernate.dialect.MySQL5Dialect
- org.hibernate.dialect.MySQL5InnoDBDialect
- org.hibernate.dialect.Oracle9Dialect
- org.hibernate.dialect.OracleDialect
- org.hibernate.dialect.PostgreSQLDialect
- org.hibernate.dialect.SQLServerDialect
- org.hibernate.dialect.Sybase11Dialect
...