Connecting to databases

To allow LuciadFusion Studio to connect to a database:

  1. Create a file that specifies the database connection properties, such as the URL and the table name.
    For example:

    • Add an .ora file to connect to an Oracle database table

    • Add an .mss file to connect to Microsoft SQL Server database table

    • Add a .pgs file to connect to a PostgreSQL database table

  2. Add the file to LuciadFusion Studio as you would for any other file, either by setting up the file location as a data root, or by uploading the file.

See the samples/resources/Data folder for examples of database connection files.

For more information about the connection properties, see the documentation pages for the database type you want to connect to.

If you are using an Oracle database with temporal columns, it is recommended to run your LuciadFusion server with the following VM parameter:

-Doracle.jdbc.J2EE13Compliant=true

When set, the Oracle database driver uses the Java-compliant java.sql.Timestamp type instead of the proprietary oracle.sql.TIMESTAMP type for timestamp columns. This makes sure that the timestamp information can correctly be served using an OGC WFS service.

Testing database connections

If you change a database connection properties file, LuciadFusion Studio needs to re-crawl or re-upload the changed file before you can test the connection. Alternatively, you can use the Data Viewer sample, and re-open the connection file after every change. You can select the Data Viewer sample from the start.jar application launcher.