Insights
2023.10
false
Insights
Last updated Jun 13, 2024

Upgrade using cloned database

For on-premises to cloud migration, you are required to upgrade the Insights database to version 2023.4. Since this upgrade disrupts your environment, one option to consider is cloning the databases and upgrading the cloned Insights database (DB) instead.

For added caution, in the steps below, we will clone both the Orchestrator DB and the Insights DB.

  1. Check Insights DB version - You can check the version of Insights DB by looking at the most recent row in the dbo.__MigrationHistory table. Example:
    SELECT *
    FROM [insights].[dbo].[__MigrationHistory]
    ORDER BY MigrationId DESC;SELECT *
    FROM [insights].[dbo].[__MigrationHistory]
    ORDER BY MigrationId DESC;
  2. Clone your Orchestrator DB and Insights DB - There are multiple tools for cloning DB. For example:
    1. Data Migration Assistant.
    2. Microsoft SQL Server Management Studio.
  3. Run upgrade command against cloned DBs - Follow the instruction to upgrade Insights DB docs imageHow To Manually Create / Migrate Insights DB For Orchestrator PaaS ? with the following adjustments:
    1. At step two, instead of using the PaaS Orchestrator installation media link, the following download should be used: https://download.uipath.com/versions/23.4.3/UiPathOrchestrator.zip
    2. At step seven, for Orchestrator DB connection string, use the cloned OrchDB connection string.
    3. At step nine, for Insights DB connection string, use the cloned Insights DB connection string.
    PS C:\Users\uipath\Desktop\UiPath.Orchestrator.Cli> .\UiPath.Orchestrator.Cli.exe database upgrade-database -d Insights -c ".\UiPath.Orchestrator.dll.config" --connection-string "Server=localhost;Initial Catalog=insights_clone_1; User Id=uuuuu; Password=ppppp;"
    Database upgrade started...
    Database upgrade complete.PS C:\Users\uipath\Desktop\UiPath.Orchestrator.Cli> .\UiPath.Orchestrator.Cli.exe database upgrade-database -d Insights -c ".\UiPath.Orchestrator.dll.config" --connection-string "Server=localhost;Initial Catalog=insights_clone_1; User Id=uuuuu; Password=ppppp;"
    Database upgrade started...
    Database upgrade complete.
    Note:
    • Use the connection strings for your cloned DBs to prevent contamination of your actual DB.
    • If an error occurs internally, the command may not echo the error to the terminal. Proceed with step four below to verify the successful upgrade of your DB.
  4. Check the version of cloned Insights DB.
    SELECT *
    FROM [insights_clone_1].[dbo].[__MigrationHistory]
    ORDER BY MigrationId DESC;SELECT *
    FROM [insights_clone_1].[dbo].[__MigrationHistory]
    ORDER BY MigrationId DESC;
  5. Verify if the following columns are present in each table:
    • dbo.jobs
      Note: The Id column must contain only positive numbers.
      Id, TenantId, CreationTime, StartTime, EndTime, JobKey,
      JobSource, EnvName, NULL as OrgUnitCode, OrgUnitName,
      OrganizationUnitId, ProcessName, DisplayName,
      OrgUnitFullyQualifiedName, RuntimeType,Id, TenantId, CreationTime, StartTime, EndTime, JobKey,
      JobSource, EnvName, NULL as OrgUnitCode, OrgUnitName,
      OrganizationUnitId, ProcessName, DisplayName,
      OrgUnitFullyQualifiedName, RuntimeType,
    • dbo.JobEvents
      Id, TenantId, ProcessVersion, RobotName, RobotType,
      HostMachineName, JobId, TimeStamp, Action, JobState,
      UserName, RuntimeType,Id, TenantId, ProcessVersion, RobotName, RobotType,
      HostMachineName, JobId, TimeStamp, Action, JobState,
      UserName, RuntimeType,
    • dbo.QueueItems
      Id, TenantId, Priority, QueueName, ProcessingStatus,
      ReviewStatus, RobotName, RobotType, CreationTime,
      StartProcessing, EndProcessing, CreatorJobId, ExecutorJobId,
      SecondsInPreviousAttempts, AncestorId, RetryNumber,
      DeferDate, DueDate, Progress, SpecificData, AnalyticsData,
      Output, ProcessingExceptionType, ProcessingExceptionReason,
      Reference, ReviewerUserName, OrgUnitCode, OrgUnitName,
      OrganizationUnitId, OrgUnitFullyQualifiedName,
      ProcessingExceptionDetails,Id, TenantId, Priority, QueueName, ProcessingStatus,
      ReviewStatus, RobotName, RobotType, CreationTime,
      StartProcessing, EndProcessing, CreatorJobId, ExecutorJobId,
      SecondsInPreviousAttempts, AncestorId, RetryNumber,
      DeferDate, DueDate, Progress, SpecificData, AnalyticsData,
      Output, ProcessingExceptionType, ProcessingExceptionReason,
      Reference, ReviewerUserName, OrgUnitCode, OrgUnitName,
      OrganizationUnitId, OrgUnitFullyQualifiedName,
      ProcessingExceptionDetails,
    • dbo.QueueItemEvents
      Id, TenantId, QueueItemId, TimeStamp, Action, UserName,
      ProcessingStatus, QueueDefinitionId,
      JobOrgUnitFullyQualifiedName, JobOrganizationUnitId,Id, TenantId, QueueItemId, TimeStamp, Action, UserName,
      ProcessingStatus, QueueDefinitionId,
      JobOrgUnitFullyQualifiedName, JobOrganizationUnitId,
    • dbo.RobotLogs
      Id, TenantId, OrganizationUnitId, TimeStamp, JobKey,
      MachineId, ProcessName, WindowsIdentity, RobotName,
      RawMessage, Message, LevelOrdinal,Id, TenantId, OrganizationUnitId, TimeStamp, JobKey,
      MachineId, ProcessName, WindowsIdentity, RobotName,
      RawMessage, Message, LevelOrdinal,
    • dbo.Tenants
      Note: Tenant ID must be a positive number.
      Id, Name, KeyId, Name, Key

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.