Hi there,
I am new to dynamic SQL but have an urgent problem concerning a job that was created by someone who has since left the organisation. The job is scheduled to run every night but has been failing since the beginning of October. It consists of the script given below and I have no clue as to what the script is supposed to be doing. Could someone please explain to me line by line (if possible) what the script is doing. How can I figure out why it is falling over? Is there another way of writing the same script in a simple stored procedure that I can use?
Thank you very much for your help.
JCAD1
[blue]
DECLARE @ret int, @retMsg varchar(1024)
SET @retMsg = 'None'
Exec @ret = usp_DM_Stream_Process @iStreamName = 'TIARA',
@iProcessName = NULL,
@iReturnMsg = @retMsg OUTPUT
if @@ERROR <> 0 OR @ret<> 0
BEGIN
RAISERROR(@retMsg,16,1) WITH NOWAIT, SETERROR
END
[/blue]
I am new to dynamic SQL but have an urgent problem concerning a job that was created by someone who has since left the organisation. The job is scheduled to run every night but has been failing since the beginning of October. It consists of the script given below and I have no clue as to what the script is supposed to be doing. Could someone please explain to me line by line (if possible) what the script is doing. How can I figure out why it is falling over? Is there another way of writing the same script in a simple stored procedure that I can use?
Thank you very much for your help.
JCAD1
[blue]
DECLARE @ret int, @retMsg varchar(1024)
SET @retMsg = 'None'
Exec @ret = usp_DM_Stream_Process @iStreamName = 'TIARA',
@iProcessName = NULL,
@iReturnMsg = @retMsg OUTPUT
if @@ERROR <> 0 OR @ret<> 0
BEGIN
RAISERROR(@retMsg,16,1) WITH NOWAIT, SETERROR
END
[/blue]