-
MSSQL 2012 logs DB corrupted
I have a server that crashed and i'm trying to move MSSQL database files onto another server. They have all reattached except for one. I'm getting the following error:
Microsoft SQL-DMO (ODBC SQLState: HY000)
Error 9004: An error occurred while processing the log for database....
I have NO backups & obviously need to mount this.
Any ideas?
-
Tried attach data file only?
-
Recommended actions for corrupt or suspect databases is a guide below and informative threads with bonus solution, which created for very complicated cases with .mdf files
http://answers.unity3d.com/questions...-database.html
http://www.sqlservercentral.com/Foru...448-266-1.aspx
https://www.openfiletool.com/mdfopen.html MDF Open File Tool
Solution for this problem is quick and it is the following (Execute SQL in Given Order):
1. Connect to your database server using Microsoft SQL Server Management Studio
2. Execute the following SQL script in given order:
NOTE: replace [DatabaseName] with your database name
1. -- This query will rollback any transaction which is running on that database
2. -- and bring SQL Server database in a "single user" mode
3. ALTER DATABASE MicrosoftDynamicsAX SET SINGLE_USER WITH ROLLBACK IMMEDIATE
4.
5. -- Marking database READ_ONLY, disable logging,
6. -- and limiting access only to members of the sysadmin fixed server role
7. ALTER DATABASE MicrosoftDynamicsAX SET EMERGENCY
8.
9. -- Checks the logical and physical integrity of all the objects in the specified database
10. DBCC checkdb(MicrosoftDynamicsAX)
11.
12. -- In case of simple failure then we can use allow data loss option to recover Database
13.
14. -- DBCC CheckDB (MicrosoftDynamicsAX, REPAIR_ALLOW_DATA_LOSS)
15.
16. -- Set database accessibility to it's original state, allowing all logins
17. ALTER DATABASE MicrosoftDynamicsAX SET MULTI_USER
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|