Skip to main content

Notifications

Microsoft Dynamics SL (Archived)

Fatal SQL Error 15161 Occurred during Company Login

Posted on by 55

I'm hoping I can find some help with this prior to going to the tech team and using an incident.  I am getting this error after backing up one live database and restoring it to a test environment - this error comes up when trying to log into the test environment. 

The problem I have now is the process to run the Synchronize All Ownership & Security Update will not run (in order to clear the error message above).  Every time I try to run it, the screen goes non-responsive.  I've tried via our VPN from home, at the office directly connected to the network, and remotely connected to the server and I get the same non-responsive screen.

 One interesting point to this is the last time I tried to run it, one of the finance team was in SL and received the error message that their login did not sync up to their password, which is what I expect them to receive when this process is running.  But, why should they receive that error message if the process is not running (or it appears to be that way).

 Can someone give me some insight on this screen?  That maybe the process has actually kicked off and I would not see any movement in the status bar at the bottom for a bit of time?

 I appreciate the help!!!!

*This post is locked for comments

  • Re: Re: Re: Fatal SQL Error 15161 Occurred during Company Login

    My guess is that the SQL database users are orphaned, i.e. they have different SIDs for their corresponding SQL logins on each server.

    I suggest dropping the logins on the test server and following the steps from this KB article:

    http://support.microsoft.com/kb/918992/

    That way the two servers will have the same SIDs for the same logins (and, therefore database users).  Your old backups from the test server will have orphaned users, but you could use sp_change_users_login with the 'Auto_Fix' option to resolve that.

  • Laura Barber Profile Picture
    Laura Barber on at
    Re: Re: Re: Fatal SQL Error 15161 Occurred during Company Login

    Hi,

    I always back up the live to a File, then restore to the test from that device.  I guess it is different when you create the test directly from a live copy.  Once restored, I update the database names in the Domain and company tables of the Test System, then I Update Views. 

    -- Maybe a SQL expert will jump in with more advice.  Sorry I couldn't help you!

    Laura

  • Kelly Ashe Profile Picture
    Kelly Ashe 55 on at
    Re: Re: Fatal SQL Error 15161 Occurred during Company Login

    Hi Laura!

     We are on SL 7.01 and SQL 2005 (we have not installed the FP1 yet).

    The restore process I am doing is within SQL:  Tasks/Restore/Database.  Choose my database to restore TO, from device (find my LIVE db file), then under restore options, I choose Overwrite Existing DB.  Now, my restore as files are pointing at a different location on the server than what my backup is, but that should not matter because it is pointing at the correct location of the test environment (we've tried to change this too, but it did not work).

    The funny thing is, we can restore the last backup made of that test environment just fine, but not a backup of the live database into the test environment.

     BUT, I know to fix the restore issue is that I need to run the Synchronize Ownership...hence my problem now is this process is hanging up when I try to run it.  Even remoting directly to the server, it is hanging (non-responsive).  So, I was hoping to get some help in that arena to fix my ultimate problem of the restore to the test environment.

     Vicious circle....I know......

    Let me know if you have any thoughts.  I appreciate the help!

  • Laura Barber Profile Picture
    Laura Barber on at
    Re: Fatal SQL Error 15161 Occurred during Company Login

    Hi Kelly,

    Can you give a little info about how you restored that database to the test? 

    I have never seen that error before... I'm just wondering if the database names were updated after the restore, and if Views have been updated, etc.  I back up and restore databases all the time, and I don't think I ever needed to run the Synchronize Ownership option related to a restore. 

    It would also help to know your version of SL and SQL.

    Laura

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans