SQL Server ghi l?i m?t thao tc sao lu trong b?ng l?ch s? backupset khi b?n s? d?ng VSS ? sao lu cc t?p tin trn m?t ia

D?ch tiu ? D?ch tiu ?
ID c?a bi: 951288 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

? Trang ny

Tri?u ch?ng

Xem xt k?ch b?n sau y. B?n ci ?t chuyn bi?t Microsoft SQL Server trn m?t kh?i l?ng. B?n s? d?ng m?t ?ng d?ng b?n ghi d?ch v? Sao chp D? ph?ng (VSS) ? sao lu cc t?p trn ia. Trong tr?ng h?p ny, SQL Server ghi l?i m?t thao tc sao lu trong b?ng l?ch s? backupset. V?n ? ny x?y ra ngay c? khi b?n ? khng th?c s? tr? l?i ln t?p tin b? my c s? d? li?u SQL Server.

Lu ? NTBackup.exe Ti?n ch l m?t ?ng d?ng VSS.

Nguyn nhn

V?n ? ny x?y ra b?i v? VSS g?i cc SQLWriter b?n ghi d?ch v? ho?c cc nh vn Microsoft SQL my ch? my tnh ? bn ?ng c (MSDE).

T?nh tr?ng

Microsoft ? xc nh?n r?ng y l m?t v?n ? trong s?n ph?m c?a Microsoft ?c li?t k trong ph?n "p d?ng cho".

Thng tin thm

M t? c?a nh vn MSDE v b?n ghi d?ch v? SQLWriter

Cc nh vn MSDE n?m trong khun kh? VSS trong Windows XP v trong Windows Server 2003. VSS s? d?ng nh vn MSDE ? sao lu b? my c s? d? li?u SQL Server 2000. b?n ghi d?ch v? SQLWriter ci ?t chuyn bi?t khi b?n ci ?t chuyn bi?t SQL Server 2005. VSS s? d?ng cc b?n ghi d?ch v? SQLWriter ? sao lu c? b? my c s? d? li?u SQL Server 2005 v SQL Server 2000 b? my c s? d? li?u.

Lm th? no VSS th?c hi?n m?t thao tc sao lu

Khi VSS th?c hi?n m?t thao tc sao lu trn m?t ia, VSS cu?c g?i T?t c? cc nh vn c d? li?u trn ia. i?u ny lm cho ch?c ch?n r?ng ?ng g?i lu h?p l?. Khi VSS g?i b?n ghi d?ch v? SQLWriter ho?c cc nh vn MSDE, cc SQLWriter b?n ghi d?ch v? ho?c cc nh vn MSDE chn m?t h? s vo backupset b?ng l?ch s?. i?u ny H? s cho th?y r?ng m?t thao tc sao lu th?c hi?n. Tuy nhin, cc b?n ghi d?ch v? SQLWriter ho?c cc nh vn MSDE khng th? xc ?nh cho d cc t?p tin VSS sao lu b? my c s? d? li?u t?p tin.

Bi?n php ph?ng ng?a ? c n?u b?n s? d?ng cc m?c trong b?ng l?ch s? backupset cho ph?c h?i d? li?u

N?u b?n mu?n s? d?ng cc m?c trong b?ng l?ch s? backupset cho d? li?u ph?c h?i, b?n ph?i xc minh r?ng cc m?c ?i di?n cho sao lu b? my c s? d? li?u th?c t? ho?t ?ng.

Lm th? no ? xc minh r?ng m?c ?i di?n cho m?t thao tc sao lu b? my c s? d? li?u th?c t?

? lm i?u ny, h?y ch?y cc tuyn b? sau:
USE msdb
GO

SELECT server_name, database_name, backup_start_date, is_snapshot, database_backup_lsn
FROM backupset
Trong , nh?n th?y c?t database_backup_lsn v is_snapshot c?t. M?t m?c nh?p ?i di?n cho m?t sao lu b? my c s? d? li?u th?c t? ho?t ?ng c ?c i?m nh sau:
  • Gi tr? c?a cc c?t database_backup_lsn khng ph?i l 0.
  • Gi tr? is_snapshot c?t l 0.

Xc minh t?p sao lu ? khng c l?i

? lm i?u ny, h?y ch?y cc tuyn b? sau:

WITH backupInfo AS( SELECT database_name AS [DatabaseName], 
name AS [BackupName], is_damaged AS [BackupStatus],
backup_start_date AS [backupDate],
ROW_NUMBER() OVER(PARTITION BY database_name 
ORDER BY backup_start_date DESC) AS BackupIDForDB 
FROM msdb..backupset) SELECT DatabaseName 
FROM backupinfo WHERE BackupIDForDB = 1 and BackupStatus=1 

N?u cc truy v?n ny tr? l?i b?t k? k?t qu?, n c ngh?a l b?n khng c sao lu b? my c s? d? li?u t?t sau ngy bo co. Chng ti ? ngh? r?ng b?n
th?c hi?n m?t sao lu b? my c s? d? li?u ?y ? cng s?m cng t?t v xc minh r?ng ?ng g?i lu b? my c s? d? li?u ?y ? ?c s?ch s?.

B?t ?ng s?n is_damaged
B?ng backupset, b? my c s? d? li?u msdb ch?a m?t hng cho m?i t?p sao lu. Cc ti s?n is_damaged trong b?ng backupset ch? ra cho d cc thi?t h?i ?n b? my c s? d? li?u ? ?c pht hi?n khi sao lu ?c t?o ra. Do , sao lu c th? b? h h?ng v khng restorable.

Thu g?n b?ng nyBung r?ng b?ng ny
Ph?n m?m quy t?cTiu ? quy t?cM t? quy t?cPhin b?n s?n ph?m ch?ng l?i cc quy t?c ?c nh gi
H? th?ng Trung tm c? v?nSQL Server b? my c s? d? li?u Backupset ?c nh d?u ki?m l DamagedTrong SQL Server ny c? v?n tr?ng h?p pht hi?n s? hi?n di?n c?a m?t ho?c nhi?u backupset nh d?u ki?m l "b? h h?ng" trong MSDB b? my c s? d? li?u. i?u ny c ngh?a r?ng cc t?p tin sao lu b? h h?i v v? c b?n l b? my c s? d? li?u ?c ti?p xc v sao lu c kh? nng khng-restorable. Xem l?i cc ph?n thng tin thu th?p v ?m b?o r?ng m?t ?ng g?i lu t?t sau l c s?n cho b? my c s? d? li?u trong cu h?i. Tham kh?o bi KB cho bi?t thm chi ti?t.SQL Server 2008
SQL Server 2008 R2
SQL Server 2012


Tham kh?o

? bi?t thm chi ti?t v? cc b?n ghi d?ch v? nh vn SQL, truy c?p vo cc web site Microsoft Developer Network (MSDN) sau y:
http://msdn2.Microsoft.com/en-US/Library/ms175536.aspx
Cho bi?t thm thng tin v? b?ng l?ch s? backupset, truy c?p vo MSDN sau y Trang web:
http://msdn2.Microsoft.com/en-US/Library/ms186299.aspx

Thu?c tnh

ID c?a bi: 951288 - L?n xem xt sau cng: 28 Thang Ba 2013 - Xem xt l?i: 1.0
p d?ng
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2000 Workgroup Edition
  • Microsoft SQL Server 2000 Developer Edition
  • Microsoft SQL Server 2000 Enterprise Edition
T? kha:
kbexpertiseadvanced kbtshoot kbprb kbmt KB951288 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny: 951288

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com