FIX: DUMP DATABASE w/ Variable Device Name in SP May Cause AV

Last reviewed: April 30, 1997
Article ID: Q133039

The information in this article applies to:
  • Microsoft SQL Server, version 6.0
BUG# NT: 10328 (6.00)

SYMPTOMS

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.

WORKAROUND

When used outside of a stored procedure the commands work fine. Hard coding a device file path also works correctly.

STATUS

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.

MORE INFORMATION

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 : kbbug6.00 kbfix6.00.sp1 kbother SSrvProg SSrvWinNT
Version : 6.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.