%META:TOPICPARENT{name="InstallConfigJDBC"}%
= Using UDA with Macromedia <nop>ColdFusion MX 7 (Linux) =

%TOC%

== Required components ==

You will need to download the following components

* Macromedia <nop>ColdFusion MX 7 (Developer Edition) - [[http://www.macromedia.com|download]]
* <nop>OpenLink jar file - one of these, appropriate to the selected JDK/JRE/JVM -
| **JDK/JRE/JVM**  | **<nop>OpenLink JDBC Driver Filename**  | **<nop>OpenLink JDBC Driver Classname**  |
|  1.1  |  <code>opljdbc.jar</code>  |  <code>openlink.jdbc.Driver</code>  |
|  1.2 or 1.3  |  <code>opljdbc2.jar</code>  |  <code>openlink.jdbc2.Driver</code>  |
|  1.4 or 1.5  |  <code>opljdbc3.jar</code>  |  <code>openlink.jdbc3.Driver</code>  |
|  1.6  |  <code>opljdbc4.jar</code>  |  <code>openlink.jdbc4.Driver</code>  |
|  1.7  |  <code>opljdbc4_1.jar</code>  |  <code>openlink.jdbc4.Driver</code>  |
|  1.8  |  <code>opljdbc4_2.jar</code>  |  <code>openlink.jdbc4.Driver</code>  |



//**Note:** You should only have one of the above JDBC Drivers in the {{{CLASSPATH}}} at any time. It is usually best to use the latest driver supported by the active JVM.//


== Install Macromedia <nop>ColdFusion MX 7 <nop>(Developer Edition<nop>) ==

# Execute the downloaded *.bin file -
{{{
./coldfusion-701-lin.bin
}}}
NOTE: You may need to set the execute permission on the *.bin file before it can be executed.
# Accept the license agreement.
# When prompted, select <b>Install type</b> -> <b>3 - Developer edition</b>
# What kind of installation do you want? <b>1 - Server configuration</b>
# Is there already a server configuration of Macromedia <nop>ColdFusion MX 7 installed? <b>2 - No</b>
# Sub-component installation choose <b>4 - Continue with installation</b>
# Select all default options from this point onwards.
# Enter administrator password.
# Enable RDS (required for Report Builder and DW Extensions) (Y/N)	<b>N</b>
# The installation will now complete.

NOTE: This may take several minutes.


== Start Macromedia <nop>ColdFusion MX 7 (Developer Edition) ==

# Start Macromedia <nop>ColdFusion MX 7 (Developer Edition) using the command --
{{{
/opt/coldfusionmx7/bin/coldfusion start
}}}
# Browse to the following url to verify the Administrator application is running --
{{{
http://coldfusion_server:8500/CFIDE/administrator
}}}


== Install <nop>OpenLink jar files ==

# Copy the {{{.jar}}} file chosen for your JDK/JVM/JRE into the directory -- 
{{{
/opt/coldfusionmx7/openlink/jars
}}}
NOTE: You will need to create this directory if it does not already exist.
# Open the Administrator --
{{{
http://coldfusion_server:8500/CFIDE/administrator
}}}
# Select <b>Server Settings</b> -> <b>Java and JVM</b>
# In the <b><nop>ColdFusion Class Path</b> field enter --
{{{
/opt/coldfusionmx7/openlink/jars
}}}
# Select <b>Submit Changes</b>
# You will be prompted to restart the server.
# Restart <nop>ColdFusion --
{{{
/opt/coldfusionmx7/bin/coldfusion restart
}}}


== Configure Data Sources ==

# Open the Administrator --
{{{
http://coldfusion_server:8500/CFIDE/administrator
}}}
# Select <b>Server Settings</b> -> <b>Data &amp; Services</b>
# Select <b>Data Sources</b>
# Enter a name for the Data Source - <b>o32opljdbc1</b>
# In the <b>Driver</b> drop down list box select - <b>other</b>
# Select <b>Add</b>
# Enter the <b>JDBC URL</b> --
{{{
jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa
}}}
# Enter the <b>Driver Class</b> --
{{{
openlink.jdbc.Driver
}}}
# Select <b>Submit</b>
# The <b>Datasources</b> page will display showing the new data source.
# Select the <b>Verify</b> icon to the left of the datasource name.
# If the data source was created successfully then the <b>Status</b> field will display <b>OK</b>.


Repeat the above process for each datasource, editing the URLs as appropriate for your environment --

| *Data Source Name*        | *Driver Class*                      | *URL*  |
| <code>o32opljdbc1</code>  | <code>openlink.jdbc.Driver</code>   | {{{jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa}}}  |
| <code>m32opljdbc1</code>  | <code>openlink.jdbc.Driver</code>   | {{{jdbc:openlink://192.168.0.150:5000/SVT=SQLServer 2000/Database=Northwind/options=-H 192.168.0.150/UID=sa/PWD=sa}}}  |
| <code>o32opljdbc2</code>  | <code>openlink.jdbc2.Driver</code>  | {{{jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa}}}  |
| <code>m32opljdbc2</code>  | <code>openlink.jdbc2.Driver</code>  | {{{jdbc:openlink://192.168.0.150:5000/SVT=SQLServer 2000/Database=Northwind/options=-H 192.168.0.150/UID=sa/PWD=sa}}} |
| <code>o32opljdbc3</code>  | <code>openlink.jdbc3.Driver</code>  | {{{jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa}}}  |
| <code>m32opljdbc3</code>  | <code>openlink.jdbc3.Driver</code>  | {{{jdbc:openlink://192.168.0.150:5000/SVT=SQLServer 2000/Database=Northwind/options=-H 192.168.0.150/UID=sa/PWD=sa}}} |
||||


== Prepare the <nop>ColdFusion test page ==

# Create the following file --
{{{
/opt/coldfusionmx7/wwwroot/opltest.cfm
}}}
to read --
{{{
<html>
  <head>
    <title>Hello World!!</title>
  </head>
  <body>
    <cfquery name = "query_o32opljdbc1" dataSource = "o32opljdbc1" dbtype = "query">
      select EmployeeID, FirstName, LastName, Title from Employees
    </cfquery>
    <cfquery name = "query_m32opljdbc1" dataSource = "m32opljdbc1" dbtype = "query">
      select EmployeeID, FirstName, LastName, Title from Employees
    </cfquery>
    <cfquery name = "query_o32opljdbc2" dataSource = "o32opljdbc2" dbtype = "query">
      select EmployeeID, FirstName, LastName, Title from Employees
    </cfquery>
    <cfquery name = "query_m32opljdbc2" dataSource = "m32opljdbc2" dbtype = "query">
      select EmployeeID, FirstName, LastName, Title from Employees
    </cfquery>
    <cfquery name = "query_o32opljdbc3" dataSource = "o32opljdbc3" dbtype = "query">
      select EmployeeID, FirstName, LastName, Title from Employees
    </cfquery>
    <cfquery name = "query_m32opljdbc3" dataSource = "m32opljdbc3" dbtype = "query">
      select EmployeeID, FirstName, LastName, Title from Employees
    </cfquery>

    <h1>OpenLink - ColdFusion MX 7 test</h1>

    <h2>Using: o32opljdbc1 - openlink.jdbc.Driver</h2>
    <table>
      <cfoutput query="query_o32opljdbc1">
        <tr>
          <td>#EmployeeID#</td>
          <td>#FirstName#</td>
          <td>#LastName#</td>
          <td>#Title#</td>
        </tr>
      </cfoutput>
    </table>

    <h2>Using: m32opljdbc1 - openlink.jdbc.Driver</h2>
    <table>
      <cfoutput query="query_m32opljdbc1">
        <tr>
          <td>#EmployeeID#</td>
          <td>#FirstName#</td>
          <td>#LastName#</td>
          <td>#Title#</td>
        </tr>
      </cfoutput>
    </table>

    <h2>Using: o32opljdbc2 - openlink.jdb2.Driver</h2>
    <table>
      <cfoutput query="query_o32opljdbc2">
        <tr>
          <td>#EmployeeID#</td>
          <td>#FirstName#</td>
          <td>#LastName#</td>
          <td>#Title#</td>
        </tr>
      </cfoutput>
    </table>

    <h2>Using: m32opljdbc2 - openlink.jdbc2.Driver</h2>
    <table>
      <cfoutput query="query_m32opljdbc2">
        <tr>
          <td>#EmployeeID#</td>
          <td>#FirstName#</td>
          <td>#LastName#</td>
          <td>#Title#</td>
        </tr>
      </cfoutput>
    </table>

    <h2>Using: o32opljdbc3 - openlink.jdbc3.Driver</h2>
    <table>
      <cfoutput query="query_o32opljdbc3">
        <tr>
          <td>#EmployeeID#</td>
          <td>#FirstName#</td>
          <td>#LastName#</td>
          <td>#Title#</td>
        </tr>
      </cfoutput>
    </table>

    <h2>Using: m32opljdbc3 - openlink.jdbc3.Driver</h2>
    <table>
      <cfoutput query="query_m32opljdbc3">
        <tr>
          <td>#EmployeeID#</td>
          <td>#FirstName#</td>
          <td>#LastName#</td>
          <td>#Title#</td>
        </tr>
      </cfoutput>
    </table>

  </body>
</html>
}}}
# View the test page at the following URL --
{{{
http://coldfusion_server:8500/CFIDE/opltest.cfm
}}}