ID: Q133039
DUMP DATABASE to a device that uses the format
dump_device = @dump_device_namevar
causes a handled access violation if used within a stored procedure.
When used outside of a stored procedure the commands work fine. Hard coding a device file path also works correctly.
Microsoft has confirmed this to be a problem in SQL Server version 6.0. This problem was corrected in Service Pack 1 for SQL Server version 6.0. For more information, contact your primary support provider.
The following commands demonstrate the problem:
drop procedure sp_dumpdb
go
create procedure sp_dumpdb
as
declare @lc_dumpdev char(30)
select @lc_dumpdev="d:\pubs.dmp"
dump database pubs to disk=@lc_dumpdev
if @@error=0
return(0)
else
return(1)
go
sp_dumpdb
go
Additional query words: sql6 dump database
Keywords : kbother SSrvProg kbbug6.00 kbfix6.00.sp1 SSrvWinNT
Version : 6.0
Platform : WINDOWS
Last Reviewed: May 1, 1997