remove job

来源:互联网 发布:java ee api文档下载 编辑:程序博客网 时间:2024/06/07 16:44

USE [MES_TRANS_MCD]
GO
/****** Object:  StoredProcedure [maint].[RemoveJob]    Script Date: 2014/8/5 10:36:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER Procedure [maint].[RemoveJob]
      @JobName varchar(10),
   @PN varchar(20)

as
BEGIN

SET NOCOUNT ON

 Declare @JobID as varchar(10)
 set @jobID=''
 select @jobname=jobid from dbo.tbl_oraclejob where status='released' and jobid=@jobname

 if @jobname<>''
 begin
 begin try

 begin transaction

 update tbl_OracleJob set undone='True'
 where jobid=@JobName

 commit transaction

 end try
 begin catch
 end catch
 end

 END

 

0 0