April 23, 2009 at 3:50 am
Hi not sure this is exactly the right place but please help if possible.#
I am running SQL 2008 under vista/win 7
Created database as above, changed computer name and that where things started to go wrong.
Could not view the relationships diagram, so after trying things reinstalled SQL server and SP1.
Now I find I cannot attach - it gives me a "Unable to open the physical file "C:\Data\Dev\CMS\3.0.0.0\db\DATA\CMS.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120"
Which seems like a read access thing, but I am getting nowhere with it can any body advise please?
thanks!
April 23, 2009 at 6:02 am
Is SQL running correctly now? I wasn't able to tell based on what you've written. By this I mean, can you create a new database and have everything work as expected?
If that's not the case, then I would start with that - make sure that part of SQL Server is running correctly.
Then, I would look at possible reasons why you cannot attach the database. From the error message you've given, it sounds like it cannot see the file.
April 23, 2009 at 6:31 am
I hope error 5 is related to permission and security.Check whether u have proper permissions
April 23, 2009 at 6:35 am
What exactly is your problem??
Are you trying to attach a SQL Server 2008 .mdf file to SQL Server 2008.am i right?
April 23, 2009 at 6:51 am
What you mean by this actually.......make it clear
[font="Comic Sans MS"]+++BLADE+++[/font]:cool:
April 23, 2009 at 7:01 am
Hi folks thanks for prompt reply, yes SQL server is running fine because i can see the default databases already created and I think it is a permissions error.
I am running windows 7. My account has sysadmin role, I am a local admin and the directoru containing the .mdf is ok permission wise.
the SLQ server service is OK.
Strange.
April 23, 2009 at 7:05 am
Yes Ratkeesh I created a SQL 2008 database using sql 2008.
then I changed the computer name not realising this would impact SQL server.
then it starts to go wrong: I could launch sql server and connect to db but I could not view the relationships view.
tried various things - in the end reinstalled sql server 2008 and SP1
Then - could not connect to afore created mdf file.
got to permissions ....
April 23, 2009 at 7:21 am
check the permission of that particular file...it will be in a read only state ..
April 23, 2009 at 7:51 am
File permission is fine
April 23, 2009 at 7:57 am
I would make sure that your SQL service account has the necessary rights to the file (as opposed to your domain account).
Can you post the command you're using to attach the database?
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply