BUG: Dump to Tape with Init Ignored in Stored Procedure

Last reviewed: April 30, 1997
Article ID: Q123985

The information in this article applies to:
  • Microsoft SQL Server version 4.2
BUG# NT: 669 (4.2)

SYMPTOMS

When using the DUMP DATABASE command within a stored procedure, the option to initialize the tape will not be respected. In this scenario, all dumps made to tape will actually be appended to the tape.

WORKAROUND

It is possible to use the stored procedure xp_cmdshell and isql to perform the same task within a stored procedure. An example stored procedure is as follows:

   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.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 4.2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: Windows NT DUMP DATABASE TAPE
Keywords : kbbug4.20 kbusage SSrvStProc SSrvWinNT
Version : 4.2
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.