Setting up Oracle
These instructions assume that you are using an Oracle database and guide you through the following
tasks:
- Create a table called DATAWAREHOUSE for use by the Data Warehouse sample
- Create an ODBC definition for the database
Note. When you create and access the database tables, be aware of the following issues:
- When you run the script that creates the table in the database, the user identifier from which you
run the script determines the database schema name. For example, if your user identifier is
USERID, the fully qualified name of the DATAWAREHOUSE table is
USERID.DATAWAREHOUSE.
- When you set a node to access a table, if the broker is not using the same user identifier to
access the database that you used when you created the database and tables, include the schema name
in the node. For example, Database.USERID.DATAWAREHOUSE.
Before following these instructions you must have created a database.
-
Open a new document in a text editor, copy and paste the following script,
which creates the DATAWAREHOUSE table,
into the document, name the file datawarehouse2.sql and save the file.
DROP TABLE DATAWAREHOUSE;
CREATE TABLE DATAWAREHOUSE ( MESSAGEDATA BLOB NOT NULL , PUTTIMESTAMP TIMESTAMP NOT NULL , DBINSERTTIMESTAMP DATE DEFAULT CURRENT_TIMESTAMP );
- In a command window that you have opened to access your database, move to the folder that contains
datawarehouse2.sql and enter the following command:
sqlplus <uid>/<password> @datawarehouse2.sql
Wait for the script to finish running. If you are running the script for the first time, the
following message is displayed:
ORA-00942: table or view does not exist
Ignore this message. The message is displayed because the script attempts to remove an existing table
called DATAWAREHOUSE before it creates a new table, but if you have not run the script before, the
script cannot find the existing table.
- Create an ODBC definition to the database with USERDB as the data source name (DSN).
For instructions, see
Enabling ODBC connections to the databases
in the WebSphere Message Broker documentation.
Back to Setting up the database
Back to sample home