An exception was thrown while activating Aras.Server.Core.EditItemModule after restoring the DB

Hi, I received this error after restoring and connecting the DB toin InnovatorServer.xml. Dont see any post here on this. Anyone have a solutiioon to this?
An exception was thrown while activating Aras.Server.Core.EditItemModule -> Aras.Server.Core.UpdateItemInternal -> Aras.Server.Core.ChangeTracker.ChangeTrackerContainer -> λ:Aras.Server.Core.Abstractions.Internal.IDerivedRelationshipsChangeTracker.

Parents
  • Hi,

    It seems this error can occur when your database is corrupted, or is restored without the post-restore SQL queries. I'd recommend running the following queries on the database giving you issues.

    -- Query 1 (should succeed)
    sp_change_users_login 'Update_One','innovator','innovator'
    GO
    sp_change_users_login 'Update_One','innovator_regular','innovator_regular'
    GO
    
    -- Command(s) completed successfully.
    -- Query 2 (should fail)
    sp_grantdbaccess 'innovator','innovator'
    GO
    
    -- Msg 15023, Level 16, State 1, Line 1
    -- User, group, or role 'innovator' already exists in the current database.
    -- Query 3 (should succeed)
    sp_addrolemember 'db_owner','innovator'
    GO
    
    -- Command(s) completed successfully.

Reply
  • Hi,

    It seems this error can occur when your database is corrupted, or is restored without the post-restore SQL queries. I'd recommend running the following queries on the database giving you issues.

    -- Query 1 (should succeed)
    sp_change_users_login 'Update_One','innovator','innovator'
    GO
    sp_change_users_login 'Update_One','innovator_regular','innovator_regular'
    GO
    
    -- Command(s) completed successfully.
    -- Query 2 (should fail)
    sp_grantdbaccess 'innovator','innovator'
    GO
    
    -- Msg 15023, Level 16, State 1, Line 1
    -- User, group, or role 'innovator' already exists in the current database.
    -- Query 3 (should succeed)
    sp_addrolemember 'db_owner','innovator'
    GO
    
    -- Command(s) completed successfully.

Children
No Data