October 18, 2015 at 11:29 am
I have been running SQL 2014 Express for quite some time, I built a database with it and have used it in a pet project of mine in Visual Basic 2015. Recently I started my computer and attempted to run the program and received an error that said it couldn't find the SQL Server.
I ran SQL Server Management Studio and found that it also wouldn't connect to the Server. In running the diagnostics the results stated that my SQL Server Express file was corrupt and the bast recommendation was to un-install and re-install it. I did this, but now I can't reattach the database to the new installation.
Now, when I run SQL Server Management Studio it does connect to the Server, but when I attempt to attach the database I get this error:
"Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'D:\Data Files 092015\DVD_List.mdf'. (Microsoft SQL Server, Error: 5123)"
Its not like it's a newer version of the Server so what is the problem here?
It ain't over 'til it's over - Yogi Berra
October 18, 2015 at 12:00 pm
Quick question, is the new install running under the same credentials as the old one? Looks like a simple permission issue.
😎
October 19, 2015 at 2:47 am
First try run Management Studio as admin (right click shortcut, run as administrator)
If that doesn't work, then you need to grant the service account which SQL Express is running under full control to the folder with the data and log files.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 20, 2015 at 12:12 pm
Darndest thing, the next morning I turned on the computer and without thinking started the movie program and it ran without a hitch. I then went into SSMS and connected to the database again, without a hitch. Can't figure it out, but 'If it ain't broke, don't attempt to fix it" Thanks for the replies.
darby
It ain't over 'til it's over - Yogi Berra
October 20, 2015 at 12:19 pm
Blame Windows.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply