Issue with LocalDB Instance after Windows 10 upgrade

  • I have a system that uses SQL LocalDB as a repository of transitional data. I have one user who upgraded today to Windows 10. They are running a 32bit OS. Following upgrade the system is unable to connect to the instance. Standard error of:-

    Start of LocalDB instance "v11.0" failed because of the following error: Error occurred during LocalDB instance startup: SQL Server process failed to start.

    On investigation the LocalDB error log reads that the instance could not start because it could not reference the directory for model, resources etc. The directory path is weird, pointing to some E drive they do not have:-

    Starting up database 'model'.

    2012-11-01 16:22:18.58 spid9s Error: 17204, Severity: 16, State: 1.

    2012-11-01 16:22:18.58 spid9s FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\model.mdf for file number 1. OS error: 3(The system cannot find the path specified.).

    It gets stranger. If I delete the instance and recreate it everything works fine, up until I reboot. If I reboot the same error comes back e.g. The instance cannot start because of the strange path above.

    I have checked permissions. The app that is starting the instance (through first connecting) is a .Net exe using SQL Client for connection.

    I have done some googling and the error is not unknown (although not connected to Windows 2010.) No clear fix.

    I was wondering if this was a corrupt user profile issue. My next step was to uninstall LocalDB, create a new admin user, install LocalDB under this user, create my instance, reboot and see if it can start the instance without a delete and recreate.

    Has anyone seen this following a Windows 2010 upgrade?

  • Windows 10 or Windows 2010?

    I don't know of any Windows 2010 release.

    What version of Windows was the user upgraded from? And was SQL 2012 32bit also or 64bit?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Sorry about the previous Windows 2010! I meant Windows 10 - it had been a long day!

    I was lucky enough to go to a site today where this issue is happening. I have a work around which I detail below, but it is an interesting issue.

    Background

    I have about 500 users using a system that runs on Windows. It utilises a SQL 2012 Local DB as a data repository. I have two users with the above problem. Both users are running Windows 10 32 bit. Both have recently upgraded from Windows 7. At least one of these users had no issues before upgrade.

    Issue

    As part of the launching of the system I use a .Net EXE to verify that all the components are in place and working OK. One of the functions that this EXE calls is: -

    Private Function CheckLocalDBConnection() As Boolean

    Dim connetionString As String

    Dim cnn As SqlConnection

    Try

    connetionString = "Data Source=(LocalDB)\InstanceName;Initial Catalog=Master;User ID=SQLUser;Password=*******"

    cnn = New SqlConnection(connetionString)

    cnn.Open()

    cnn.Close()

    CheckLocalDBConnection = True

    Catch

    CheckLocalDBConnection = False

    End Try

    End Function

    This function tries to get a connection to the LocalDB. As per the Microsoft documentation, this first connection also starts the instance.

    On these two machines, the starting of the instance fails with the error that the Model, Resources etc can be accessed due to them being hosted on some spurious E drive.

    Investigation

    If I create and start the instance via a batch file, the above code works fine. It is only starting the instance (through initial first connection) via the .Net EXE that is causing the issue.

    I have created a new user, uninstalled local db, reinstalled local db, all with the same error.

    Work around

    I changed the desktop shortcut to point to a batch file. The batch file now starts the instance before calling the EXE. This works and resolves the issue for the end user.

    My thoughts

    I think the error is erroneous and actually points to a permission issue between the .Net exe and the LocalDB Instance. We have not yet got to the point of connecting to the instance (although the code above is a connection). The error log is showing that the instance is failing to start.

    I cannot recreate the issue on any equipment that I own so I have limited scope to investigate further. However, I am posting this just in case someone else has the same issue...

  • Thank you for posting your workaround and all the detail.

    I'm thinking you're correct that the error you receive has nothing to do with the real problem. On the other hand, did you restart the machine between the uninstall and the reinstall of the SQL components?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Yes I did.

    It is odd. If I had more time to play with it (remember, I can't recreate this outside of a live user environment) I would have tried SQL 2014 Local DB or I could have tried a scannow /sfc to fix any .Net issues that may be causing the problem.

    Pretty sure it is something to do with .Net and how it is allowing (or in this case not allowing) the connection request from the Exe to "start" the instance. Once the instance is started then a connection follows the standard set of rules and seems to work, but it is that start process that is failing.

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

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