Setting up Oracle

These instructions assume that you are using an Oracle database and guide you through the following tasks:

Note. When you create and access the ROUTING_TABLE table, be aware of the following issues:

Before you start: Create a database.

Complete the following steps:

  1. Open a new document in a text editor, copy and paste the following script, which creates and populates the ROUTING_TABLE table, into the document, name the file routing2.sql and save the file.
       
    DROP TABLE ROUTING_TABLE;
    CREATE TABLE ROUTING_TABLE (Variable1 varchar(32),Variable2 varchar(32),Variable3 varchar(32), queue_manager varchar(48),queue_name varchar(48));
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'default','default',     'MB8QMGR', 'ROUTING.DEFAULT');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'TD',     'Montana',     'MB8QMGR', 'ROUTING.OUT1');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'DL',     'Corleone',    'MB8QMGR', 'ROUTING.OUT2');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'AA',     'Pacino',      'MB8QMGR', 'ROUTING.OUT3');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'RJ',     'DeNiro',      'MB8QMGR', 'ROUTING.OUT4');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'KF',     'Cobain',      'MB8QMGR', 'ROUTING.OUT5');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'JE',     'Matrix',      'MB8QMGR', 'ROUTING.OUT6');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'PL',     'Parker',      'MB8QMGR', 'ROUTING.OUT7');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'CJ',     'Kent',        'MB8QMGR', 'ROUTING.OUT8');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'MA',     'Douglas',     'MB8QMGR', 'ROUTING.OUT9');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'JD',     'Travolta',    'MB8QMGR', 'ROUTING.OUT10');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'HO',     'Ramsden',     'MB8QMGR', 'ROUTING.OUT11');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'KA',     'Stewart',     'MB8QMGR', 'ROUTING.OUT12');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'LS',     'Skywalker',   'MB8QMGR', 'ROUTING.OUT13');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'KD',     'Minogue',     'MB8QMGR', 'ROUTING.OUT14');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'PP',     'Pitstop',     'MB8QMGR', 'ROUTING.OUT15');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'JA',     'Reeve',       'MB8QMGR', 'ROUTING.OUT16');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'JA',     'Hetfield',    'MB8QMGR', 'ROUTING.OUT17');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'DT',     'Zuko',        'MB8QMGR', 'ROUTING.OUT18');
    INSERT INTO ROUTING_TABLE VALUES('SAMPLE_QUEUES', 'KA',     'Braithwaite', 'MB8QMGR', 'ROUTING.OUT19');
    
  2. Start a command window to access your database, move to the folder that contains datawarehouse2.sql and enter the following command:
    sqlplus <uid>/<password> @routing2.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 ROUTING_TABLE before it creates creates a new table, but if you have not run the script before, the script cannot find an existing table.
  3. Create an ODBC definition for the database with ROUTING 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