OMOP
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section

Configure

data source files
Section

Configure CRC data source

Earlier in the 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:

  • The crcdata tables were created during the Data Installation stage of this document.
  • The other database tables (hivedata, pmdata, etc.) were created when setting up your i2b2 database (demo environment - i2b2 Installation Guide).
  • The CRCBootStrapDS points to the data source for your CRC_DB_LOOKUP table which is a hivedata table.
    • The <user-name> and <password> need to match the database user you set up for your hivedata. In the i2b2 demo database this is i2b2hive and demouser.
    • Only 1 CRCBootStrapDS should reside in the crc-ds.xml file. If your datasource file already has one do not add another.
  • The QueryToolDemoDS points to the data source for your demodata tables.
    • The <user-name> and <password> need to match the database user you set up for your demodata. In the i2b2 demo database this is i2b2demodata and demouser.
  • The <connection_url> needs to have the following:
    • The correct JDBC information for your type of database.
    • The correct location of the database containing your crcdata tables. (These may or may not reside in the same location as your hivedata)
  • Both the <driver-class> and <driver> need to accurately reflect the type of database you are connecting to.

 

Steps to configure data sources

The following steps define how to configure your data sources for the CRC Cell. These steps include example configurations for Oracle, PostreSQL and SQL Server.

html-text
<div class="i2b2-panel">
        	<table class="i2b2-warning">
            <colgroup>
                		<colgroup>
			<col width="24">
                <col>
            			<col>
		</colgroup>
            <tbody>
                <tr>
                    <td>
                        		<tbody>
			<tr>
				<td>
					<img src="https://community.i2b2.org/wiki/download/attachments/14091764/icon_warn.png" width="16" height="16" align="absmiddle" alt="warning" border="0">
                    </td>
                    <td>
                        <b>Warning</b>
                        <br>The <b>crc-ds.xml</b> file should contain only 1 CRCBootStrapDS. If your datasource file already has one do not add another one.
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
 

  • The QueryToolDemoDS points to the data source for your demodata tables.
    • The <user-name> and <password> need to match the database user you set up for your demodata. In the i2b2 demo database this is i2b2demodata and demouser.
  • The <connection_url> needs to have the following:
    • The correct JDBC information for your type of database.
    • The correct location of the database containing your crcdata tables. (These may or may not reside in the same location as your hivedata)
  • Both the <driver-class> and <driver> need to accurately reflect the type of database you are connecting to.

 

Steps to configure data sources

The following steps define how to configure your data sources for the CRC Cell. These steps include example configurations for Oracle, PostreSQL and SQL Server.

 

				</td>
				<td>
					<b>Warning</b>
					<br>Only 1 CRCBootStrapDS can reside in the crc-ds.xml file.
					<br>
					<ul>
						<li>If your file does contain the CRCBootStrapDS you can proceed with this section of the installation guide.</li>
						<li>If your file does not contain the CRCBootStrapDS, you can go to the <a href="https://community.i2b2.org/wiki/display/getstarted/10.4.5+Data+Source+Configuration">Data Source Configuration</a> chapter of the i2b2 Installation guide.			
						</li>
					</ul>
				</td>
			</tr>
		</tbody>
	</table>
</div>

indent
Level1

1. The crc-ds.xml file is located in the following directory:

indent
Level3

YOUR_I2B2_SRC_DIR\edu.harvard.i2b2.crc\etc\jboss

indent
Level1

2. Open the crc-ds.xml file to configure your data sources. (see examples shown below)

 

Oracle Database

 

Code Block
xml
xml
<datasource jta="false" jndi-name="java:/CRCBootStrapDS"
	pool-name="CRCBootStrapDS" 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>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: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
xml
xml
<datasource jta="false" jndi-name="java:/CRCBootStrapDS"
	pool-name="CRCBootStrapDS" 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
xml
xml
<datasource jta="false" jndi-name="java:/CRCBootStrapDS"
	pool-name="CRCBootStrapDS" 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
Level1

3. If your environment has multiple projects pointing to different data sources then copy the <datasource> section for each project data source.

indent
Level1

4. Update the jndi-name and pool-name to reflect the name of the second project .

indent
Level3

Example:   A second project called Demo2 would have the following entry:

 

Second Data Source Configuration

 

Code Block
xml
xml
<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
titleNote

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
Level1

5. Save the changes and close the file.