locked
Error: 18456, Severity: 14, State: 38. Login failed for user 'user_sql'. Reason: Failed to open the explicitly specified database 'ReportServer'. [CLIENT: <local machine>] RRS feed

  • Question

  • Hi all,

    My log is flooding with the following error:

    Login failed for user 'user_sql'. Reason: Failed to open the explicitly specified database 'ReportServer'. [CLIENT: <local machine>]

    Error: 18456, Severity: 14, State: 38.

    In my instance I don't have any 'ReportServer' database and I think that this server was migrated in the past from another server that probably had this 'ReportServer' database attached.

    How can I make this error stops? It's a production environment and I can't simply drop the user and recreate it because I don't know everything this user does.

    Any help would be awesome.

    Thanks.

    Rod

    Wednesday, July 25, 2018 12:01 AM

All replies

  • You might try changing the default database this user account is mapped to from ReportServer to some other dataabase that the account has been granted read privilege on. Either that, or else grant read privilege to the account on ReportServer database.

    HTH,


    Phil Streiff, MCDBA, MCITP, MCSA


    • Edited by philfactor Wednesday, July 25, 2018 12:16 AM
    Wednesday, July 25, 2018 12:15 AM
  • Thanks for you reply @philfactor.

    The default database for this user is 'master'. Navigating through User Mapping there is nothing marked.

    I don't have in my instance a 'ReportServer' database attached. I think that the login privileges are pointing to this nonexistent database.

    I'm still in the dark here..

    Wednesday, July 25, 2018 12:33 AM
  • Hello,

    Is there "SQL Server Reporting Service" running, which would utilize the ReportServer database? Then you can stop the Services to get rid of the login errors.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, July 25, 2018 5:31 AM
  • Hi Rodrigo_eclipx,

     

    From your description, my understanding is that you find the error message in the error log of the server. If anything is misunderstand, please tell me.

     

    Based on my test, the issue is related to the client of the user "user_sql". The user wants to connect to the "ReportServer" database but the database doesn't exist in the instance. This situation leads to the error. Could you please try to check if the "ReportServer" database is specified in the connection string of the user's client. On my machine, I tried to connect to the "111" database and the "111" database doesn't in my instance. The error message in the errorlog is similar to the information you described.

    Best Regards,

    Emily


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, July 25, 2018 7:22 AM
  • If you only want to get rid of the error message, just create a datbase ReportServer and grant this user permission to it. Obviously, whatever the user is trying to do in that database will fail, but you don't seem to care about that anyway.

    Else, you will need to find the process that attempts to log in to this database. You can set up a trace to track login failures, and be careful to include the column HostprocessID in the trace. If the PID is the same all the time, you can find the process in Task Manager. If the PID is different every time, this may be because it is a process being spawned by a parent process (which could be SQL Server Agent or Windows Task Schduler). In this case you could try to track it down through Process Monitor from www.sysinternals.com.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Wednesday, July 25, 2018 8:06 AM