Skip to main content

SQL Development Policy Management

By default, NineData provides SQL development policies for both development and production environments to ensure the security of your databases. You can also customize your own SQL development policies based on your business needs.

Notes

  • Newly created policies must be based on existing policies.
  • The default policies provided by the system cannot be deleted but can be edited.
  • In the edition, creating policies is not supported, while edition has no such limitation.

Prerequisites

  • You have created or joined an organization, and this organization has subscribed to either or . Please ensure that your annual or monthly subscription is still active. For more information, please refer to Manage Organizations.
  • Your current account has switched to the target organization. For more information, please refer to Switching to an Organization.
  • You have the role of system administrator in the organization.

Creating a Policy

  1. Log in to the NineData console.

  2. In the left navigation pane, click > .

  3. On the page, click the tab, and then click in the upper-right corner.

    tip

    You can also click in the column on the right of the target policy to create a new policy based on it.

  4. In the dialog box that appears, configure the following parameters and click .

    • : Select the policy on which to base the new policy.
      tip

      If you arrived at this dialog box by clicking , this has already been selected by default.

    • : Enter a name for the new policy, which can be between 1 and 32 characters. To facilitate subsequent searching and management, please use a meaningful name.
      tip

      If you arrived at this dialog box by clicking , this has already been filled in by default.

    • (optional): Enter a description for the new policy, which can be between 1 and 64 characters.
  5. The console automatically jumps to the page, where you can edit and switch the target rules.

    tip

    The SQL development rules have been categorized according to different modules. You can switch between them by clicking on the category tabs.

:::

Edit Policy

  1. Log in to the NineData console.
  2. In the left navigation pane, click > .
  3. On the page, click the tab, and then click the target .
  4. The console will navigate to the page, where you can edit and toggle the target policy.

Delete Policy

  1. Log in to the NineData console.

  2. In the left navigation pane, click > .

  3. On the page, click the tab.

  4. Click the policy you want to delete, and then click the button in the upper right corner of the page.

    tip

    You can also click the button in the column on the right side of the target policy.

  5. In the confirmation window that appears, click .

    tip

    If the current policy is already associated with an environment or data source, you need to select a new process for these resources in the window that pops up, and then click .

Associate policy with nvironment

After the SQL development policy is associated with an environment, it will override the original policy of the environment, and all data sources under this environment will apply the new policy.

  1. Log in to the NineData console.
  2. In the left navigation pane, click > .
  3. On the tab, find the name of the target environment, and click the button in the column on the right side.
  4. In the window that pops up, select the you need, and click .

Associate policy with data source

After the SQL development policy is associated with a data source, the data source will follow the new policy and will no longer follow the policy in the corresponding environment. Other data sources in the environment are not affected.

  1. Log in to the NineData console.

  2. In the left navigation bar, click > .

  3. Click the tab, find the target data source name, and click on the right of the column.

    tip

    In the associated with the data source, the bind icon on the left indicates that has inherited the configuration in the environment.

  4. In the popup window of ,

  5. uncheck the box on the left of under , and then select the standard you need and click on .

    tip

    To restore the configured in the environment, simply reselect .

Appendix: Conceptual explanation

When configuring SQL development policy, you can edit each policy. Here, we explain two important configuration items.

Configuration Item
Explanation
In terms of and , you can adjust the level of each rule based on actual business requirements.
  • : This is the highest level of SQL issues. Apply this level to SQL rules that could have a severe impact on the database. Ensure that developers address and fix such issues.
  • : Typically applicable to more lenient specifications. You can choose whether to comply based on the actual situation. Non-compliance with these rules may result in SQL statements that are difficult to maintain or have low execution efficiency.
List all the database types that the policy supports. You can choose which database type the policy should take effect on according to your needs, and support single and multiple selection.