Orchestrator
2023.10
falso
Imagem de fundo do banner
Guia de instalação do Orchestrator
Última atualização 19 de abr de 2024

Antes de atualizar

Please make sure to perform these steps before an upgrade from 2023.4 to 2023.4+. They help ensure that, once the upgrade is done, you can get started in no time, with zero issues.

  1. Faça backup de seu banco de dados para remover eliminar riscos de perda de dados.
  2. Execute o script de manutenção do banco de dados de pré-atualização abaixo.
    Este script remove todas as concessões expiradas ou consumidas do banco de dados. Isso ajuda a acelerar a recriação do índice e da chave primária [identity].[PersistedGrants] e, como tal, a migração do banco de dados.
    DECLARE @Now DATETIME2 = GETUTCDATE()
    DECLARE @ConsumedGrantsGracePeriod DATETIME2 = DATEADD(hour, -2, @Now)
    
    DECLARE @ConsumedDeleted int = 1
    DECLARE @ExpiredDeleted int = 1
    DECLARE @BatchSize int = 500
    DECLARE @ConsumedBatchesDeleted int = 0
    DECLARE @ExpiredBatchesDeleted int = 0
    
    SET LOCK_TIMEOUT 0
    SET DEADLOCK_PRIORITY LOW
    
    WHILE (@ConsumedDeleted=1 OR @ExpiredDeleted=1)
    BEGIN
    
      IF @ConsumedDeleted=1
      BEGIN
        BEGIN TRY
          DELETE TOP(@BatchSize) FROM [identity].[PersistedGrants] WHERE [ConsumedTime] IS NOT NULL AND [ConsumedTime] < @ConsumedGrantsGracePeriod AND [Type] <> 'reference_token'
          IF @@ROWCOUNT = 0
            SET @ConsumedDeleted=0
    	  ELSE
    	    SET @ConsumedBatchesDeleted = @ConsumedBatchesDeleted + 1
    	END TRY
    	BEGIN CATCH
    	  PRINT 'Failed to delete consumed grants'
    	END CATCH
      END
    
      IF @ExpiredDeleted=1
      BEGIN
        BEGIN TRY
          DELETE TOP(@BatchSize) FROM [identity].[PersistedGrants] WHERE [Expiration] < @Now AND [Type] <> 'reference_token'
    	  IF @@ROWCOUNT = 0
    	    SET @ExpiredDeleted=0
    	  ELSE
    	    SET @ExpiredBatchesDeleted = @ExpiredBatchesDeleted + 1
    	END TRY
    	BEGIN CATCH
    	  PRINT 'Failed to delete expired grants'
    	END CATCH
      END
    
      PRINT 'Consumed batches deleted: ' + CONVERT(nvarchar(32), @ConsumedBatchesDeleted)
      PRINT 'Expired batches deleted: ' + CONVERT(nvarchar(32), @ExpiredBatchesDeleted)
    
      -- Wait for 10 seconds between deletes
      IF (@ExpiredDeleted=1 OR @ConsumedDeleted=1)
        WAITFOR DELAY '00:00:05.000'
    
    ENDDECLARE @Now DATETIME2 = GETUTCDATE()
    DECLARE @ConsumedGrantsGracePeriod DATETIME2 = DATEADD(hour, -2, @Now)
    
    DECLARE @ConsumedDeleted int = 1
    DECLARE @ExpiredDeleted int = 1
    DECLARE @BatchSize int = 500
    DECLARE @ConsumedBatchesDeleted int = 0
    DECLARE @ExpiredBatchesDeleted int = 0
    
    SET LOCK_TIMEOUT 0
    SET DEADLOCK_PRIORITY LOW
    
    WHILE (@ConsumedDeleted=1 OR @ExpiredDeleted=1)
    BEGIN
    
      IF @ConsumedDeleted=1
      BEGIN
        BEGIN TRY
          DELETE TOP(@BatchSize) FROM [identity].[PersistedGrants] WHERE [ConsumedTime] IS NOT NULL AND [ConsumedTime] < @ConsumedGrantsGracePeriod AND [Type] <> 'reference_token'
          IF @@ROWCOUNT = 0
            SET @ConsumedDeleted=0
    	  ELSE
    	    SET @ConsumedBatchesDeleted = @ConsumedBatchesDeleted + 1
    	END TRY
    	BEGIN CATCH
    	  PRINT 'Failed to delete consumed grants'
    	END CATCH
      END
    
      IF @ExpiredDeleted=1
      BEGIN
        BEGIN TRY
          DELETE TOP(@BatchSize) FROM [identity].[PersistedGrants] WHERE [Expiration] < @Now AND [Type] <> 'reference_token'
    	  IF @@ROWCOUNT = 0
    	    SET @ExpiredDeleted=0
    	  ELSE
    	    SET @ExpiredBatchesDeleted = @ExpiredBatchesDeleted + 1
    	END TRY
    	BEGIN CATCH
    	  PRINT 'Failed to delete expired grants'
    	END CATCH
      END
    
      PRINT 'Consumed batches deleted: ' + CONVERT(nvarchar(32), @ConsumedBatchesDeleted)
      PRINT 'Expired batches deleted: ' + CONVERT(nvarchar(32), @ExpiredBatchesDeleted)
    
      -- Wait for 10 seconds between deletes
      IF (@ExpiredDeleted=1 OR @ConsumedDeleted=1)
        WAITFOR DELAY '00:00:05.000'
    
    END
  3. Migre suas pastas clássicas para pastas modernas, de modo a garantir execuções ininterruptas.

    Estas são as alterações que você pode esperar neste momento no processo de remoção de pastas clássicas.

Was this page helpful?

Obtenha a ajuda que você precisa
Aprendendo RPA - Cursos de automação
Fórum da comunidade da Uipath
Logotipo branco da Uipath
Confiança e segurança
© 2005-2024 UiPath. All rights reserved.