diff --git a/docs/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md b/docs/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md index 72a373a4070a4..af6167d42732f 100644 --- a/docs/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md +++ b/docs/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md @@ -24,56 +24,63 @@ specific language governing permissions and limitations under the License. --> - ## Description This syntax is used to view transaction details for the specified transaction id or label. -grammar: +## Syntax ```sql SHOW TRANSACTION -[FROM db_name] +[FROM ] WHERE -[id=transaction_id] -[label = label_name]; +[id = | label = ]; ``` -Example of returned result: +## Required Parameters -``` - TransactionId: 4005 - Label: insert_8d807d5d-bcdd-46eb-be6d-3fa87aa4952d - Coordinator: FE: 10.74.167.16 - TransactionStatus: VISIBLE - LoadJobSourceType: INSERT_STREAMING - PrepareTime: 2020-01-09 14:59:07 - CommitTime: 2020-01-09 14:59:09 - FinishTime: 2020-01-09 14:59:09 - Reason: -ErrorReplicasCount: 0 - ListenerId: -1 - TimeoutMs: 300000 -``` +**1. ``** + +The transaction ID whose details need to be viewed. + +**2. ``** + +The label whose transaction details need to be viewed. + +## Optional Parameters + +**1. ``** + +The database whose transaction details need to be viewed. -* TransactionId: transaction id -* Label: the label corresponding to the import task -* Coordinator: The node responsible for transaction coordination -* TransactionStatus: transaction status - * PREPARE: preparation stage - * COMMITTED: The transaction succeeded, but the data was not visible - * VISIBLE: The transaction succeeded and the data is visible - * ABORTED: Transaction failed -* LoadJobSourceType: Type of import job. -* PrepareTime: transaction start time -* CommitTime: The time when the transaction was successfully committed -* FinishTime: The time when the data is visible -* Reason: error message -* ErrorReplicasCount: The number of replicas with errors -* ListenerId: The id of the related import job -* TimeoutMs: Transaction timeout, in milliseconds - -## Example +## Return Value + +| Column Name | Description | +|---|---| +| TransactionId | Transaction ID | +| Label | Label associated with the import task | +| Coordinator | Node responsible for coordinating the transaction | +| TransactionStatus | Status of the transaction | +| PREPARE | Preparation phase | +| COMMITTED | Transaction succeeded, but data is not visible yet | +| VISIBLE | Transaction succeeded, and data is visible | +| ABORTED | Transaction failed | +| LoadJobSourceType | Type of the import task | +| PrepareTime | Start time of the transaction | +| CommitTime | Time when the transaction was successfully committed | +| FinishTime | Time when the data became visible | +| Reason | Error message | +| ErrorReplicasCount | Number of replicas with errors | +| ListenerId | ID of the related import job | +| TimeoutMs | Transaction timeout duration in milliseconds | + +## Access Control Requirements + +| Privilege | Object | Notes | +| :-------------- | :----------- | :------------------------ | +| ADMIN_PRIV | Database | Only users with ADMIN_PRIV can perform this operation. | + +## Examples 1. View the transaction with id 4005: @@ -91,11 +98,4 @@ ErrorReplicasCount: 0 ```sql SHOW TRANSACTION WHERE LABEL = 'label_name'; - ``` - -## Keywords - - SHOW, TRANSACTION - -## Best Practice - + ``` \ No newline at end of file diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md index 280d737e94102..7ebcc72cf49d5 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md @@ -24,57 +24,62 @@ specific language governing permissions and limitations under the License. --> - ## 描述 该语法用于查看指定 transaction id 或 label 的事务详情。 ### 语法 - ```sql SHOW TRANSACTION -[FROM db_name] +[FROM ] WHERE -[id = transaction_id] -[label = label_name]; +[id = | label = ]; ``` -### 返回结果 +## 必选参数 +**1. ``** -示例: +需要查看事务详情的 transaction id -```sql - TransactionId: 4005 - Label: insert_8d807d5d-bcdd-46eb-be6d-3fa87aa4952d - Coordinator: FE: 10.74.167.16 - TransactionStatus: VISIBLE - LoadJobSourceType: INSERT_STREAMING - PrepareTime: 2020-01-09 14:59:07 - CommitTime: 2020-01-09 14:59:09 - FinishTime: 2020-01-09 14:59:09 - Reason: -ErrorReplicasCount: 0 - ListenerId: -1 - TimeoutMs: 300000 -``` +**2. ``** + +需要查看事务详情的 label + +## 可选参数 + +**1. ``** + +需要查看事务详情的database + + +## 返回值 + +| Column name | Description | +|---|---| +| TransactionId | 事务 id | +| Label | 导入任务对应的 label | +| Coordinator | 负责事务协调的节点 | +| TransactionStatus | 事务状态 | +| PREPARE | 准备阶段 | +| COMMITTED | 事务成功,但数据不可见 | +| VISIBLE | 事务成功且数据可见 | +| ABORTED | 事务失败 | +| LoadJobSourceType | 导入任务的类型 | +| PrepareTime | 事务开始时间 | +| CommitTime | 事务提交成功的时间 | +| FinishTime | 数据可见的时间 | +| Reason | 错误信息 | +| ErrorReplicasCount | 有错误的副本数 | +| ListenerId | 相关的导入作业的 id | +| TimeoutMs | 事务超时时间,单位毫秒 | + +## 权限控制 + +| 权限(Privilege) | 对象(Object) | 说明(Notes) | +|:--------------|:-----------|:------------------------| +| ADMIN_PRIV | Database | 只有拥有 ADMIN_PRIV 的用户才能操作 | -* TransactionId:事务 id -* Label:导入任务对应的 label -* Coordinator:负责事务协调的节点 -* TransactionStatus:事务状态 - * PREPARE:准备阶段 - * COMMITTED:事务成功,但数据不可见 - * VISIBLE:事务成功且数据可见 - * ABORTED:事务失败 -* LoadJobSourceType:导入任务的类型。 -* PrepareTime:事务开始时间 -* CommitTime:事务提交成功的时间 -* FinishTime:数据可见的时间 -* Reason:错误信息 -* ErrorReplicasCount:有错误的副本数 -* ListenerId:相关的导入作业的 id -* TimeoutMs:事务超时时间,单位毫秒 ## 示例 @@ -91,14 +96,7 @@ ErrorReplicasCount: 0 ``` 3. 查看 label 为 label_name 的事务: - + ```sql SHOW TRANSACTION WHERE LABEL = 'label_name'; ``` - -## 关键词 - -SHOW, TRANSACTION - - - diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md index fc78872b12e0d..2ecf2f12e3595 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md @@ -23,57 +23,61 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - - - ## 描述 该语法用于查看指定 transaction id 或 label 的事务详情。 -语法: +### 语法 ```sql SHOW TRANSACTION -[FROM db_name] +[FROM ] WHERE -[id = transaction_id] -[label = label_name]; +[id = | label = ]; ``` -返回结果示例: +## 必选参数 +**1. ``** -```sql - TransactionId: 4005 - Label: insert_8d807d5d-bcdd-46eb-be6d-3fa87aa4952d - Coordinator: FE: 10.74.167.16 - TransactionStatus: VISIBLE - LoadJobSourceType: INSERT_STREAMING - PrepareTime: 2020-01-09 14:59:07 - CommitTime: 2020-01-09 14:59:09 - FinishTime: 2020-01-09 14:59:09 - Reason: -ErrorReplicasCount: 0 - ListenerId: -1 - TimeoutMs: 300000 -``` +需要查看事务详情的 transaction id + +**2. ``** + +需要查看事务详情的 label + +## 可选参数 + +**1. ``** +需要查看事务详情的database + +## 返回值 + +| Column name | Description | +|---|---| +| TransactionId | 事务 id | +| Label | 导入任务对应的 label | +| Coordinator | 负责事务协调的节点 | +| TransactionStatus | 事务状态 | +| PREPARE | 准备阶段 | +| COMMITTED | 事务成功,但数据不可见 | +| VISIBLE | 事务成功且数据可见 | +| ABORTED | 事务失败 | +| LoadJobSourceType | 导入任务的类型 | +| PrepareTime | 事务开始时间 | +| CommitTime | 事务提交成功的时间 | +| FinishTime | 数据可见的时间 | +| Reason | 错误信息 | +| ErrorReplicasCount | 有错误的副本数 | +| ListenerId | 相关的导入作业的 id | +| TimeoutMs | 事务超时时间,单位毫秒 | + +## 权限控制 + +| 权限(Privilege) | 对象(Object) | 说明(Notes) | +|:--------------|:-----------|:------------------------| +| ADMIN_PRIV | Database | 只有拥有 ADMIN_PRIV 的用户才能操作 | -* TransactionId:事务 id -* Label:导入任务对应的 label -* Coordinator:负责事务协调的节点 -* TransactionStatus:事务状态 - * PREPARE:准备阶段 - * COMMITTED:事务成功,但数据不可见 - * VISIBLE:事务成功且数据可见 - * ABORTED:事务失败 -* LoadJobSourceType:导入任务的类型。 -* PrepareTime:事务开始时间 -* CommitTime:事务提交成功的时间 -* FinishTime:数据可见的时间 -* Reason:错误信息 -* ErrorReplicasCount:有错误的副本数 -* ListenerId:相关的导入作业的 id -* TimeoutMs:事务超时时间,单位毫秒 ## 示例 @@ -90,14 +94,8 @@ ErrorReplicasCount: 0 ``` 3. 查看 label 为 label_name 的事务: - + ```sql SHOW TRANSACTION WHERE LABEL = 'label_name'; ``` -## 关键词 - - SHOW, TRANSACTION - -## 最佳实践 - diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md index 280d737e94102..d53073b2c9e53 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md @@ -24,57 +24,62 @@ specific language governing permissions and limitations under the License. --> - ## 描述 该语法用于查看指定 transaction id 或 label 的事务详情。 ### 语法 - ```sql SHOW TRANSACTION -[FROM db_name] +[FROM ] WHERE -[id = transaction_id] -[label = label_name]; +[id = | label = ]; ``` -### 返回结果 +## 必选参数 +**1. ``** -示例: +需要查看事务详情的 transaction id -```sql - TransactionId: 4005 - Label: insert_8d807d5d-bcdd-46eb-be6d-3fa87aa4952d - Coordinator: FE: 10.74.167.16 - TransactionStatus: VISIBLE - LoadJobSourceType: INSERT_STREAMING - PrepareTime: 2020-01-09 14:59:07 - CommitTime: 2020-01-09 14:59:09 - FinishTime: 2020-01-09 14:59:09 - Reason: -ErrorReplicasCount: 0 - ListenerId: -1 - TimeoutMs: 300000 -``` +**2. ``** + +需要查看事务详情的 label + +## 可选参数 + +**1. ``** + +需要查看事务详情的database + + +## 返回值 + +| Column name | Description | +|---|---| +| TransactionId | 事务 id | +| Label | 导入任务对应的 label | +| Coordinator | 负责事务协调的节点 | +| TransactionStatus | 事务状态 | +| PREPARE | 准备阶段 | +| COMMITTED | 事务成功,但数据不可见 | +| VISIBLE | 事务成功且数据可见 | +| ABORTED | 事务失败 | +| LoadJobSourceType | 导入任务的类型 | +| PrepareTime | 事务开始时间 | +| CommitTime | 事务提交成功的时间 | +| FinishTime | 数据可见的时间 | +| Reason | 错误信息 | +| ErrorReplicasCount | 有错误的副本数 | +| ListenerId | 相关的导入作业的 id | +| TimeoutMs | 事务超时时间,单位毫秒 | + +## 权限控制 + +| 权限(Privilege) | 对象(Object) | 说明(Notes) | +|:--------------|:-----------|:------------------------| +| ADMIN_PRIV | Database | 只有拥有 ADMIN_PRIV 的用户才能操作 | -* TransactionId:事务 id -* Label:导入任务对应的 label -* Coordinator:负责事务协调的节点 -* TransactionStatus:事务状态 - * PREPARE:准备阶段 - * COMMITTED:事务成功,但数据不可见 - * VISIBLE:事务成功且数据可见 - * ABORTED:事务失败 -* LoadJobSourceType:导入任务的类型。 -* PrepareTime:事务开始时间 -* CommitTime:事务提交成功的时间 -* FinishTime:数据可见的时间 -* Reason:错误信息 -* ErrorReplicasCount:有错误的副本数 -* ListenerId:相关的导入作业的 id -* TimeoutMs:事务超时时间,单位毫秒 ## 示例 @@ -96,9 +101,4 @@ ErrorReplicasCount: 0 SHOW TRANSACTION WHERE LABEL = 'label_name'; ``` -## 关键词 - -SHOW, TRANSACTION - - diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md b/versioned_docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md index b78a2ac725f4b..3f223737531d0 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md @@ -29,49 +29,57 @@ under the License. This syntax is used to view transaction details for the specified transaction id or label. -grammar: +## Syntax ```sql SHOW TRANSACTION -[FROM db_name] +[FROM ] WHERE -[id=transaction_id] -[label = label_name]; +[id = | label = ]; ``` -Example of returned result: +## Required Parameters -``` - TransactionId: 4005 - Label: insert_8d807d5d-bcdd-46eb-be6d-3fa87aa4952d - Coordinator: FE: 10.74.167.16 - TransactionStatus: VISIBLE - LoadJobSourceType: INSERT_STREAMING - PrepareTime: 2020-01-09 14:59:07 - CommitTime: 2020-01-09 14:59:09 - FinishTime: 2020-01-09 14:59:09 - Reason: -ErrorReplicasCount: 0 - ListenerId: -1 - TimeoutMs: 300000 -``` +**1. ``** + +The transaction ID whose details need to be viewed. + +**2. ``** + +The label whose transaction details need to be viewed. + +## Optional Parameters + +**1. ``** -* TransactionId: transaction id -* Label: the label corresponding to the import task -* Coordinator: The node responsible for transaction coordination -* TransactionStatus: transaction status - * PREPARE: preparation stage - * COMMITTED: The transaction succeeded, but the data was not visible - * VISIBLE: The transaction succeeded and the data is visible - * ABORTED: Transaction failed -* LoadJobSourceType: Type of import job. -* PrepareTime: transaction start time -* CommitTime: The time when the transaction was successfully committed -* FinishTime: The time when the data is visible -* Reason: error message -* ErrorReplicasCount: The number of replicas with errors -* ListenerId: The id of the related import job -* TimeoutMs: Transaction timeout, in milliseconds +The database whose transaction details need to be viewed. + +## Return Value + +| Column Name | Description | +|---|---| +| TransactionId | Transaction ID | +| Label | Label associated with the import task | +| Coordinator | Node responsible for coordinating the transaction | +| TransactionStatus | Status of the transaction | +| PREPARE | Preparation phase | +| COMMITTED | Transaction succeeded, but data is not visible yet | +| VISIBLE | Transaction succeeded, and data is visible | +| ABORTED | Transaction failed | +| LoadJobSourceType | Type of the import task | +| PrepareTime | Start time of the transaction | +| CommitTime | Time when the transaction was successfully committed | +| FinishTime | Time when the data became visible | +| Reason | Error message | +| ErrorReplicasCount | Number of replicas with errors | +| ListenerId | ID of the related import job | +| TimeoutMs | Transaction timeout duration in milliseconds | + +## Access Control Requirements + +| Privilege | Object | Notes | +| :-------------- | :----------- | :------------------------ | +| ADMIN_PRIV | Database | Only users with ADMIN_PRIV can perform this operation. | ## Examples @@ -93,9 +101,3 @@ ErrorReplicasCount: 0 SHOW TRANSACTION WHERE LABEL = 'label_name'; ``` -## Keywords - - SHOW, TRANSACTION - -## Best Practice - diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md b/versioned_docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md index 72a373a4070a4..af6167d42732f 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/transaction/SHOW-TRANSACTION.md @@ -24,56 +24,63 @@ specific language governing permissions and limitations under the License. --> - ## Description This syntax is used to view transaction details for the specified transaction id or label. -grammar: +## Syntax ```sql SHOW TRANSACTION -[FROM db_name] +[FROM ] WHERE -[id=transaction_id] -[label = label_name]; +[id = | label = ]; ``` -Example of returned result: +## Required Parameters -``` - TransactionId: 4005 - Label: insert_8d807d5d-bcdd-46eb-be6d-3fa87aa4952d - Coordinator: FE: 10.74.167.16 - TransactionStatus: VISIBLE - LoadJobSourceType: INSERT_STREAMING - PrepareTime: 2020-01-09 14:59:07 - CommitTime: 2020-01-09 14:59:09 - FinishTime: 2020-01-09 14:59:09 - Reason: -ErrorReplicasCount: 0 - ListenerId: -1 - TimeoutMs: 300000 -``` +**1. ``** + +The transaction ID whose details need to be viewed. + +**2. ``** + +The label whose transaction details need to be viewed. + +## Optional Parameters + +**1. ``** + +The database whose transaction details need to be viewed. -* TransactionId: transaction id -* Label: the label corresponding to the import task -* Coordinator: The node responsible for transaction coordination -* TransactionStatus: transaction status - * PREPARE: preparation stage - * COMMITTED: The transaction succeeded, but the data was not visible - * VISIBLE: The transaction succeeded and the data is visible - * ABORTED: Transaction failed -* LoadJobSourceType: Type of import job. -* PrepareTime: transaction start time -* CommitTime: The time when the transaction was successfully committed -* FinishTime: The time when the data is visible -* Reason: error message -* ErrorReplicasCount: The number of replicas with errors -* ListenerId: The id of the related import job -* TimeoutMs: Transaction timeout, in milliseconds - -## Example +## Return Value + +| Column Name | Description | +|---|---| +| TransactionId | Transaction ID | +| Label | Label associated with the import task | +| Coordinator | Node responsible for coordinating the transaction | +| TransactionStatus | Status of the transaction | +| PREPARE | Preparation phase | +| COMMITTED | Transaction succeeded, but data is not visible yet | +| VISIBLE | Transaction succeeded, and data is visible | +| ABORTED | Transaction failed | +| LoadJobSourceType | Type of the import task | +| PrepareTime | Start time of the transaction | +| CommitTime | Time when the transaction was successfully committed | +| FinishTime | Time when the data became visible | +| Reason | Error message | +| ErrorReplicasCount | Number of replicas with errors | +| ListenerId | ID of the related import job | +| TimeoutMs | Transaction timeout duration in milliseconds | + +## Access Control Requirements + +| Privilege | Object | Notes | +| :-------------- | :----------- | :------------------------ | +| ADMIN_PRIV | Database | Only users with ADMIN_PRIV can perform this operation. | + +## Examples 1. View the transaction with id 4005: @@ -91,11 +98,4 @@ ErrorReplicasCount: 0 ```sql SHOW TRANSACTION WHERE LABEL = 'label_name'; - ``` - -## Keywords - - SHOW, TRANSACTION - -## Best Practice - + ``` \ No newline at end of file