SQL Server agent job recreated - sql-server

I stuck in a issue from last 6 months. I had a SQL Servre job SALES lOAD which is created with a T-SQL script. This job is being recreated every month automatically. How we know which job affected or recreated my SALES lOAD load every month. I checked each and every job but no job is affecting this job

You may check if there is any process scheduled to run every month (BAT file,Task scheduler job, etc...)

Related

SQL Server: Receive notifications when Job Schedule is completed

We have a Job Schedule with 5 steps that runs daily overnight and we want to know whether it succeded or not as well as how many rows were updated and inserted.
Is there a way we can do this?

SSMS - SSRS job returns after deletion

we have several SSRS reports that we want to run at night.
Every time we create a subscription, SSRS creates a job with its own schedule and one step in the job
for example:
exec [ReportServer].dbo.AddEvent #EventType='TimedSubscription', #EventData='ffe3a82d-367a-424c-8446-d2da0ce10666'
We have 5 reports. Therefore, there are 5 jobs. Instead of executing every single job, we want to combine all jobs into one. Meaning, one job with 5 steps. Therefore, we copy out the step command of each job (the above 'exec' snippet) and add it as an additional step to the main job.
Once this is done, we delete all 5 SSRS generated jobs.
The problem now is that once we restart the ReportServer services or the actual time of the original subscription schedule hits (default: 2am), all these 5 jobs are shown again in SSMS (SQL Server Management Studio). We can delete them but the next day, they are back again.
Any idea? We never had the problem in SQL 2008 R2 but with only with SQL 2014.

trigger SSRS report when finishing a SSIS job

A number of SSIS packages have been deployed to the SSI-catalog and are scheduled through SQL Agent jobs.
On the SSRS-server I have created a report that gives me insight in the executions of all SSIS-packages run on the SSIS-server.
I have created a job (Send me report) that, when executed, sends me this report.
I know how to create a jobstep that fires this SQL Agent Job.
I add this jobstep to all the jobs that execute SSIS packages.
However, I am not the only one scheduling packages and not all of my colleagues add this jobstep. The jobs are scheduled and created irregularly. So sending the report every day would be nonsense because sometimes the jobs don't run for a month. Other times, 5 jobs a day are executed.
Is there a way to trigger the job 'Send me report' whenever a SSIS-package finishes running? Regardless of how it was started? Regardless of what the outcome was?
Create a data driven subscription to the report that execute a stored procedure that check if any jobs was executed the day (probably the previous day or running 24 hours, etc.)

Execute long running jobs in SQL Server

I am working with SQL Server 2008. Using the Agent, I have created a job and scheduled it to execute every minute.
The job executes a stored procedure that moves data from table XXX, to a temp table, and then eventually into table YYY.
The execution of the job may take more than one minute - since the data is rather large.
Will a second instance of the job be started even though the first instance is still running?
If so, should I mark records in temp table (status = 1) to indicate that those records are being processed by a previous instance of the job?
Is there a way for me to check that an instance of the job is currently running, so that I don't initiate a second instance of the job?
Is there another solution for this that I am unaware of? (throughput is important)
Only one instance of a particular job can run at any one time.
So there is no need to take any particular precautions against another execution of the same job beginning before the first one has stopped.
check this post
How to Prevent Sql Server Jobs to Run simultaneously
How to Prevent Sql Server Jobs to Run simultaneously
As Well HERE
Running Jobs
http://technet.microsoft.com/en-us/library/aa213815(v=sql.80).aspx
If a job has started according to its schedule, you cannot start another instance of that job on the same server until the scheduled job has completed. In multiserver environments, every target server can run one instance of the same job simultaneously.

How to customize sql server agent jobs

I need to be able to schedule a job on the 10th of each month and have it run for a set number of days or until a specified date.
Is there any way to customize sql server agent jobs using some sort of API or something?
Thanks.
You can accomplish using the SQL Job Schedule properties by using more than one schedule for the job. You can schedule the job to run on the 10th day of the month (with the option for an end date). You can then create multiple schedules, one for the 11th, 12th, etc.
The SQL Server Agent does not have a schedule option like you need, so I think your workaround is as good as it gets for keeping it inside SQL Server.
The Windows Task Scheduler however does have an option to run a job on the 'x' day of the month, maybe kicking your sproc off using sqlcmd via Windows Task Scheduler is an alternate solution?
Hope this helps
I still can't find any way of customizing the job schedule, but I have figured a way around it by adding the condition to the job step:
IF (DAY(GetDate()) >= 10)
EXEC MySP
And setting the schedule to run every day.

Resources