BUG: Error 5105 if Disk Init Reuses vdevno

Last reviewed: April 29, 1997
Article ID: Q112589

The information in this article applies to:
  • Microsoft SQL Server version 4.2 for OS/2
  • Microsoft SQL Server, versions 4.2, 4.21, and 4.21a
BUG# OS/2: 1569 (4.2)
       NT:  436 (4.2)

SYMPTOMS

A device activation error may occur if a device is dropped, then a subsequent disk init incorrectly reuses the same vdevno. However, the 5105 error issued is misleading as to the true cause of the error.

The system administrator assigns each SQL Server device a virtual device number (vdevno) unique for that SQL Server. As noted in the remarks section of the DISK INIT command, vdevno's and physical file names are not reusable. If the SA drops a device and then attempts to initialize another device with the same vdevno, the disk init command will fail with a 5105 error:

   Device activation error.
   The physical file name '%.*s' may be incorrect.

The SQL Server errorlog will also have the following entry:

  kernel  udactivate: vdn X already active

The physical file created by the failed disk init will exist on the disk, but the device will not exist in SQL Server.

For example, the second disk init in the following script will fail:

   disk init name='test5105', physname='c:\test5105.dat',
             vdevno=5, size=512
   go
   sp_dropdevice test5105
   go
   disk init name='next5105', physname='c:\next5105.dat',
             vdevno=5, size=512
   go

After this script runs, both the files TEST5105.DAT and NEXT5105.DAT will exist in the c:\ directory.

With this error, it would be better for SQL Server to issue a 5104 message:

   Device number %ld already used.

WORKAROUND

Rerun the disk init command with a new vdevno and a new physical file name. If the SQL Server is shutdown and then restarted, the physical file that was created by the disk init, which failed with the error 5105, can be deleted manually, and the name respecified.

NOTE: After SQL Server has been stopped and restarted the vdevno can also be reused.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 4.2 for OS/2 and Microsoft SQL Server version 4.2. This problem does not occur in version 6.0.


Additional query words:
Keywords : kbbug4.20 kbbug4.21 kbbug4.21a kbother SSrvServer SSrvWinNT
Version : 4.2 | 4.2 4.21 4.21a
Platform : OS/2 WINDOWS
Issue type : kberrmsg


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 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.