BUG: ODS App. GP Fault when SQL Admin Runs Full DB Properties

Last reviewed: April 30, 1997
Article ID: Q119626

The information in this article applies to:

  - Microsoft SQL Server version 4.2
BUG# NT: 867 (4.2)

SYMPTOMS

An Open Data Services application will general protection fault (GP fault) with a stack overflow when a user selects Manage, Database, Properties, Full from the Database Management window in SQL Administrator.

CAUSE

When a user selects Manage, Database, Properties, Full from the Database Management window, SQL Administrator examines the allocation pages directly to determine exactly how much space is available in the database. Open Data Services was not intended to process this kind of request.

WORKAROUND

If a user needs to use the Full Database Properties function of SQL Administrator, the user must not connect though the ODS application, but should connect directly to the SQL Server. To prevent the ODS Application from having a GP fault, code must be added to check for the language event caused by this action.

In the language event handler, if a language event that looks like

   dbcc dbrepair(<dbname>,readpage,<page number>)

arrives, you should return an error to the client with srv_sendmessage indicating that the function is not supported, and then call srv_senddone with a status of SRV_DONE_FINAL and SRV_DONE_ERROR. For example:

   #define SRV_NOT_SUPPORTED   SRV_MAXERROR + 5 //as an example

   // Check to see if this is a command we cannot handle
   // First check for dbcc
   if (strstr(query, "dbcc") != (char *)NULL)
   {
     // now check to see if it is one of the problem commands
     if ((strstr(query, "readpage")  != (char *)NULL) ||
         (strstr(query, "writepage") != (char *)NULL) )
     {
       srv_sendmsg(srvproc, SRV_MSG_ERROR,
                   (DBINT) SRV_NOT_SUPPORTED,
                   (DBTINYINT) 16, (DBTINYINT) 1, NULL, 0, 0,
                   "Function not supported by this connection",
                    SRV_NULLTERM);
       srv_senddone(srvproc, SRV_DONE_FINAL | SRV_DONE_ERROR,
                   (DBUSMALLINT)0, (DBINT)0);
       return(SRV_CONTINUE);
     }
   }

STATUS

Microsoft has confirmed this to be a problem in Open Data Services version 4.2 for Windows NT. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: ODS access Windows NT
Keywords : kbbug4.20 kbprg kbtool SSrvODS SSrvSQL_Admin 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.