Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Cannot Attach SQL2005 DB in SQL2008

Author  Topic 

kashif27
Starting Member

7 Posts

Posted - 2009-07-16 : 03:59:45
Hi . . . . .

I created few databases in SQL Server 2005, detached them. I uninstalled SQL Server 2005, Installed SQL Server 2008 and now when I try to attach the DBs that were created in SQL Server 2005 I gte the following message.


TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
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 '......abc.mdf'. (Microsoft SQL Server, Error: 5123)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=5123&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------




http://www.KashifUmar.com/

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-07-16 : 13:47:34
Sounds like you've got permission issues on the files.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

kashif27
Starting Member

7 Posts

Posted - 2009-07-17 : 01:08:21
Hi . . . . .

I went to the folder where I have placed my SQL2005 DBs, right click the folder, select properties, click Security Tab, click Add->Advanced->Find Now. It showed me the list of users, I added the following user

SQLServerMSSQLUser$XX$MSSQLSERVER

where XX is my machine name.

I gave the user full rights and my problem is solved.

http://www.KashifUmar.com/
Go to Top of Page
   

- Advertisement -