Java Reference
In-Depth Information
16.1.5
DME URI and Data URI
The JDM standard allows users to specify a uniform resource
identifier (URI) string to represent the DME location and input/
output dataset location. Since JDM implementations may differ in
the URI syntax, we describe OJDM-specific URI syntax.
To connect to an Oracle DME, OJDM allows any JDBC-compatible
URI specification to connect to the database. For example, to connect
to the Oracle DME using the JDBC thin driver, the URI can be
jdbc:oracle:thin:@host:port:sid , where host is the machine name, port is
the port at which the database listener is running, and sid is the Oracle
system identifier that is by default ORCL. Different types of DME
URIs allowed in Oracle are listed in Table 16-4. For more details
about these URIs, refer to Oracle Database JDBC Developer's Guide and
Reference [ORAJDBC 2006].
Table 16-4
Oracle JDBC drivers and associated DME URI syntax
OJDBC driver type
DME URI
JDBC thin driver
jdbc:oracle:thin:@host:port:sid or service_name
JDBC OCI driver
jdbc:oracle:oci:@host:port:sid or service_name, or
jdbc:orcle:oci:@(DESCRIPTION
(ADDRESS
(PROTOCOL
TCP)
(HOST
hostname)(PORT
portnumber))(CONNECT_DATA
(SERVICE_NAME
service_name)))
Oracle JDBC Internal driver
jdbc:oracle:kprb:
Listing 16-1
Connect to OJDM DME
//Create OraConnectionFactory
javax.datamining.resource.ConnectionFactory connFactory
oracle.dmt.jdm.resource.OraConnectionFactory();
//Create ConnectionSpec
ConnectionSpec connSpec
connFactory.getConnectionSpec();
connSpec.setURI("jdbc:oracle:thin:@host:port:sid");
connSpec.setName("user");
connSpec.setPassword("password");
//Create DME Connection
javax.datamining.resource.Connection dmeConn
connFactory.getConnection(connSpec);
 
Search WWH ::




Custom Search