Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

SQL Server Message 134

Posted on by 1,170

I have a client newly upgraded to SL2015CU2. They are a single user system, running on a Windows 10 environment and using SQL Server 2012 Standard for the database platform.

Each morning, when she logs in to SL, she receives a SQL Server Message 134. However, if she restarts (as opposed to reboots) her laptop, the error does not appear when she logs in to SL.

Anyone have any suggestions on what to look for? We've tried waiting 20 minutes after starting the laptop to start SL with the same results.

Thanks in advance!

Stuart Nottingham

*This post is locked for comments

  • Brian_IL Profile Picture
    Brian_IL 715 on at
    RE: SQL Server Message 134

    Hi Stuart,

    The last update you noted was an operating system error when accessing SL tables from SSMS - "Operating System Error 21: device is not ready". Since SQL Services would have already started, the databases must have been initially accessible, which you would see recorded in the SQL logs. 

    You mentioned that everything is installed on one computer. Have you checked the energy saver setup on that computer? You may try customizing the power plan and disabling energy save under advanced power settings. This looks like an issue accessing the drive hosting the databases, where the drive goes into sleep mode.

  • Stuart Nottingham Profile Picture
    Stuart Nottingham 1,170 on at
    RE: SQL Server Message 134

    Still working on this issue, and thought I'd update. Today, prior to the client signing in to SL, I used SQL Server Management Studio, queried the RPTRuntime table in the app database, and received "Operating System Error 21: device is not ready" with a reference to the app database mdf file. Following some advice I found online, I detached the database, copied the files over to another location and reattached them. Once I did that, I was able to query the table. Furthermore, the client was able to sign in to SL without the error.

    Having learned my lesson (see above), I chose not to rest on my laurels, but instead shutdown the computer, waited a few minutes and restarted it. The errors reappeared both in SL and SQL. Rebooted again. THIS time, I stopped the SQL service and restarted it, then tried SL. Lo and behold, it worked!

    Now before anyone suggests a delayed start for SQL, this is something I'd already tried without success. I've run scripts to check the health of the databases and they return no issues. I am tempted to hand this off to their IT consultant, but the pit bull in my won't let it go. Has anyone else ever run across Error 21 and, if so, how did you resolve it?

  • Stuart Nottingham Profile Picture
    Stuart Nottingham 1,170 on at
    RE: SQL Server Message 134

    Don't you hate it when something works one day, then fails the next. Yesterday, we tested this out after removing McAfee, and everything worked beautifully! Reboot, restart, the whole shooting match. The error never appeared.

    This morning, the client reported that the error is back. I'm going to give Ed's ODBC deletion a try to see if that's the problem. Will report back, although if it "works", I'm going wait a day to say so!

  • Stuart Nottingham Profile Picture
    Stuart Nottingham 1,170 on at
    RE: SQL Server Message 134

    So after much consternation, cogitation and aggravation, we have determined that the latest version of McAfee was the culprit. Removed it from the workstation (which had been planned anyway) and SL/SQL started right up. One thing we did run into was that after removing McAfee, the databases were not available. Restored from backups and all is now working.

    Didn't think of McAfee as the problem initially since after restart everything worked. Selective scanning on their part?

  • Stuart Nottingham Profile Picture
    Stuart Nottingham 1,170 on at
    RE: SQL Server Message 134

    Yes, everything installed on one machine, SQL authentication. Don't know about sleep mode. Same error when using sysadmin login.

  • PA-Ed Leffler Profile Picture
    PA-Ed Leffler 85 on at
    RE: SQL Server Message 134

    I have to wonder which table would cause this one user on one machine to have the issue and only if they do not reboot.

    You said it is a single user system, do you mean that the application and SQL server are running on the local PC?

    Are you using SQL authentication?

    Does the PC go to sleep during the idle times?

    What happens if you open SL as sysadmin?

  • Stuart Nottingham Profile Picture
    Stuart Nottingham 1,170 on at
    RE: SQL Server Message 134

    Tasha, would these need to be run for each table, or is there a global script that could be used?

  • CFROTON Profile Picture
    CFROTON 4,710 on at
    RE: SQL Server Message 134

    Hi StuartN,

    Thank you for your questions. This sounds like a database error. You may have corrupt tables in your database. I would run a check table script in SQL to see if the tables are the error. If the tables are corrupt you can run a repair SQL script to correct the corruption with tables that are failing.

    Thank you,

    Tasha Anspach

  • PA-Ed Leffler Profile Picture
    PA-Ed Leffler 85 on at
    RE: SQL Server Message 134

    Stuart, that error message is coming from the SQL server Native Client (ODBC), and not SL.

    It is telling you that the computer asked the SQL server to commit something and the connection dropped between the ask and the commit completing.

    What I would do next is check the windows log on the client's laptop to see if that sheds some light on things.

    My suggestion would be to open the event logs and clear them so the error will be easier to find. Then reproduce the error and look in the event log.

    Additionally you can look at the SQL server logs.

    If that doesn't give you any clues, simply delete the Dynamics SL ODBC connections on the computer, SL will recreate it when you open it.  If it is a 64 bit machine you may have to look both in the 64 and 32bit ODBC tools.

    If the client also uses FRx you may have to tweak the ODBC connector for that once it is recreated, so be sure and test that as well.  

    Good luck!

  • Stuart Nottingham Profile Picture
    Stuart Nottingham 1,170 on at
    RE: SQL Server Message 134

    Good morning, Ed. Here's a pic that the client used of the error from the screen. She sent it to me in a text as opposed to a screenshot, but it is legible.

    [View:https://drive.google.com/open?id=1sRrK1ZGOczoHdtmu3XGLqZmGeaQjCJko:320:50]

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans