none
attach database in sqlserver 2000

    Question

  • i am trying to attach an .mdf file located in the data file inside of the sqlserver folder inside of the program files folder.

    however its not working because sqlserver is unable to detect any files whatsoever inside the programs files folder.

    why is this occuring and how can it be resolved?

    thank you 

    Wednesday, June 12, 2013 9:00 PM

Answers

  • So, are there any mdf files in the Program Files folder? If yes, try putting them in a different folder and give read/write permissions to sql server service account.

    Regards, Dean Savović

    Thursday, June 13, 2013 11:17 PM
  • Hi,

    where ever your data file resides make sure your SQL server service account  has read/write permission on that folder ..you can also try specifically adding your account in security tab of the folder and giving rights...

    After doing this try u will succeed.

    As suggested by Dean you can try putting mdf file into folder where service acount has permission or create a folder in any drive and give full rights to SQL server service account on this folder move MDF file to this folder and try attaching it

    Do revert if u face issue.


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    Friday, June 14, 2013 6:41 AM

All replies

  • Are you trying to use Enterprise Manager?

    Why not just run sp_attach_db?


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Wednesday, June 12, 2013 9:39 PM
  • Check the permissions for the program files folder for the account under which SQL is running.

    Thanks & Regards RAJUKIRAN L Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers.

    Thursday, June 13, 2013 12:44 AM
  • thank you i will try your solution
    Thursday, June 13, 2013 7:40 PM
  • i am not sure there are any restrictions on the folder.Program Files Folder appears as an empty folder.As you know Program files folder cannot be empty when programs have been installed.I am not all knowing but this a complete surprise

    Thursday, June 13, 2013 7:46 PM
  • So, are there any mdf files in the Program Files folder? If yes, try putting them in a different folder and give read/write permissions to sql server service account.

    Regards, Dean Savović

    Thursday, June 13, 2013 11:17 PM
  • Hi,

    where ever your data file resides make sure your SQL server service account  has read/write permission on that folder ..you can also try specifically adding your account in security tab of the folder and giving rights...

    After doing this try u will succeed.

    As suggested by Dean you can try putting mdf file into folder where service acount has permission or create a folder in any drive and give full rights to SQL server service account on this folder move MDF file to this folder and try attaching it

    Do revert if u face issue.


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    Friday, June 14, 2013 6:41 AM