BUG: Startup Stored Procedure Using sp_OACreate Fails (196218)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q196218
BUG #: 18401 (SQLBUG_65)

SYMPTOMS

A startup stored procedure that uses sp_OACreate fails with the following error returned to the error log:
Stored function 'sp_OACreate' in the library 'odsole32.dll' generated
access violation; SQL Server is terminating process 10

WORKAROUND

To work around this problem, try either of the following:
  • Do not use the startup stored procedure; an alternative is to use a scheduled task to run the procedure at an appropriate time.

    -or-
  • Use xp_cmdshell within a startup stored procedure to run the required stored procedure using ISQL, as in the following example:
          CREATE PROC TheStartUp AS
             execute master.dbo.xp_cmdshell 'isql /E /Q"execute <sp_name>" '
          go
    
          sp_makestartup TheStartUp
          go
    
    						

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5.

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbBug KB196218