Following a restore of a One Identity Manager database of version 8.1 or later on a new server, SQL Server agent jobs throw errors resembling
Executed as user: <DBName>. 50000 0
re-throw in Procedure QBM_PDBQueueStartSlots, Line 38
50000 0 re-throw in Procedure QBM_PDBQueueStopSlots, Line 49
15517 0 detected in (SRV=<SQLServer>, DB=<DBName>) Procedure QBM_PBrokerMessageSend, Line 0
15517 0 Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission. [SQLSTATE 42000] (Error 50000)
Job 'QBM_PWatchDog on <DBName>' started successfully.
[SQLSTATE 01000] (Message 14243). The step failed.
For One Identity Manager 8.1 and newer, some procedures require the dbo user. Under certain circumstances, the dbo user may not be associated with a login following a restore of One Identity Manager database to a new server. This happens when the SQL login that the dbo user is associated with on the source server does not exist on the target server.
You can grant the ownership of the database to a valid login like this:
ALTER AUTHORIZATION ON DATABASE::<DBName> TO [<valid SQL login>]
Please replace <DBName> and <valid SQL login> accordingly.