Creates a ticket for changing data without locking tables in Data Management (DMS).

For more information about the lock-free change feature, see Overview.

This operation can be used only for instances that are managed in Stable Change or Security Collaboration mode. For more information, see Change data without the need to lock tables and Change schemas without locking tables.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateFreeLockCorrectOrder

The operation that you want to perform. Set the value to CreateFreeLockCorrectOrder.

Comment String Yes test

The purpose or objective of the data change. This parameter is used to help reduce unnecessary communication.

RelatedUserList Array of Long No 51****

The stakeholders of the data change. All stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than DMS administrators and database administrators (DBAs) are not allowed to view the ticket details.

Param Object Yes

The parameters of the ticket.

Classify String No test

The reason for the data change.

ExecSQL String Yes delete from base_user where 1 = 1;

The SQL statements that you want to execute to change data.

SqlType String Yes TEXT

The format of the SQL statements used to change data. Valid values:

  • TEXT: text
  • ATTACHMENT: attachment. This value is not supported.
AttachmentName String No test.sql

The key of the attachment that contains the SQL statements used to change data. This parameter is not supported.

RollbackSQL String No empty

The SQL statements used to roll back the data change.

RollbackAttachmentName String No test_rollback.sql

The key of the attachment that contains the SQL statements used to roll back the data change.

RollbackSqlType String No TEXT

The format of the SQL statements used to roll back the data change. Valid values:

  • TEXT: text
  • ATTACHMENT: attachment. This value is not supported.
DbItemList Array Yes

The databases in which you want to change data.

DbId Long Yes 1860****

The ID of the database. The database can be a physical database or a logical database.

Logic Boolean Yes false

Specifies whether the database is a logical database. Valid values:

  • true: The database is a logical database.
  • false: The database is a physical database.
ExecMode String No COMMITOR

The execution mode of the ticket after the ticket is approved. Valid values:

  • COMMITOR: The data change is performed by the user who submits the ticket.
  • AUTO: The data change is automatically performed after the ticket is approved.
  • LAST_AUDITOR: The data change is performed by the last approver of the ticket.
AttachmentKey String No order_attachment.txt

The key of the attachment that provides more instructions for the ticket. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter.

Tid Long No 3***

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID.

RegionId String No cn-hangzhou

The ID of the region in which DMS is activated. For more information, see RegionID parameter.

Response parameters

Parameter Type Example Description
RequestId String 0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931

The ID of the request.

Success Boolean true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
ErrorMessage String UnknownError

The error message returned if the request fails.

ErrorCode String UnknownError

The error code returned if the request fails.

CreateOrderResult Array of Long 134****

The ID of the ticket.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Comment=test
&RelatedUserList=[51****]
&Param={"Classify":"test","ExecSQL":"delete from base_user where 1 = 1;","SqlType":"TEXT","DbItemList":[{"DbId":1860****,"Logic":false}],"ExecMode":"COMMITOR"}
&AttachmentKey=order_attachment.txt
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateFreeLockCorrectOrderResponse>
    <RequestId>0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931</RequestId>
    <Success>true</Success>
    <ErrorMessage>UnknownError</ErrorMessage>
    <ErrorCode>UnknownError</ErrorCode>
    <CreateOrderResult>1340000</CreateOrderResult>
</CreateFreeLockCorrectOrderResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
  "Success" : true,
  "CreateOrderResult" : [ "134****" ]
}

Error codes

For a list of error codes, visit the API Error Center.