FIX: Sp_droplogin Error 14248 if ANSI_NULL_DFLT_ON

ID: Q135402

The information in this article applies to: BUG#: 10986 (6.00)

SYMPTOMS

When you try to execute the system stored procedure sp_droplogin on Microsoft SQL Server version 6.0 and enable SET ANSI_NULL_DFLT_ON, the following error message appears:

   Error: 14248
   Message: "This login is the owner of 11 Task(s).  You must drop
             or re-assign these Tasks before the login can be dropped."

The Microsoft SQL Server ODBC driver versions 2.50.0121 or later always sets ANSI_NULL_DFLT_ON to ON when running against SQL Server 6.0. Therefore, any attempt to execute sp_droplogin from an ODBC session using the driver results in the following:

   szSqlState = "37000"
   pfNativeError = 14248
   pcbErrorMsg = 159
   szErrorMsg="[Microsoft][ODBC SQL Server Driver][SQL Server] This
   login is the owner of 11 Task(s).  You must drop or re-assign these
   Tasks before the login can be dropped."

WORKAROUND

DB-Library clients such as ISQL/w or Enterprise Manager sets the following:

   SET ANSI_NULL_DFLT_ON OFF
   EXEC sp_droplogin...
   SET ANSI_NULL_DFLT_ON ON

It is recommended that sites do not use ODBC to issue sp_droplogin against SQL Server 6.0.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.0. This problem has been corrected in SQL Server version 6.5. Contact your primary support provider for more information.

Additional query words: SQL Server ODBC 16-bit

Keywords          : kbprg SSrvISQL SSrvTran_SQL kbbug6.00 
Version           : 2.5.0121 6.0
Platform          : WINDOWS

Last Reviewed: May 2, 1997