Unable to publish the package to Orchestrator getting error: An error occurred Below is the eventviewer log
System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object ‘sp_getapplock’, database ‘mssqlsystemresource’, schema ‘sys’.
Issue Description:
While publishing the package to the Orchestrator, getting the below error in the Orchestrator event viewer logs:
System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'sp_getapplock', database 'mssqlsystemresource', schema 'sys'.
at Task System.Data.SqlClient.SqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)+(Task result) => { }
Resolution:
It seems to be an issue with the database execution permission.
Take the database backup of the master and UiPath Orchestrator before running the following command.
Login with sa user or admin user (which has full access) and run the below command.
USE master
GO
GRANT EXECUTE ON [sys].[sp_getapplock] to [orchestratorsqlloingusername]
If above does not work, use the below one:
USE master
GRANT EXECUTE on sp_getapplock to public;