Issue
I’ve been using HVR for a few months in our Windows Server 2012 R2 test environment, and inexplicably the HVR scheduler seems to have stopped working a few days ago even though no known changes have been made to the environment. When I attempt to start the scheduler, the following error message is displayed:
Environment
Local Data Processing
Answer
It was discovered that the authorization for the HVR user account had been changed to a service account that didn’t have appropriate database permissions. The resolve was to changed the authorization back to dbo, to get replication working once again.
When replicating changes into a target SQL Server database, HVR supports the following two permission models: DbOwner, and Minimal.
DbOwner
In this permission model, the HVR User must be made a database owner (db_owner role).Normally, the database objects which HVR sometimes creates will be part of the dbo schema as the replicated tables. Alternatively, these HVR database objects can be put in a special database schema so that they are not visible to other users.
-
create schema hvrschema
-
grant control on schema::hvrschema to hvruser
-
alter user hvruser with default_schema=hvrschema
Minimal
In this permission model, the User does not need to be a database owner. This model cannot use parameter /Schema to change tables with a different owner. The following SQL is needed so that HVR can create its own tables:
- grant create table to hvruser
- create schema hvrschema
- grant control on schema::hvrschema to hvruser
- alter user hvruser with default_schema=hvrschema
- If action Integrate /DbProc is defined, then create procedure privilege is also needed.
See required grants @
- https://www.hvr-software.com/docs/location-class-requirements/requirements-for-sql-server
- https://www.hvr-software.com/docs/installing-and-upgrading-hvr/requirements-for-windows
- https://www.hvr-software.com/docs/commands/hvrscheduler