Article ID: 123985
Article Last Modified on 12/16/1999
use master
go
if exists(select * from sysobjects
where type = 'P' and name = 'dump_pubs')
begin
drop proc dump_pubs
end
go
create proc dump_pubs as
begin
master..xp_cmdshell 'isql -Usa -P
-Q"dump database pubs to tapedump with init,nounload" ',
no_output
end
go
If the stored procedure is referenced from another database other than
master 'master..' must be used. Otherwise the above store procedure will
dump the database to the designated tape dump device, initialize the tape,
and not eject the tape. The xp_cmdshell option 'no_output' prevents results
of the option from being returned to the client.
Additional query words: Windows NT DUMP DATABASE TAPE
Keywords: kbusage KB123985