Creating a Maintenance User on the Primary Connection

The maintenance user on the primary connection is a valid Microsoft SQL Server user whose activities are ignored if Replication Agent processes log records by the user. Replication Server requires one maintenance user to be defined for each connection.

  1. Connect to the primary database, and enter this command to create the maintenance user login:
    CREATE LOGIN maintuser WITH PASSWORD='password',
    DEFAULT_DATABASE=primary_db_name;

    where password is the maintenance user login password, and primary_db_name is the primary database name.

  2. At the primary database, enter this command to create a maintenance user:
    CREATE USER maintuser FOR LOGIN maintuser;
  3. Grant database owner permission to the maintenance user:
    EXEC sp_addrolemember 'db_owner', 'maintuser';