sp_attach_single_file_db failed due to a corrupted log file
hello have problem if can help
exec sp_attach_single_file_db @dbname = 'world',
@physname = 'c:\program files\microsoft sql server\mssql.1\mssql\data\world.mdf'
msg 1813, level 16, state 2, line 1
could not open new database 'world'. create database aborted.
msg 3456, level 21, state 1, line 1
could not redo log record (9767813:109:10), transaction id (1:1182802845), on page (1:27846), database 'world' (database id 5). page: lsn = (9767810:70:66), type = 2. log: opcode = 3, context 19, prevpagelsn: (9767812:47:11). restore backup of database, or repair database.
msg 3313, level 21, state 2, line 1
during redoing of logged operation in database 'world', error occurred @ log record id (9767813:109:10). typically, specific failure logged error in windows event log service. restore database full backup, or repair database.
thanks
exec sp_attach_single_file_db @dbname = 'world',
@physname = 'c:\program files\microsoft sql server\mssql.1\mssql\data\world.mdf'
msg 1813, level 16, state 2, line 1
could not open new database 'world'. create database aborted.
msg 3456, level 21, state 1, line 1
could not redo log record (9767813:109:10), transaction id (1:1182802845), on page (1:27846), database 'world' (database id 5). page: lsn = (9767810:70:66), type = 2. log: opcode = 3, context 19, prevpagelsn: (9767812:47:11). restore backup of database, or repair database.
msg 3313, level 21, state 2, line 1
during redoing of logged operation in database 'world', error occurred @ log record id (9767813:109:10). typically, specific failure logged error in windows event log service. restore database full backup, or repair database.
thanks
i made it, simple tho'
here it is did
1) make new db name
2) stop sql server
3) rename/delete new .mdf , replace old .mdf (the 1 u want save)
4) start sql
5) sql suspect u alter db in single mode , emergency
alter database <db> set emergency & alter database <db> set single_mode
6) dbcc checkdb (<db>, repair_allow_data_loss)
when finish u make db multi user again , u're done
SQL Server > SQL Server Database Engine
Comments
Post a Comment