Skip to main content

Review and release SQL changes

Use SQL tasks to move database changes out of direct SQL Console execution and into a controlled review process. A SQL task keeps submission, approval, execution, and audit in one place.

Overview

SQL tasks cover the main stages of database change governance:

  • Submission: Developers submit SQL changes, execution settings, and rollback plans.
  • Policy precheck: NineData checks SQL against the configured SQL development standards.
  • Approval: DBAs, data owners, or operations teams review the change risk.
  • Execution: Approved tasks can be executed immediately or based on the configured schedule.
  • Audit trail: The task records SQL content, approval history, execution result, and related backup information.

What SQL tasks provide

NineData SQL tasks provide:

  • Built-in SQL review standards for table structure, indexes, naming, and high-risk SQL.
  • Scheduled execution for planned or repeated database changes.
  • Multi-user submission, approval, and execution.
  • Permission checks before users submit or run SQL tasks.
  • Approval-process integration for production change control.
  • Automatic backup before data changes, with retention for download and recovery within the configured period.
  • Rollback SQL records that can be reviewed when a data issue occurs.

Before you begin

Before you use SQL tasks, make sure that:

  • The target data source has been added to NineData.
  • SQL development standards are configured for the target environment.
  • An approval process is configured if the change requires review.
  • Users have the required permissions to submit, approve, or execute SQL tasks.

Procedure

1. Disable direct production changes

Turn off SQL Console change capabilities for the production database so users submit production changes through SQL tasks.

Disable SQL Console changes

After the policy is applied, change statements in SQL Console are intercepted.

SQL Console change intercepted

2. Submit an SQL task

Create a SQL task for the production change. The task can include the SQL statement, rollback plan, execution settings, and approvers.

Submit a SQL task

The example uses a single approval level. In production environments, configure the number of approval levels based on your organization's risk policy.

3. Approve or reject the task

Approvers review the SQL task and choose whether to approve or reject the change.

Approve a SQL task

Result

The SQL change is checked and approved before execution. The SQL task keeps the change content, review history, execution result, and rollback information in one record.

Next steps