Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.12 KB

sp-oastop-transact-sql.md

File metadata and controls

60 lines (43 loc) · 2.12 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_OAStop (Transact-SQL)
sp_OAStop stops the server-wide OLE Automation stored procedure execution environment.
markingmyname
maghan
randolphwest
08/21/2024
sql
system-objects
reference
sp_OAStop
sp_OAStop_TSQL
sp_OAStop
TSQL

sp_OAStop (Transact-SQL)

[!INCLUDE SQL Server]

Stops the server-wide OLE Automation stored procedure execution environment.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_OAStop
[ ; ]

Return code values

0 (success) or a nonzero number (failure) that is the integer value of the HRESULT returned by the OLE Automation object.

For more information about HRESULT return codes, see OLE automation return codes and error information.

Remarks

A single execution environment is shared by all clients that use OLE Automation stored procedures. If one client calls sp_OAStop, the shared execution environment is stopped for all clients. After the execution environment is stopped, any call to sp_OACreate restarts the execution environment.

Permissions

Requires membership in the sysadmin fixed server role or execute permission directly on this stored procedure. The Ole Automation Procedures server configuration option must be enabled to use any system procedure related to OLE Automation.

Examples

The following example stops the shared OLE Automation execution environment.

EXEC sp_OAStop;
GO

Related content