Requesting SQL Request
Overview
You can request execution of queries for which you do not have permission on specific DB connections by following the steps below. After approval, the executor can execute the approved query once and view the results.
Requesting SQL Request
1. Selecting Approval Rules
- Select an Approval Rule to choose the appropriate approval rule for your purpose. The approval target varies depending on the selected rule.
 - If a pre-configured approval rule is selected, the approver is automatically assigned and cannot be added or modified.
 - Approval Expiration Date: Enter the approval expiration date. The maximum value can be set through Maximum Approval Duration. The Approval Expiration Date cannot exceed the Execution Expiration Date. If exceeded, the request cannot be submitted.
- However, when submitting in Urgent Mode, the above condition is ignored.
 
 

2. Assigning Approvers
- Click the 
+button in the approval line to display a popup window where you can assign step-by-step approvers. - In this popup window, add approval conditions and approvers, then click the 
Savebutton to save the approval line. - Available approval conditions are as follows:
- A single Assignee can complete the approval request: The approval request is approved with just one approval from multiple people.
 - All Assignees must approve this request: All approvers must approve for the approval request to be approved.
 
 

3. Assigning Executors and Reviewers
- Click the 
+button in the approval line to display a popup window where you can assign executors and reviewers.- If the administrator has not allowed reviewer assignment, the Reviewer box will not be displayed.
 
 - In this popup window, add approval conditions and approvers.
 - Click the 
Savebutton to close the modal and complete reviewer assignment. 

4. Sending Request with Post-Approval
- If you select an approval rule that allows post-approval functionality, the Urgent Mode switch will be displayed.
 - After setting Urgent mode = On and registering the approval request, you can immediately receive permissions or perform tasks.
 

Q. I can’t see the Urgent Mode switch. A. If you select an approval rule where the administrator has not allowed Urgent Mode, this feature will not be displayed.
5. Entering Request Information

- Title: Enter the request title.
 - Connection: Select the target connection for which you want to request SQL execution. Only connections for which you have permission can be selected.
 - Database: Select the database within the selected connection for which you want to request SQL execution.
 - Content Type: Select the method for entering the SQL statement you want to request.
- Text: You can write queries up to 9,999 lines, 10 million characters, or 5MB.
 - File: You can upload .sql files with no execution size limit. However, Storage configuration is required.
 
 - Preferred Execution Date: Select the date when you want the query to be executed. The default selection date is the day of the request.
 - Execution Expiration Date: Select the last date when the Executor can execute. The default selection date is one week later.
 - Reason for Request: Enter the reason for requesting SQL execution permission.
 - Submit: After completing the draft, click the 
Submitbutton to complete the submission. 
Executing Approved SQL
Approved SQL Request items become immediately executable upon approval completion.

Workflow > Executions > To Do > Request Details > Execute
- Navigate to Workflow > Executions > To Do menu.
 - Click on the SQL Request item waiting for execution to go to the detail page.
 - After checking the SQL Request details, click the 
Executebutton in the top right to execute.- After checking the details, if you want to cancel the execution, you can cancel by clicking the 
Cancelbutton. 
 - After checking the details, if you want to cancel the execution, you can cancel by clicking the 
 - The execution results can be checked in the Results tab within the detail page for success/failure.
 - You can check the request history where you are the executor in Workflow > Received Requests > Done menu.
 
When approval process is enforced for DML Query execution
When performing INSERT, UPDATE, DELETE statements, administrators may have created policies to force approval processes through Workflow. In this case, the following message appears when performing queries in the Web Editor.[ENGINE][30105] In this DML operation, you need to get approval throgh SQL Request.

Warning message in Web Editor
In this case, you can click the SEND SQL Request button to immediately move to the SQL Request form in Workflow and proceed with the request.
You must select an appropriate Approval Rule and choose whether it is DML. If it is DML, you cannot use the File attachment method in Content Type.

SQL Request form in Workflow