After attach, db's read only | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

After attach, db’s read only

Hi.
After attaching db in 2-node cluster environment, the db is read only and can not be brought to read-write. Errors with 5150 error. the error was similar to this: Server:Msg 5105, Level 16, State 10, Line 1
Device activation error. The physical file name ‘FullPathToLogFileLogFileName.ldf’ may be incorrect.
Server: Msg 945, Level 14, State 1, Line 1
Database ‘twologtest’ cannot be opened because some of the files could not be activated.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database ‘twologtest’. CREATE DATABASE is aborted.
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database ‘twologtest’. CREATE DATABASE is aborted.
Device activation error. The physical file name ‘FullPathToFirstLogFileFirstLogFileName.ldf’ may be incorrect.
Device activation error. The physical file name ‘FullPathToSecondLogFileSecondLogFileName.ldf’ may be incorrect.
Any suggestions?

Check file permissions and read only flag on each of the files is about all I can suggest… Cheers
Twan
Try to use SP_ATTACH_SINGLE_FILE_DB in order to create the fresh log file for this database. Also post the statement you’ve used to attach. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
The command used was sp_attach_db DBNAME, ‘path_to_mdf’,’path_to_ldf’ I had to go back to the original standard sql server. I performed an attach using the same datafiles and all is well. Thanks for your assistance.
]]>