#### Configuring the server database in the dbconfig.xml file

In dbconfig.xml, you can configure the server database using one of two methods. One is to specify the URL, driver, user and password individually. This method of configuration can be modified through the JReport Administration page. For example:

    <database name="profiling/systables">
    <url>...</url>
    <driver>...</driver>
    <user>...</user>
    <password>...</password>
    </database>

Note: The <user> and <password> information is encrypted. The <user> and <password> tags will be replaced by the <encrypt-sign> tag after JReport Enterprise Server's startup. If you want to change user or password, delete the <encrypt-sign> tag and add the <user> and <password> tags in the dbconfig.xml file.

The other is to use the <datasource> tag. For example:

    <database name="profiling/systables">
    <datasource>
    jdbc://user:password@jdbc:odbc:jreport-systables#driver=sun.jdbc.odbc.JdbcOdbcDriver
    </datasource>
    </database>

Here are two examples for your reference.

The following example is for Oracle. Modify the dbconfig.xml file as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <dbconfig>
    <workspace name="defaultRealm">
    <database name="systables">
    <user>test</user>
    <url>
    jdbc:oracle:thin:@dbhost:1521:ora9i
    </url>
    <password>1234</password>
    <driver classpath="D:\DBDriver\Oracle\oracle9i\ojdbc14.jar">
    oracle.jdbc.driver.OracleDriver
    </driver>
    </database>
    </workspace>
    </dbconfig>

The following example is for a DataDirect driver. Modify the dbconfig.xml file as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <dbconfig>
    <workspace name="defaultRealm">
    <database name="systables">
    <user>test</user>
    <url>
    jdbc:datadirect:sqlserver://dbhost:1433;DatabaseName=sysdb
    </url>
    <password>1234</password>
    <driver classpath="D:\DBDriver\connectjdbc\lib\base.jar;
    D:\DBDriver\connectjdbc\lib\util.jar;
    D:\DBDriver\connectjdbc\lib\sqlserver.jar">
    com.ddtek.jdbc.sqlserver.SQLServerDriver
    </driver>
    <dbtype>Microsoft SQLServer</dbtype>
    </database>
    </workspace>
    </dbconfig>

Reference: For more information about the DataDirect driver, refer to DataDirect documentation.