The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
Please vote in the Forum Structure Poll. Polling will close at 2PM EST on January 21, 2025.

Attaching sample db in SQL 2008

Dr. FrenchensteinDr. Frenchenstein Registered User regular
edited May 2010 in Help / Advice Forum
So i'm training for my SQL DB Development cert, bought a training kit. SQL installs just fine, and the kit comes with 3 sample databases that all the excercises take place in. I copy those to the file in my C drive as the instructions state, open an instance of SQL, and go to attach the 3 db's. 2 work fine, but i get an error with the other. text is as follows

TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'MYNAME'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1015+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents". Operating system error -2147024891: "0x80070005(Access is denied.)".
A file activation error occurred. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Could not open new database 'AdventureWorks2008'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 5120)

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

BUTTONS:

OK


The link goes nowhere, i tried to email the techsupport in the book, and no luck so far (it happened yesterday afternoon). Has anyone experienced this? could the file simply be corrupted? I've tried deleting and recopying, putting the file in another place, changing the security on both folders. I have plenty of room on my harddrive. No matter what i am getting this error. I'm just at a loss. has anyone had this issue before?

Dr. Frenchenstein on

Posts

  • Moses555Moses555 Registered User regular
    edited May 2010
    How are you trying to attach the databases? Also, try making sure the file isn't read only or something.

    Moses555 on
    Bear down, Chicago Bears!
  • Dr. FrenchensteinDr. Frenchenstein Registered User regular
    edited May 2010
    in the object explorer i right click "databases" and select "attach" then i browse for the mdf file i want, select it, then click ok. Then i get the error.

    It is not read only. the server is set to have full access to it.

    I don't know why it's trying to access the folder "documents" though, it is a folder in the same "DATA" folder, to make sure i gave it full access to that as well. still no go.

    Dr. Frenchenstein on
  • PirateJonPirateJon Registered User regular
    edited May 2010
    This same error got a response on the MSFT forums. Have you tried the steps listed?
    http://social.microsoft.com/Forums/en/CertGeneral/thread/bb90f78e-781e-456d-9e5c-f4a2ac9ce05d

    PirateJon on
    all perfectionists are mediocre in their own eyes
Sign In or Register to comment.