Creating the Maintenance User and Assigning Roles

Create the maintenance user and assign the relevant roles to the user.

  1. Start isql as the user with system security officer privileges on the Adaptive Server with the user database that the maintenance user is going to manage:
    isql –Usso_user -Ppassword -Sdata_server_name
  2. Create the maintenance user login ID:
    create login maintenance_user_name with password maintenance_user_password
    go
  3. Grant replication_role to the maintenance user ID:
    sp_role "grant", replication_role, maintenance_user_name
    go
    You see:
    Authorization updated.
    (return status = 0)
  4. Grant rs_maint_user_role to the maintenance user ID:
    sp_role "grant", rs_maint_user_role, maintenance_user_name
    go
    You see:
    Authorization updated.
    (return status = 0)
  5. Automatically activate rs_maint_user_role when the maintenance user logs in to the user database:
    alter login maintenance_user_name add auto activated roles rs_maint_user_role
    go
  6. Assign dbo, the user database owner, as an alias for the maintenance user to allow the maintenance user to manage the database with all the privileges of dbo:
    sp_addalias maintenance_user_name, dbo
    go
    Note: Do not execute sp_addalias if you are configuring master database replication.
    You see:
    Alias user added.
    (return status = 0)