Read Only file ?

guillaume.jay's Avatar


08 Aug, 2014 11:18 PM


I'm creating a folder C:\c3, and download my database in it.
I then attach my mdf file using :
sqlcmd -S ".\SQL2008R2SP2" -U sa -P Password12! -Q "CREATE DATABASE [c3-test] ON PRIMARY (FILENAME = 'C:\c3\c3-test.mdf') , ( FILENAME='c:\c3\c3-test.ldf') FOR ATTACH_REBUILD_LOG "
and it works.. I'm running my texts, except : that all tests writing to the db fails.
Do you think there's something to do ?

  1. Support Staff 1 Posted by Feodor Fitsner on 08 Aug, 2014 11:31 PM

    Feodor Fitsner's Avatar

    My guess would be there is not enough permissions. SQL Server service runs under "NETWORK SERVICE". Try adding it to ACLs of c:\c3 folder (with icacls utility).

  2. 2 Posted by guillaume.jay on 09 Aug, 2014 02:31 PM

    guillaume.jay's Avatar

    It worked, thanks !

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:47 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac