Create a Database to other drive in windows 7 and can not use it?


  • Hi,

    When I create a database in (for example) Drive E and Detach it and moving it to drive F and attached it gave me an error(Pic 4).When I copy it to Drive Windows(C),gave a message(Pic 2).

    in Drive C I can Attach database success fully,but in this time the database was ReadOnly And I can't change any things of database(Pic 3).

    when I change readonly from properties again give an error(Pic 5).

    This link of Pictures


    Tuesday, September 07, 2010 11:56 AM

All replies

  • This looks like a permissions problem. Under which account do your SQL Services run? Make sure that this account has full rights on the folder you place your data- and logfiles in.


    Tom Van Zele | Blog | Twitter | LinkedIn
    Tuesday, September 07, 2010 12:05 PM
  • Please right click on the SSMS and then Run As Administrator (I know  you are) but perfrom thosen operation again and see if  you have any errors.
    Best Regards, Uri Dimant SQL Server MVP
    Tuesday, September 07, 2010 12:08 PM
  • You might want to give provide explicit rights on the folder for the SQL Service account which stores the database files before attaching them. And do you get the same error when you execute the command sp_attach_db and try to attach the database. The following article talks about how permissions on the files differ if the account performing the detach of the database can be impersonated or not:

    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog:
    Twitter: @banerjeeamit
    SQL Server FAQ Blog on MSDN:
    Tuesday, September 07, 2010 2:23 PM