DataSunrise SQL Queries Automation Guide

DataSunrise Database Security Suite is a high-performance database security solution that can be set up to run various SQL queries, including those provided, on a scheduled basis.

The following steps outline the process of setting up SQL queries to run automatically in DataSunrise:

Add Database for Monitoring:

After logging in to DataSunrise, add your Oracle Database for monitoring if it's not already added. Go to the 'Databases' tab and click 'Add Database'. Fill in the necessary details, such as the database name, type (Oracle), host, port, etc.

Create Rule for Auditing:

Navigate to 'Audit' and then 'Audit Rules'. Click on 'Add Rule' to start the rule creation process. Define the name, database (which you added in the first step), action type (SQL Execution), and specify users if needed.

Add Queries:

In the 'SQL' tab of the rule, add all of your SQL queries. DataSunrise provides the option of adding multiple SQL statements to be executed.

Specify Schedule:

Go to the 'Schedules' tab and set up the schedule as per your requirement. You can schedule it to run daily, weekly, monthly, or set a custom time frame.

Define Actions:

Finally, go to the 'Actions' tab and select the action you want DataSunrise to take when the rule triggers. This could be logging the event, sending a notification, etc.

Save the Rule:

After setting up everything, save the rule.

Review Audit Logs:

Once the rule is triggered based on the schedule, you can review the output by navigating to the 'Audit' tab and selecting 'Events'. You will see the SQL statements' output in the 'Query' column. You can click on the 'Details' button to see more about the event.

Note:

DataSunrise doesn't support direct scheduling of SQL statements to be executed. So the automated process mainly focuses on auditing of SQL execution and the manual review of the audit logs.

Please also note that running certain queries may require specific privileges and roles for the DataSunrise user connected to the Oracle database. Make sure the user has the necessary privileges to execute the scripts you're adding.

Did you find this article useful?