This discussion is archived
8 Replies Latest reply: Mar 30, 2012 10:39 AM by 722711 RSS

Save Stream of Data in Oracle Database

900697 Newbie
Currently Being Moderated
Hi,

I want to save processed event records in Oracle relational database.

How it can be done?

Is JDBC Cartridge can be used to insert records to databse? If yes, how can be done?

Or is it required to implement custom event store if database is other than derby, can't we use existing event store?
How to implement custom event store using API, where to download this API?

Thanks,
Sri

Edited by: 897694 on Mar 29, 2012 12:22 AM
  • 1. Re: Save Stream of Data in Oracle Database
    JungerHe Explorer
    Currently Being Moderated
    I don't think JDBC cartridge is suitable for persist events into DB. It's easy to do it with record/playback. Below is the configuration that you can use:

    --server config.xml
    <data-source>
    <name>eventrepository-test-ds-oracle</name>
    <data-source-params>
    <global-transactions-protocol>
    None
    </global-transactions-protocol>
    </data-source-params>
    <connection-pool-params>
    <initial-capacity>5</initial-capacity>
    <max-capacity>10</max-capacity>
    </connection-pool-params>
    <driver-params>
    <url>jdbc:oracle:thin:@hostname:1521:xe</url>
    <driver-name>oracle.jdbc.OracleDriver</driver-name>
    <properties>
    <element>
    <name>user</name>
    <value>sccot</value>
    </element>
    <element>
    <name>password</name>
    <value>tiger</value>
    </element>
    </properties>
    </driver-params>
    </data-source>
  • 2. Re: Save Stream of Data in Oracle Database
    900697 Newbie
    Currently Being Moderated
    Hi,


    Thanks for your input.

    We have tried that and result is storing in table that is created by CEP itself.
    I want to know how to assign existing table as a destination for event store, if existing table has as same schema.

    Thanks,
    Sri
  • 3. Re: Save Stream of Data in Oracle Database
    722711 Explorer
    Currently Being Moderated
    As of the current implementation, you cannot use a different table name to store the events.
  • 4. Re: Save Stream of Data in Oracle Database
    900697 Newbie
    Currently Being Moderated
    Thank you.

    I have one more question.

    How 2 events are saving in database.
    If i used one event type under <event-type-list> its working fine, saves data in db.
    And then I have added with 2 events, no save of data.

    I removed first event and kept second event, it added new column to the same table and saves details.

    Why is that? Am i missing any configuration?

    Thanks,
    Sri
  • 5. Re: Save Stream of Data in Oracle Database
    722711 Explorer
    Currently Being Moderated
    When you specify multiple event types, it is expected to save the different event types in different tables. Could you post the details of the event types (names and properties)?

    Manju.
  • 6. Re: Save Stream of Data in Oracle Database
    900697 Newbie
    Currently Being Moderated
    Hi,

    Below are the events:

              <wlevs:event-type type-name="EventType1">
                   <wlevs:properties>
                        <wlevs:property name="Uid" type="char"/>
                        <wlevs:property name="arrivalTime" type="timestamp"/>          
                        <wlevs:property name="endLogUid" type="char"/>
                        <wlevs:property name="startLogUid" type="char"/>
                   </wlevs:properties>
              </wlevs:event-type>
              
              <wlevs:event-type type-name="EventType2">
                   <wlevs:properties>
                        <wlevs:property name="message" type="char"/>
                   </wlevs:properties>
              </wlevs:event-type>

    Thanks,
    Sri
  • 7. Re: Save Stream of Data in Oracle Database
    900697 Newbie
    Currently Being Moderated
    i used the event store at processor level.

    Thanks,
    Sri
  • 8. Re: Save Stream of Data in Oracle Database
    722711 Explorer
    Currently Being Moderated
    There appears to be an issue in the way it stores TupleValues in rdbms. Could you please open a bug and we can look into fixing this in a future release.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points