Error message: Error 1813: failed to open the new database 'dbname'. Create database will be terminated. Device activation error. The physical file name 'd: SQL servermssqldatadbname _ log. ldf' may be incorrect!
Solution:
1. Create a database with the same name
2. Stop the sqlserver service again (do not detach the database)
3. overwrite the new database with the data file of the original database.
4. Restart the sqlserver service.
5. When the enterprise controller is opened, there will be doubts. Ignore it and execute the following statement (pay attention to modifying the database name)
6. After completion, you can access the data in the database. At this time, the database itself generally has a problem. The solution is to use the database script to create a new database and then import the data through DTs.
Use mastergosp_configure 'Allow updates', 1 reconfigure with overridegoupdate sysdatabases set status = 32768 where name = 'mpbj 'gosp _ dboption 'mpbj ', 'single user ', 'true' godbcc checkdb ('mpbj ') goupdate sysdatabases set status = 28 where name = 'mpbj 'gosp _ configure 'mpbj', 0 reconfigure with overridego sp_dboption 'mpbj ', 'Single user', 'false' go
Replace the above mpbj with your own database name.