...
...
...
...
...
...
...
...
...
...
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
These steps assume you have already installed the frevvo-tomcat bundle and the Database Connector and have verified that the connector is up and running.
- Stop frevvo. You do not have to stop the Insight Server.
Create a folder named <frevvo-home>\config i.e. c:\frevvo\config.
Create the file <frevvo-home>\config\configuration.xml. Your SQL statements will be added to this file.
Copy/Paste the follow text into configuration.xml. This skeleton defines test querysets named myStore and BIRT to get you started.
Code Block <dbconnector> <queryset name="myStore"> </queryset> <queryset name="BIRT"> </queryset> </dbconnector>
Create the file <frevvo-home>\tomcat\conf\dbconnector.properties. If this file already exists you will add your database datasource properties to it.
- Copy/Paste one of the two following samples into dbconnector.properties.
Edit the frevvo.connectors.database.configuration line to be the path to your configuration.xml file.
Code Block title Use this sample if all querysets use the same database frevvo.connectors.database.configuration=file:///C:/frevvo/config/configuration.xml dbconnector.queryset.resource-def.url=<the url to your database> dbconnector.queryset.resource-def.user=<your database username> dbconnector.queryset.resource-def.password=<your database password>
The @myStore and @BIRT in the this sample will be your queryset names in your configuration.xml
Code Block title Use this sample if querysets use different databases frevvo.connectors.database.configuration=file:///C:/frevvo/config/configuration.xml dbconnector.queryset@myStore.resource-def.url=<the url to your database #1> dbconnector.queryset@myStore.resource-def.user=<your database username> dbconnector.queryset@myStore.resource-def.password=<your database password> dbconnector.queryset@BIRT.resource-def.url=<the url to your database #2> dbconnector.queryset@BIRT.resource-def.user=<your database username> dbconnector.queryset@BIRT.resource-def.password=<your database password>
Your Datasource Properties depend on your JDBC driver type. To see examples of Datasource Definitions,Expand title Click here MySQL example
This sample shows a configuration.xml queryset named "alltest" against a MySql database named "test" where the database login user is "root" and the password is "root".
Code Block dbconnector.queryset@alltest.resource-def.url=jdbc:mysql://<your database server>:<port>/test dbconnector.queryset@alltest.resource-def.user=root dbconnector.queryset@alltest.resource-def.password=root
SQL Server Example
This example connects to a SQL Server driver
Code Block dbconnector.queryset@BIRT.resource-def.url=jdbc:sqlserver://<your database server>;DatabaseName=<your database name> dbconnector.queryset@BIRT.resource-def.user=<your database user> dbconnector.queryset@BIRT.resource-def.password=<your database password>
SQL jTDS Example
This example connects to SQL Server using the jTDS driver. The jTDS driver requires the additional validationQuery property.
Code Block dbconnector.queryset@myStore.resource-def.url=jdbc:sqlserver://<your database server>:<port>;DatabaseName=<your database name> dbconnector.queryset@myStore.resource-def.user=<your database name> dbconnector.queryset@myStore.resource-def.password=<your database password> dbconnector.queryset@myStore.resource-def.validationQuery=SELECT 1
If your SQL server has multiple SQL named instances, use the url instance parameter as shown here for an instance named xyzzy.
Code Block dbconnector.queryset@myStore.resource-def.url=jdbc:sqlserver://<your database server>:<port>;DatabaseName=<your database name>;instance=xyzzy
Oracle 11g
This example connects to an Oracle 11g driver.
Code Block dbconnector.queryset@mystore.resource-def.url=jdbc:oracle:thin:@<your database server>:<port>:ServiceName dbconnector.queryset@myStore.resource-def.user=<your database user> dbconnector.queryset@myStore.resource-def.password=<your database password>
Restart Restart frevvo
- Browse the status urlhttp://<host>:<port>/database/status
- Your skeleton database configuration is successful when the status returns Passed! for each queryset.
- You are now ready to define your SQL Queries.
...
If you prefer to define your datasources on the container level, the recommended approach is to define the datasource in the container and then use a resource-ref in the Database Connector properties file to reference it.
frevvo only supports/certifies the Database Connector running in the Apache Tomcat container. Refer to our Supported Platforms for the list of Application Servers and databases supported/certified by frevvo.
...
Add the enabled= attribute with a value of false to the <querySet/> or individual <query> elements in the configuration.xml file to completely disable it.
Code Block <dbconnector> <querySet name="BIRT" enabled="false" ...>
The same can be done by adding the enabled property with a value of false as shown below to the dbconnector.properties(standalone bundle) or dbconnector.properties (tomcat bundle).
Code Block dbconnector.querySet@<queryset name>.enabled=false
This property disables all querysets. Add it to the dbconnector.properties(standalone bundle) or dbconnector.properties (tomcat bundle).
Code Block dbconnector.querySet.enabled=false
...