SQL Server connection issues / visibility of database.

  • Periodically(roughly every month to 6 weeks) and from differing sources ( Windows Service Applications and Web Service applications) in our production environment we are falling into a situation where some of our applications cannot see a specific database.

    The General exception that is thrown is as follows :-

    System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'prcODMSelStudyDataExists'.

    at System.Data.SqlClient.SqlConnection.OnError(SqlException

    exception, Boolean breakConnection, Action`1 wrapCloseInAction)

    Error Number:2812,State:62,Class:16

    The strange thing we are observing here is that this only affects the application thread itself and if we log into SSMS with the same username and password as the login used by the application we can access all areas.

    The only thing that appears to solve the issue is for use to flip to our failover servers. This essentially restarts the SQL service. Once we do this the application continues as per normal and we don't see the error again for a few more weeks.

    Has anyone comes across anything like this before - we do use a third party encryption software called DBDefence and we have gone via their support teams but they haven`t seen anything like this before.

    Thanks

    Si

  • Apologies - this is in the wrong forum.

    I can`t move it so feel free to ignore this one.

  • I've seem this before;

    What I've seen is that while 99% of the calls to the [production] database are perfectly normal, sometimes the database context gets lost, and the the default database for the login is uses([master]) for a given call.

    of course the procedure doesn't exist in [master] so you get the error.

    so the issue isn't that the database is missing, it's that the database context for a given connection gets mangled, is the only way i can explain it.

    In our case, we had an application that used a specific SQL login to connect. we changed that login's default database to the [production] database, and that seemed to resolve out issue.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • The connection string logon has its default database set to the database in question.

    It almost feels like it losing that connection string and then revering back to the users own default login (and users naturally need acesss to multiple databases).

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply