Save data to Oracle DB

    Create rules:

    Open EMQX DashboardSave data to Oracle DB - 图2 (opens new window) and select the “Rules” tab on the left.

    Fill in the rule SQL:

    Related actions:

    In the “Response Action” interface, select “Add”, and then select “Save Data to Oracle Database” in the “Action” drop-down box.

    Fill in the action parameters:

    The “Save data to Oracle Database” action requires two parameters:

    1). SQL template. In this example, we insert a piece of data into Oracle Database. The SQL template is:

    2). The ID of the associated resource. Now that the resource drop-down box is empty, and you can click “New Resource” in the upper right corner to create an Oracle Database resource:

    Fill in the resource configuration:

    image

    Note: for the connection to Oracle Real Applications Cluster (RAC) to work properly, the “Service Name” field must be filled correctly. If left empty, it defaults to the Database SID.

    Return to the response action interface and click “OK”.

    Return to the rule creation interface and click “Create”.

    image

    In the rule list, click the “View” button or the rule ID connection to preview the rule just created:

    The rule has been created. Now, send a piece of data:

    image