automation-suite
2023.10
true
- 概述
- 要求
- 安装
- 先决条件检查
- 下载安装包
- uipathctl cluster
- uipathctl 集群维护
- uipathctl cluster maintenance disable
- uipathctl cluster maintenance enable
- uipathctl cluster maintenance is-enabled
- uipathctl cluster migration
- uipathctl cluster migration export
- uipathctl cluster migration import
- uipathctl cluster migration run
- uipathctl 集群升级
- uipathctl 配置
- uipathctl config add-host-admin
- uipathctl config additional-ca-certificates
- uipathctl config additional-ca-certificates get
- uipathctl config additional-ca-certificates update
- uipathctl 配置警示
- uipathctl configalerts add-email
- uipathctl config alerts remove-email
- uipathctl config alerts update-email
- uipathctl config argocd
- uipathctl config argocd ca-certificates
- uipathctl config argocd ca-certificates get
- uipathctl config argocd ca-certificates update
- uipathctl config argocd generate-dex-config
- uipathctl config argocd generate-rbac
- uipathctl config argocd registry
- uipathctl config argocd registry get
- uipathctl config argocd registry update
- uipathctl config enable-basic-auth
- uipathctl config Orchestrator
- uipathctl config Orchestrator get-config
- uipathctl config orchestrator update-config
- uipathctl config saml-certificates get
- uipathctl config saml-certificates rotate
- uipathctl config saml-certificates update
- uipathctl config tls-certificates
- uipathctl config tls-certificates get
- uipathctl config tls-certificates update
- uipathctl config token-signing-certificates
- uipathctl config token-signing-certificates get
- uipathctl config token-signing-certificates rotate
- uipathctl config token-signing-certificates update
- uipathctl 运行状况
- uipathctl 运行状况捆绑包
- uipathctl 运行状况检查
- uipathctl health diagnose
- uipathctl health test
- uipathctl 清单
- uipathctl manifest apply
- uipathctl manifest diff
- uipathctl manifest get
- uipathctl manifest get-revision
- uipathctl manifest list-applications
- uipathctl manifest list-revisions
- uipathctl manifest render
- uipathctl 先决条件
- uipathctl prereq create
- uipathctl prereq run
- uipathctl 资源
- uipathctl 资源报告
- uipathctl 快照
- uipathctl 快照备份
- uipathctl snapshot backup create
- uipathctl snapshot backup disable
- uipathctl snapshot backup enable
- uipathctl snapshot delete
- uipathctl snapshot list
- uipathctl snapshot restore
- uipathctl snapshot restore create
- uipathctl snapshot restore delete
- uipathctl snapshot restore history
- uipathctl snapshot restore logs
- uipathctl 版本
- 安装后
- 迁移和升级
- 监控和警示
- 集群管理
- 特定于产品的配置
- 清理 Task Mining 数据库
- 故障排除
清理 Task Mining 数据库
EKS/AKS 上的 Automation Suite 安装指南
Last updated 2024年9月12日
清理 Task Mining 数据库
本页面描述 Task Mining 数据库的必要维护任务。
默认的 Task Mining 数据库名为
[AutomationSuite_Task_Mining]
,使用单个架构[tddiscovery]
进行数据存储。 Task Mining 主要将数据存储在对象存储中,从而减少了频繁维护数据库的需要。 如果需要,您可以使用Remove_Active_History.sql
数据库维护脚本定期清理以下数据库表格:
-
[AutomationSuite_Task_Mining].[tddiscovery].[Activity历史记录]
重要提示:
在执行任何脚本之前,请确保备份 Task Mining 数据库
[AutomationSuite_Task_Mining]
。
CREATE PROCEDURE [tddiscovery].[Delete_TaskMining_ActivityHistory]
@CutoffTimeStamp datetime2,
@BatchSize INT = 10000
AS
BEGIN
DECLARE @total_deleted_items BIGINT = 0;
SET NOCOUNT ON;
-- delete ActivityHistoryItems
DECLARE @Deleted_Rows_ActivityHistoryItems INT = @BatchSize;
WHILE(@Deleted_Rows_ActivityHistoryItems = @BatchSize)
BEGIN
DELETE TOP(@BatchSize) FROM [tddiscovery].[ActivityHistory] WHERE At <= @CutoffTimeStamp;
SET @Deleted_Rows_ActivityHistoryItems = @@ROWCOUNT;
SET @total_deleted_items = @Deleted_Rows_ActivityHistoryItems + @total_deleted_items;
END;
PRINT('The script executed successfully!');
PRINT('Total deleted rows from [tddiscovery].[ActivityHistory]: ' + CONVERT(NVARCHAR, @total_deleted_items));
END;
GO
CREATE PROCEDURE [tddiscovery].[Delete_TaskMining_ActivityHistory]
@CutoffTimeStamp datetime2,
@BatchSize INT = 10000
AS
BEGIN
DECLARE @total_deleted_items BIGINT = 0;
SET NOCOUNT ON;
-- delete ActivityHistoryItems
DECLARE @Deleted_Rows_ActivityHistoryItems INT = @BatchSize;
WHILE(@Deleted_Rows_ActivityHistoryItems = @BatchSize)
BEGIN
DELETE TOP(@BatchSize) FROM [tddiscovery].[ActivityHistory] WHERE At <= @CutoffTimeStamp;
SET @Deleted_Rows_ActivityHistoryItems = @@ROWCOUNT;
SET @total_deleted_items = @Deleted_Rows_ActivityHistoryItems + @total_deleted_items;
END;
PRINT('The script executed successfully!');
PRINT('Total deleted rows from [tddiscovery].[ActivityHistory]: ' + CONVERT(NVARCHAR, @total_deleted_items));
END;
GO
-
运行
Remove_Active_History.sql
数据库维护脚本以创建Delete_TaskMining_ActivityHistory
存储过程。备注:始终使用最新版本的存储过程。
如果存储过程已存在,则删除现有的存储过程,并使用提供的脚本重新创建它。或者,您可以将CREATE
更改为ALTER
,然后执行脚本以更新存储过程。 -
执行
Delete_TaskMining_ActivityHistory
存储过程。 这将从[AutomationSuite_Task_Mining].[tddiscovery].[ActivityHistory]
表中删除与截止时间戳的活动历史记录相关的所有数据。
注意:
下表描述了在执行
PROCEDURE [tddiscovery].[Delete_TaskMining_ActivityHistory]
脚本之前,请确保已暂停使用 Task Mining。
Delete_TaskMining_ActivityHistory
SQL 存储过程的参数。
参数 |
描述 |
必填 是/否 |
@截止时间戳
|
删除在指定时间戳(例如2021-01-01 01:00:05 )之前的所有数据。 备注:
不要提供会导致空表的时间戳。 |
Y |
@BatchSize 整数 = 10000
|
一次要删除的行数。 这使您能够批量删除数据。 默认情况下,设置为10000 。
|
N |
DECLARE @ProcessTime datetime2;
SET @ProcessTime = '2024-07-11 13:44:42.7856026';
EXEC [tddiscovery].[Delete_TaskMining_ActivityHistory] @CutoffTimeStamp = @ProcessTime;
DECLARE @ProcessTime datetime2;
SET @ProcessTime = '2024-07-11 13:44:42.7856026';
EXEC [tddiscovery].[Delete_TaskMining_ActivityHistory] @CutoffTimeStamp = @ProcessTime;
有关更多信息,请参阅 Microsoft 官方文档 “存储过程” 。