Just a day ago, I was installing SQL Server Express on the backup computer. I only use this computer when I have something to experiment with. While installing SQL Server Express, I found the following error in my error log, which prevented successful installation to the computer. It was difficult to initially understand the problem by itself, after some trial and error I found the solution for Error 15372.
Let us see how we can fix the error which is related to error 15372.
Error: 15372, Severity: 16, State: 1.
Failed to generate a user instance SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
The solution for this error is fairly simple.
Fix/Workaround/Solution:
For XP:
Delete the directory “c:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESSÂ “
For Vista:
Delete the directory “c:\Users\<username>\AppData\Local\Microsoft\Microsoft Sql Server Data\SQLEXPRESS”
Reboot the system.
Watch SQL in Sixty Seconds video to Resolve Connection Error. I did my best to explain how to solve this error in less than sixty seconds.
Let me know if you know any other way to solve this problem. I will be happy to learn how to solve this error if there are any other ways to solve it. You can follow me on Twitter.
Reference: Pinal Dave (https://blog.sqlauthority.com)
20 Comments. Leave new
Thanks for your this information. This will very help to resolve the issue if we tried to install again on a machine which content a installation of SQL Server and because of some reason it was crashed.
Question: What is this folder doing here in the first place and why does deleting it resolve this issue?? Just curious. I looked for a solution for a long time before I found your post here. It was very frustrating. One day my program is working, the next day when I open it, I cannot connect to my database instance because of this error. I would like to know where this problem occurred and why.
Thanks
Kat
Rebooting my system is what causes this problem (almost every time) — so if “reboot the system” is part of the proposed solution, I’m probably screwed.
I’ve wasted hours and hours (30m-2h per reboot) on this problem. Sometimes this “delete the directory” works, but not today.
I really wish I’d started this project, I’d have avoided MS crap altogether (LAMP vs. MS.NET+MSSQL), but at this point it’d take 200 hours to convert.
But then within 6 months, I’ll have wasted 50 just trying to get SQLExpress to reconnect after the weekly patch/reboot.
Hi Pinal Dave
From the one day to the next I got this error you are describing above. I tried your solution, and hey man! It worked! But it could actually be interesting to know why the error arose? Because as far as I know I didn’t do anything wrong before I started getting this error.
Anyway you solved my problem, therefore you are cool!
Regards
Rune in Copenhagen, Denmark
I deleted the dir reloaded and could connect, logged off, a few minutes later I tried to login again same error is now back again???? It seems one connection per reload is all that SQLEXPRESS can manage. give me UNIX and Oracle any day for any application. What is worse MS error messages more or less say “you had an error”, well get away, believe it or not I managed to figure that out for myself by the fact it didn’t work, I wish MS coders would put what the error was, doing what, using what, in the error message, might have a chance of sussing it out then.
Thanks! This worked perfectly!
Note: You may have to change the folder options so that you can see “hidden” files. I could not find my “Local Settings” folder until I changed the folder options. Also, I didn’t delete the directory. I just renamed the SQLEXPRESS file to SQLEXPRESS1 and the fix still worked.
Thanks again! You’re awesome!
Cemgates101
Hello;
I am on a Win2003 computer; I have same error – other posts indices this as solution howver the folder “c:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS ” is not on the computer.
any suggestions?
thanks much
I run vista. can’t find the folder SQL Server Express Data
it does not work for me..
I have vista business edition i also cannot find SQL Express
Bump – Windows 2008 Web Edition, and can’t find it either.
thanks…it works well for me toooo……
Thanks for the hack . The solution works as mentioned .I had this problem getting a default Database from LinqPad to work when connecting to Sqlexpress . Deleting the SqlExpress folder and restarting the service worked for me . Thanks again.
I encountered this after my ASP.NET dev application “crashed” because I deleted my session cookie but not the forms authorization cookie (I’m using the SQL Session provider).
All I could find were “that feature isn’t supported on SQL Express” answers to this error message until stumbling here.
Thank you, thank you, thank you, thank you, thank you!
I started getting this error this morning in a test deployment environment. I was using SQL Server Express 2008 and the error I was getting was
“Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.”
Unsure about what caused it, I followed the instructions in this post and in other post about deleting the “C:UsersUserNameAppDataLocalMicrosoftMicrosoft SQL Server DataSQLEXPRESS” directory, but to no avail.
What did the trick for me was to change the connection string from
“Data Source=.SQLExpress;Initial Catalog=DBFilePath;Integrated Security=SSPI;MultipleActiveResultSets=true”
to
“Data Source=.SQLExpress;Initial Catalog=DBName;Integrated Security=SSPI;MultipleActiveResultSets=true”
Everyday i am facing the same problem when i am opening my application.so is there any permanent solution ?
It works for Thank yu Soooooo Much
I appreciate your post because I had the same problem in SQL server .Finally,I got solution from your article.
I’m having the same issue as above. I can delete the folder or the contents within the folder, open my application which will generate the files and everything works fine. As soon as I reboot the computer the error comes back. Any suggestions on what could fix this?
Thanks!