Hello
If I try to set a database online with:
ALTER DATABASE mydb SET online
this error occurs:
Msg 5171, Level 16, State 1, Line 1 E:\Data\mydb_log.ldf is not a primary database file. Msg 5171, Level 16, State 2, Line 1 E:\Data\mydb.mdf is not a primary database file. File activation failure. The physical file name "E:\Data\mydb.mdf" may be incorrect. Msg 945, Level 14, State 2, Line 1 Database 'mydb' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. Msg 5069, Level 16, State 1, Line 1 ALTER DATABASE statement failed.The path of ldf and mdf file is correct.
And if I delete the database "DROP DATABASE mydb" and attach the files, then it works..
Thanks for your help