Zuvor habe ich in ServerFault eine Frage zum Sichern und Wiederherstellen einer SQL Server 2008-Dateigruppe gestellt.
Als ich heute versuchte, RESTORE
eines dieser FILEGROUP
Backups zu erstellen, wurde folgende Fehlermeldung angezeigt:
Processed 1895080 pages for database 'XWing', file 'XWing' on file 1.
Processed 4 pages for database 'XWing', file 'XWing_log' on file 1.
The database cannot be recovered because the log was not restored.
The database cannot be recovered because the log was not restored.
The roll forward start point is now at log sequence number (LSN) 221218000000010400001. Additional roll forward past LSN 221218000000010400001 is required to complete the restore sequence.
This RESTORE statement successfully performed some actions, but the database could not be brought online because one or more RESTORE steps are needed. Previous messages indicate reasons why recovery cannot occur at this point.
RESTORE DATABASE ... FILE=<name> successfully processed 1895084 pages in 69.504 seconds (213.014 MB/sec).
Ich habe den folgenden SQL-Code verwendet ...
alter Database [XWing] SET SINGLE_USER With ROLLBACK IMMEDIATE
restore database [XWing] filegroup = 'PRIMARY'
FROM DISK = N'C:\Temp\XWing Manual Full Primary Filegroup.bak'
with
MOVE N'XWing' TO N'D:\XWing.mdf',
MOVE N'XWing_log' TO N'L:\XWing_Log.ldf',
replace, recovery
Ich gehe also davon aus, dass die Datenbank nicht korrekt gesichert wurde?
Dies ist das Skript, mit dem ich das Backup erstellt habe PRIMARY FILEGROUP
BACKUP DATABASE [XWing] FILEGROUP = N'PRIMARY'
TO DISK = N'F:\Sql DB Backups\XWing Manual Full Primary Filegroup.bak' WITH NOFORMAT, INIT,
NAME = N'XWing-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'XWing' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'XWing' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''XWing'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'F:\Sql DB Backups\XWing Manual Full Primary Filegroup.bak' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
Fragen
- Ist die Wiederherstellungssyntax korrekt?
- Was ist mit meiner Backup-Syntax?
Prost!
PRIMARY
? Dateigruppe ich bin nicht sicher , was ich brauche die Protokolle auch einen Backup zu tun (Syntax weist) und sie dann in die db wiederherstellen ... ??