I use Angel LMS and its built on SQL Server platform. I believe that in 2005, but not 100% sure of this.
In any case, maybe my pseudo-code will shed light on this answer. Also, single quotes should be used for strings, and the concatenation character should be +.
I need something to be done 2-5 times a day (the frequency has not yet been determined, but you understand the meaning). Here's the transaction block / pseudo code:
BEGIN TRANSACTION
BEGIN TRY
<select statement>
<update statement>
<delete statement>
<insert statement>
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
DECLARE @Msg NVARCHAR(MAX)
SELECT @Msg=ERROR_MESSAGE()
RAISERROR('Error Occured: %s', 20, 101,@msg) WITH LOG
END CATCH
My only access to the database is the text box in which sql commands are executed. I can create and delete tables, run transaction blocks, and obviously select / insert / update / delete. I cannot find any commands for creating an agent, but only steps if you are using Enterprise Manager or something like a GUI.
In addition, some reference on how to manipulate an agentβs synchronization schedule will help. When I test it, I want to configure it to run every fifteen minutes or so.
CHANGEEXEC dbo.sp_add_job @job_name = N'test 'returned an errorCould not find stored procedure dbo.sp_add_job.
source
share