Hello! My question is as follows.

The following was installed on the computer: SQL Server Management Studio Express Microsoft SQL Server 2005 environment. There was no possibility to make BackUp, therefore, physically only the database files with the .mdf extension were saved

So when you reinstall windows and SQL Server Management Studio Express Microsoft SQL Server 2005, you need to return the database to work. The bottom line is that byzu does not work, SQL Server Management Studio Express gives an error:

Failed to update database "test" because the database is read-only (Error: 3906).

what to do in this situation?

Closed due to the fact that off-topic participants PashaPash , Dmitriy Simushev , Yura Ivanov , Visman , Abyx Sep 5 '15 at 9:08 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - PashaPash, Dmitriy Simushev, Yura Ivanov, Visman, Abyx
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Did you do detach before this? Now in the list of server databases there is a database with that name? - renegator
  • nothing was done programmatically! the database files were simply copied physically to the files in the repository, after that the reinstallation of the windows was also saved and the system databases were those that lie on the server: programm files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \ Template Data with the names: master.mdf model .mdf, etc. - johndeff
  • Hm in mind it was necessary at least to disconnect. Once the system databases are simply copied, then apparently there is some kind of test database entry in the list? I suggest to remove it and then attach - renegator
  • sorry but i don't understand the question - johndeff
  • Connect to the server, see the list of databases on it. Is there a test in this list that you want to restore? - renegator


2 answers 2

Decision:

- Changed Network Service to Local System

- I put the files of my database in the folder "program files" to "SQL server" ...... "data", then everything was fine ..

    Click the right mouse button on this base. Select properties . Go to the options tab. The read only position switch is located at the bottom of the list of options in the State block.

    • again gives an error, "It is impossible to display this window, the database is in recovery mode, wait until the process is completed." At the initial connection of the database, the error "Filed to update database" has already been generated because the database i read-only (Error: 3906). - johndeff