Sage 100

 View Only
  • 1.  Error "It was not possible to connect to the database" - SI, Prem 2022

    Posted 04-07-2024 14:06

    Attempting to run my first SI report on Sage 2022 Prem client. Getting the above error, which Sage has in the KB.  The script they said to run in SQL (I copied and pasted) returns this upon execution:

    "The number of orphaned users fixed by updating users was 0.
    The number of orphaned users fixed by adding new logins and then updating users was 0."

    The assumption that fixing 0 users is bad appears to be correct.  Still getting the same error in SI.  Verified in the Tenant Cache that the password for MAS_Reports was correct.

    The script was this:

    EXEC sp_change_users_login 'Auto_Fix', 'MAS_Reports'
    GO
    EXEC sp_dropuser 'MAS_Reports'
    GO
    EXEC sp_grantdbaccess 'MAS_Reports'
    GO
    EXEC sp_addrolemember 'db_datareader', 'MAS_Reports'

    I was logged in as "sa" in SQL SMS.  Can anyone tell me what the script looks like it is doing, why it would need to do it, and why it may not be fixing anything?  Any or all of those would be helpful...  THANK YOU!



    ------------------------------
    Beth Bowers
    (269) 358-0989
    ------------------------------


  • 2.  RE: Error "It was not possible to connect to the database" - SI, Prem 2022

    Posted 04-07-2024 16:53

    Not sure about "sp_change_users_login" , or why it might be needed given the lines after it, which drop MAS_Reports from the database and then add it back in with the proper role.  This often needs to be done if you manually move a database to a new server, as the usernames on each server (like MAS_Reports) are only human readable pointers to GUIDs, which are NOT the same for Server1\MAS_Reports and Server2\MAS_Reports.

    So if MAS_Reports in the database was already the MAS_Reports for that server, then nothing was accomplished and the real problem with SI lies elsewhere.



    ------------------------------
    Phil McIntosh
    Friendly Systems, Inc.
    ------------------------------



  • 3.  RE: Error "It was not possible to connect to the database" - SI, Prem 2022

    Posted 04-08-2024 08:21

    Thanks, @Phil McIntosh.  I may have to get Sage involved on this one.



    ------------------------------
    Beth Bowers
    (269) 358-0989
    ------------------------------