PDA

View Full Version : SQL 2000 trên W2000 & XP



MThang
01-08-2005, 11:03
Bạn nào có thể giúp mình giải thích tại sao cùng 1 câu lênh trong QA mà trong SQL2000(Win XP) chạy ko sao mà khi chạy trên SQL2000(W2000 SP3) lại có lỗi:
Cau lệnh như sau
exec sp_addumpdevice 'DISK' ,'T','C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\T.bak'
alter database VatTuA29 set recovery Full
go
backup database VattuA29
to T
with
Description ='Backup database VatTuA29',
stats
go

Backup log VattuA29
to T
with
Description = 'Backup log VatTuA29',
stats
go


(1 row(s) affected)

'Disk' device added.
Server: Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'T'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Server: Msg 3201, Level 16, State 1, Line 2
Cannot open backup device 'T'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 2
BACKUP LOG is terminating abnormally.

Help me....

phatnq2003
02-08-2005, 15:45
Bạn nào có thể giúp mình giải thích tại sao cùng 1 câu lênh trong QA mà trong SQL2000(Win XP) chạy ko sao mà khi chạy trên SQL2000(W2000 SP3) lại có lỗi:
Cau lệnh như sau
exec sp_addumpdevice 'DISK' ,'T','C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\T.bak'
alter database VatTuA29 set recovery Full
go
backup database VattuA29
to T
with
Description ='Backup database VatTuA29',
stats
go

Backup log VattuA29
to T
with
Description = 'Backup log VatTuA29',
stats
go


(1 row(s) affected)

'Disk' device added.
Server: Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'T'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Server: Msg 3201, Level 16, State 1, Line 2
Cannot open backup device 'T'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 2
BACKUP LOG is terminating abnormally.

Help me....

Trong trường hợp này SQL báo lỗi là thiết bị sao lưu được đặt tên là T của bạn không thể mở hoặc đang ở chế độ off-line. Từ đó làm cho các lệnh sau của bạn không thực hiện được.

Bạn hãy coi lại cú pháp của thủ tục sp_addumpdevice trên SQL Server 2000 (SP3) xem có gì khác với bản thường không, bởi câu thông báo 'Disk' device added cho biết là một thiết bị có tên là 'Disk' được thêm vào chứ không phải là thiết bị kiểu Disk.
:yes: