Mapping 'kbadmin' SQL User to the Database

THIS ARTICLE APPLIES TO:

All versions of Knowledgebase.

ISSUE DESCRIPTION:

After a database restore of the KB application from backup, it is possible for the Microsoft SQL user 'kbadmin' to become detached from the databases, causing permission errors.

ROOT CAUSE:

SOLUTION OR WORK AROUND:

The following SQL script can be used to restore the mapping between the user and the database. Just copy and paste the SQL script and execute it using the Microsoft SQL Query Analyzer and an account that has administrative privileges. This process should restore the database and the SQL user properly.
     use ecrmAdmin
    exec sp_change_users_login 'Update_One', 'kbAdmin', 'kbAdmin'

    use ecrmKB
    exec sp_change_users_login 'Update_One', 'kbAdmin', 'kbAdmin'

    use ecrmLogs
    exec sp_change_users_login 'Update_One', 'kbAdmin', 'kbAdmin'

    use ecrmReports
    exec sp_change_users_login 'Update_One', 'kbAdmin', 'kbAdmin'

    use ecrmUser
    exec sp_change_users_login 'Update_One', 'kbAdmin', 'kbAdmin'

    use ecrmImport
    exec sp_change_users_login 'Update_One', 'kbAdmin', 'kbAdmin'

    use ecrmForum
    exec sp_change_users_login 'Update_One', 'kbAdmin', 'kbAdmin'

AFFECTED SYSTEMS & USERS:

ADDITIONAL INFORMATION:

ESCALATION PROCEDURE:

If you have trouble performing these steps, or have additional questions, please contact our Support group at 877-373-7848 (option 2) or via email at cimsupport@moxiesoft.com.