sp_dropwebtask

Transact-SQL Reference

Transact-SQL Reference

sp_dropwebtask

Deletes a previously defined Web task.

Note  All Web tasks or jobs are categorized as Web Assistant in the Job Categories dialog box in SQL Server Enterprise Manager. For more information, see Defining Jobs.

Syntax

sp_dropwebtask { [ @procname = ] 'procname' | [ , @outputfile = ] 'outputfile' }

Arguments

[@procname =] 'procname'

Is the name of the procedure that defines the query for the task. procname is nvarchar(128), with a default of NULL.

[@outputfile =] 'outputfile'

Is the name of the HTML output file to be deleted. putputfile is nvarchar(255), with a default of NULL.

Return Code Values

0 (success) or a nonzero (failure)

Important  The return code values have changed from earlier versions of Microsoft® SQL Server™.

Result Sets

None

Remarks

sp_dropwebtask accepts either or both parameters. If outputfile is specified without procname, a placeholder value of NULL can be specified for procname, or the parameter name @procname can be used. These examples are equivalent:

sp_dropwebtask NULL,'filename.htm'
sp_dropwebtask @procname = 'filename.htm'

sp_dropwebtask must be executed in the database specified in the dbname parameter of sp_makewebtask.

Running sp_dropwebtask on a database of a version earlier than Microsoft SQL Server version 7.0 returns an error.

Permissions

Only the owner of the specified procedure can execute sp_dropwebtask to delete the Web task.

Examples

This example deletes a Web task with the output file C:\Web\Myfile.html and a procedure named MYHTML.

sp_dropwebtask 'MYHTML', 'C:\WEB\MYFILE.HTML'

See Also

sp_makewebtask

sp_runwebtask

System Stored Procedures