Добрый день комрады!
опишу проблему.
Был в отпуске очень долгое время.
Сам не профи по sql.
Есть базы 1с, каждую ночь делается проверка, бэкап, каждые 30 мин бэкап логов.
пришел с отпуска и меня ждет
1.бэкап больше месяца не делается. и все бэкапы куда то делись есть только за июнь месяц.
2. один из жестких дисков вышел из строя (рейд).
что было сделано
1. Заменил жестки диск.
2. бэкап выдает ошибку
System.Data.SqlClient.SqlError: Read on "F:\sql_bases\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\utpr.mdf" failed: 1(Неверная функция.) (Microsoft.SqlServer.Smo)
сделал проверку
ALTER DATABASE utpr
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
DBCC CHECKDB (N'utpr', REPAIR_REBUILD) WITH NO_INFOMSGS
GO
выдало
Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.
Msg 8966, Level 16, State 2, Line 2
Unable to read and latch page (1:10021752) with latch type SH. 1(Неверная функция.) failed.
CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.
Msg 2533, Level 16, State 1, Line 2
Table error: page (1:10021752) allocated to object ID 1140251167, index ID 1, partition ID 72057651761774592,
alloc unit ID 72057651788972032 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc
unit ID in its header.
The repair level on the DBCC statement caused this repair to be bypassed.
Msg 8976, Level 16, State 1, Line 2
Table error: Object ID 1140251167, index ID 1, partition ID 72057651761774592,
alloc unit ID 72057651788972032 (type In-row data). Page (1:10021752) was not seen in the scan although its parent
(1:10021196) and previous (1:10021751) refer to it. Check any previous errors.
Repairing this error requires other errors to be corrected first.
Msg 8978, Level 16, State 1, Line 2
Table error: Object ID 1140251167, index ID 1, partition ID 72057651761774592, alloc unit ID 72057651788972032
(type In-row data). Page (1:10021753) is missing a reference from previous page (1:10021752).
Possible chain linkage problem.
Repairing this error requires other errors to be corrected first.
CHECKDB found 0 allocation errors and 3 consistency errors in table '_AccRgED679' (object ID 1140251167).
CHECKDB found 0 allocation errors and 4 consistency errors in database 'utpr'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (utpr, repair_rebuild).
и вот здесь совершил кажется ошибку
RESTORE DATABASE utpr
PAGE = '1:10021752'
FROM DISK = 'D:\backup\utpr_backup_2016_06_09.bak'
WITH NORECOVERY
теперь база в RESTORING
Делаю RESTORE DATABASE utpr with recovery
Выдает
Msg 4303, Level 16, State 1, Line 1
The roll forward start point is now at log sequence number (LSN) 441647000002683000001. Additional roll forward past LSN 530810000598237900001 is required to complete the restore sequence.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Я так понимаю он просит лог после июньского бэкапа? а его у меня нет.
Теперь как вывести базу из RESTORINGа?
опишу проблему.
Был в отпуске очень долгое время.
Сам не профи по sql.
Есть базы 1с, каждую ночь делается проверка, бэкап, каждые 30 мин бэкап логов.
пришел с отпуска и меня ждет
1.бэкап больше месяца не делается. и все бэкапы куда то делись есть только за июнь месяц.
2. один из жестких дисков вышел из строя (рейд).
что было сделано
1. Заменил жестки диск.
2. бэкап выдает ошибку
System.Data.SqlClient.SqlError: Read on "F:\sql_bases\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\utpr.mdf" failed: 1(Неверная функция.) (Microsoft.SqlServer.Smo)
сделал проверку
ALTER DATABASE utpr
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
DBCC CHECKDB (N'utpr', REPAIR_REBUILD) WITH NO_INFOMSGS
GO
выдало
Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.
Msg 8966, Level 16, State 2, Line 2
Unable to read and latch page (1:10021752) with latch type SH. 1(Неверная функция.) failed.
CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.
Msg 2533, Level 16, State 1, Line 2
Table error: page (1:10021752) allocated to object ID 1140251167, index ID 1, partition ID 72057651761774592,
alloc unit ID 72057651788972032 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc
unit ID in its header.
The repair level on the DBCC statement caused this repair to be bypassed.
Msg 8976, Level 16, State 1, Line 2
Table error: Object ID 1140251167, index ID 1, partition ID 72057651761774592,
alloc unit ID 72057651788972032 (type In-row data). Page (1:10021752) was not seen in the scan although its parent
(1:10021196) and previous (1:10021751) refer to it. Check any previous errors.
Repairing this error requires other errors to be corrected first.
Msg 8978, Level 16, State 1, Line 2
Table error: Object ID 1140251167, index ID 1, partition ID 72057651761774592, alloc unit ID 72057651788972032
(type In-row data). Page (1:10021753) is missing a reference from previous page (1:10021752).
Possible chain linkage problem.
Repairing this error requires other errors to be corrected first.
CHECKDB found 0 allocation errors and 3 consistency errors in table '_AccRgED679' (object ID 1140251167).
CHECKDB found 0 allocation errors and 4 consistency errors in database 'utpr'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (utpr, repair_rebuild).
и вот здесь совершил кажется ошибку
RESTORE DATABASE utpr
PAGE = '1:10021752'
FROM DISK = 'D:\backup\utpr_backup_2016_06_09.bak'
WITH NORECOVERY
теперь база в RESTORING
Делаю RESTORE DATABASE utpr with recovery
Выдает
Msg 4303, Level 16, State 1, Line 1
The roll forward start point is now at log sequence number (LSN) 441647000002683000001. Additional roll forward past LSN 530810000598237900001 is required to complete the restore sequence.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Я так понимаю он просит лог после июньского бэкапа? а его у меня нет.
Теперь как вывести базу из RESTORINGа?