Page History
Section | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Configure CRC data sourceEarlier in during the data installation you created new crcdata tables and in order for the CRC to communicate with the database it needs to know where these tables reside. This information is configured in the crc-ds.xml file. Things to keep in mind when configuring your datasources:
Steps to configure data sourcesThe following steps define how to configure your data sources for the CRC Cell. These steps include example configurations for Oracle, PostreSQL and SQL Server.
Steps to configure data sourcesThe following steps define how to add the data source for the new crcdata tables. The steps include example configurations for Oracle, PostgreSQL, and SQL Server.
| ||||||||||||
| ||||||||||||
indent | ||||||||||||
|
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
YOUR_I2B2_SRC_DIR\edu.harvard.i2b2.crc\etc\ |
Level | 1 |
---|
Step 2: Add a new datasource and update the following information: (see examples shown below)
- Set the jndi-name and pool-name to OMOP_CDM_{ORACLE | POSTGRESQL | SQLSERVER}.
- Update the connection-url to point to the location of the database containing the crcdata tables.
- Update the user-name and password to accurately reflect the database user you setup during the Data Installation.
- Verify the jdbc driver in the connection-url, driver-class, and driver accurately reflect the type of database you are connecting to.
Step 3: Save the changes and close the file.
Oracle Database
Code Block | ||||
---|---|---|---|---|
| ||||
<datasource jta="false" jndi-name="java:/QueryToolDemoDSOMOP_CDM_ORACLE" pool-name="QueryToolDemoDSOMOP_CDM_ORACLE" enabled="true" use-ccm="false"> <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url> <driver-class>oracle.jdbc.OracleDriver</driver-class> <driver>ojdbc6.jar</driver> <security> <user-name>i2b2demodata</user-name> <password>demouser</password> </security> <validation> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource> |
PostgreSQL Database
Code Block | ||||
---|---|---|---|---|
| ||||
<datasource jta="false" jndi-name="java:/CRCBootStrapDSOMOP_CDM_POSTGRESQL" pool-name="CRCBootStrapDSOMOP_CDM_POSTGRESQL" enabled="true" use-ccm="false"> <connection-url>jdbc:postgresql://localhost:5432/i2b2</connection-url> <driver-class>org.postgresql.Driver</driver-class> <driver>postgresql-9.2-1002.jdbc4.jar</driver> <security> <user-name>i2b2hive</user-name> <password>demouser</password> </security> <validation> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource> <datasource jta="false" jndi-name="java:/QueryToolDemoDS" pool-name="QueryToolDemoDS" enabled="true" use-ccm="false"> <connection-url>jdbc:postgresql://localhost:5432/i2b2</connection-url> <driver-class>org.postgresql.Driver</driver-class> <driver>postgresql-9.2-1002.jdbc4.jar</driver> <security> <user-name>i2b2demodata</user-name> <password>demouser</password> </security> <validation> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource> |
SQL Server Database
Code Block | ||||
---|---|---|---|---|
| ||||
<datasource jta="false" jndi-name="java:/CRCBootStrapDSOMOP_CDM_SQLSERVER" pool-name="CRCBootStrapDSOMOP_CDM_SQLSERVER" enabled="true" use-ccm="false"> <connection-url>jdbc:sqlserver://localhost:1433</connection-url> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <driver>sqljdbc4.jar</driver> <security> <user-name>i2b2hive</user-name> <password>demouser</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"></valid-connection-checker> <validate-on-match>false</validate-on-match> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource> <datasource jta="false" jndi-name="java:/QueryToolDemoDS" pool-name="QueryToolDemoDS" enabled="true" use-ccm="false"> <connection-url>jdbc:sqlserver://localhost:1433</connection-url> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <driver>sqljdbc4.jar</driver> <security> <user-name>i2b2demodata</user-name> <password>demouser</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"></valid-connection-checker> <validate-on-match>false</validate-on-match> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource> |
indent
Level | 1 |
---|
3. If your environment has multiple projects pointing to different data sources then copy the <datasource> section for each project data source.
indent | ||
---|---|---|
| ||
4. Update the jndi-name and pool-name to reflect the name of the second project . |
Level | 3 |
---|
Second Data Source Configuration
code
<datasource jta="false" jndi-name="java:/QueryToolDemoDS"
pool-name="QueryToolDemo2DS" enabled="true" use-ccm="false">
<connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<driver>ojdbc6.jar</driver>
<security>
<user-name>i2b2demodata2</user-name>
<password>demouser</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
Info | ||
---|---|---|
| ||
The above example is for an Oracle database. If your database is SQL Server or PostgreSQL then you will need to copy the <datasource> section for your type database connection. Do not use this one as it will not work. |
indent | ||
---|---|---|
| ||
5. Save the changes and close the file. |