Creates a ticket for changing data without locking tables.

For more information about the Lockless 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 DML-based lockless change and DDL-based lockless change.

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
Comment String Yes test

The purpose or objective of the data change. This reduces unnecessary communication.

RelatedUserList Array of Long No 431532

The stakeholders of this operation. All stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than Data Management (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.

Note If the SqlType parameter is set to TEXT, this parameter is required.
SqlType String Yes TEXT

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

  • TEXT: text
  • ATTACHMENT: attachment
    Note Only TEXT is supported.
AttachmentName String No test.sql

The key of the attachment that contains the SQL statements for the data change. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter.

Note If the SqlType parameter is set to ATTACHMENT, this parameter is required.
RollbackSQL String No empty

The SQL statements for rolling back the data change.

Note If the RollbackSqlType parameter is set to TEXT, this parameter is required.
RollbackAttachmentName String No test_rollback.sql

The key of the attachment that contains the SQL statements for rolling back the data change. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter.

Note If the RollbackSqlType parameter is set to ATTACHMENT, this parameter is required.
RollbackSqlType String No TEXT

The format of the SQL statements for rolling back the data change. Valid values:

  • TEXT: text
  • ATTACHMENT: attachment
DbItemList Array Yes

The databases that you want to change data.

DbId Long Yes 432153

The ID of the database. You can call the SearchDatabases operation to query the ID of the database.

Logic Boolean Yes false

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

  • true: yes
  • false: no
AttachmentKey String No order_attachment.txt

The key of the attachment for the ticket. The attachment provides more instructions for this operation.

You can call the GetUserUploadFileJob operation to query the key of the attachment.

Tid Long No 14325

The ID of the tenant.

Note The ID of the tenant is displayed when you move the pointer over the profile picture in the upper-right corner of the DMS console. For more information, see Tenant information.
RegionId String No cn-hangzhou

The ID of the region where the DMS service resides. For more information about the valid values of this parameter, see RegionID parameter.

Note Set this parameter to the ID of the region that is close to your services.

Response parameters

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

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

ErrorMessage String UnknownError

The error message that is returned.

ErrorCode String UnknownError

The error code that is returned.

CreateOrderResult Array of Long 1342353

The ID of the ticket.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Comment=test
&RelatedUserList=[431532]
&Param={"Classify":"test","ExecSQL":"delete from base_user where 1 = 1;","SqlType":"TEXT","AttachmentName":"test.sql","RollbackSQL":"empty","RollbackAttachmentName":"test_rollback.sql","RollbackSqlType":"TEXT","DbItemList":[{"DbId":432153,"Logic":false}]}
&AttachmentKey=order_attachment.txt
&Tid=14325
&<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>
    <CreateOrderResult>1342353</CreateOrderResult>
</CreateFreeLockCorrectOrderResponse>

JSON format

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

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

Error codes

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