ELIXIR REPERTOIRE
Integrated Business Intelligence Suite
Intelligence
On Demand
Using JDBC Data Source with
Oracle Database 10g
Intelligence On Demand
Contents
A:
Prerequisites
1
B:
Creating a JDBC Data Source in Elixir Repertoire
4
C:
Using Oracle Stored Procedure
7
Summary
About Elixir Technology Pte Ltd
Copyright © 2007 ElixirTechnology. All Rights Reserved.
Using JDBC Data Source with Oracle Database 10g
Elixir Repertoire supports JDBC connectivity to Oracle Database 10g.
Prerequisites
Below is a list of prerequisites needed for a successful connection to Oracle Database 10g.
1) Oracle Database 10g (Express Edition is used for this document)
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 - Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
2) JDBC Driver (ojdbc14.jar – classes for use with JDK 1.4)
The driver jar file is usually found in the Oracle jdbc lib directory.
1
Copyright © 2007 ElixirTechnology. All Rights Reserved.
3) Oracle Database 10g services are started.
4) Oracle JDBC driver is deployed in Elixir Repertoire ext directory. The same applies to Elixir
Repertoire Server.
You can verify database setup via Oracle Database Console
2
Copyright © 2007 ElixirTechnology. All Rights Reserved.
3
Copyright © 2007 ElixirTechnology. All Rights Reserved.
Creating a JDBC Data Source in Elixir Repertoire
Follow the steps below to create a JDBC Data Source in Elixir Repertoire.
1) Obtain JDBC connection parameters.
Database Name: XE
Host: localhost (for connection on the same machine)
Port: 1521 (Default)
JDBC Driver Class Name: oracle.jdbc.driver.OracleDriver
User Name: hr (from default schema)
Password: hr (from default schema)
URL: jdbc:oracle:thin:@[host]:[port]:[DatabaseName]
Please refer to the driver readme file for latest changes.
4
Copyright © 2007 ElixirTechnology. All Rights Reserved.
2) Click on the Next button and then construct a SQL Statement using Elixir Query Builder.
3) Click on the “Infer Schema” button
5
Copyright © 2007 ElixirTechnology. All Rights Reserved.
4) Test the correctness of the SQL Statement by clicking on the “Load Data” button in Data tab.
6
Copyright © 2007 ElixirTechnology. All Rights Reserved.
Using Oracle Stored Procedure
You can use Oracle stored procedure with Elixir Repertoire JDBC data source.
1) Define a Stored Procedure
Suppose we want to create a stored procedure to select employees in the hr schema.
This can be done in two steps.
a) Create the package specification
create or replace package EMP as
function get_emp (
p_id in number )
return SYS_REFCURSOR;
end;
7
Copyright © 2007 ElixirTechnology. All Rights Reserved.
b) Define the function body
create or replace package body "EMP" is
function GET_EMP(
P_ID IN NUMBER
)
return SYS_REFCURSOR
as records SYS_REFCURSOR;
begin
open records for
SELECT *
FROM hr.employees
WHERE hr.employees.department_id = P_ID ;
return records; /* insert function code */
end GET_EMP;
end EMP;
8
Copyright © 2007 ElixirTechnology. All Rights Reserved.
2) Test your stored procedure. Once the correct ResultSet is returned you can create your data source.
3) In Datasource Wizard dialog, enter the stored procedure as follows:
call procedure-name[([parameter][,[parameter]]...)], with ? representing parameters
For example:
{?=call EMP.GET_EMP(?)}
4) Enable Callable Statement option
5) At Callable tab enter the parameters
9
Copyright © 2007 ElixirTechnology. All Rights Reserved.
In this case there is only one in parameter of type Integer.
We can use dynamic parameters to allow more flexible behaviors, e.g. a data source lookup.
${Department#lookup(/Oracle10G/Department.ds,DEPARTMENT_ID)#100}
6) Now you can test the data source.
10
Copyright © 2007 ElixirTechnology. All Rights Reserved.
Summary
Elixir Repertoire offers a wide array of functionalities for maximum business impact, while leveraging Java Standard & Enterprise Edition for cross-platform compatibility. Satisfied customers
worldwide rely on Elixir Repertoire to improve operations efficiency as well as increase corporate profitability.
For additional information, please contact the Elixir at [email protected].
About Elixir Technology Pte Ltd
Elixir Technology provides a Unified Business Intelligence Platform for end-to-end information
life cycle coverage from Extraction-Transformation-Loading (ETL), Data Aggregation, Cube,
Reporting, Dashboard and Activation. Our flagship product, Elixir Report, has garnered over 600
customers across 50 countries in various verticals such as government, financial services,
telecommunications, healthcare, retail, and technology. Going beyond enterprise reporting
needs, our Integrated Business Intelligence Suite, Elixir Repertoire, is designed to further
empower our customers toward becoming intelligent enterprises, where critical information is
readily available to drive decisions and actions. Elixir Technology is headquartered in Singapore,
with an R&D arm in UK. Through a network of partners, Elixir’s products are represented in many
parts of the world across major continents including Asia, America, and Europe. For more
information, please visit www.elixirtech.com.
Intelligence On Demand
Elixir Technology Pte Ltd
50 Armenian Street, #04-04 Wilmer Place
Singapore 179938
Tel: +65 6532 4300 Fax: +65 6532 4255
Email: [email protected]
Website: www.elixirtech.com
Copyright © 2007 ElixirTechnology. All Rights Reserved.
As at 23 February 2007
© Copyright 2026 Paperzz