System.Exception: Init Host: Could Not Find The Type 'dbo.BulkEntityId'. Either It Does Not Exist Or You Do Not Have The Necessary Permission

Error fix for "System.Exception: Init Host: Could Not Find The Type 'dbo.BulkEntityId'. Either It Does Not Exist Or You Do Not Have The Necessary Permission" .

  1. Since BulkEntityId is missing, execute the below script in the SQL Server SSMS:
/****** Object: UserDefinedTableType [dbo].[BulkEntityId]  ******/



USE [UiPath] -- If database name is different , replace the name with the keyword UiPath in the script

GO 



CREATE TYPE [dbo].[BulkEntityId] AS TABLE(

 [EntityId] [bigint] NOT NULL,

 PRIMARY KEY CLUSTERED

(

 [EntityId] ASC

)WITH (IGNORE_DUP_KEY = OFF)

)

GO

Also, verify If BulkSessionReportingTime is missing, then please execute the below script:

/****** Object: UserDefinedTableType [dbo].[BulkSessionReportingTime]   Script Date: 11-02-2019 12:26:08 ******/



USE [UiPath] -- If database name is different , replace the name with the keyword UiPath in the script

GO

 



CREATE TYPE [dbo].[BulkSessionReportingTime] AS TABLE(

      [RobotKey] [nvarchar](450) NOT NULL,

      [State] [int] NOT NULL,

      [ReportingTime] [datetime] NOT NULL,

       PRIMARY KEY CLUSTERED

(

      [RobotKey] ASC

)WITH (IGNORE_DUP_KEY = OFF)

)

GO

  1. If applicable, uninstall the SCOM agent. If SCOM agent is required, reinstall it and during installation specify NOAPM=1
  • Stop IIS site
  • Run the MS Agent installer with the extra parameters: NOAPM=1
  • #this will only delete the APM monitoring
  • msiexe.exec /fvomus “MsMonitoringAgent.msi” NOAPM=1

For more details visit the article shared below: