Sql server Job starts one month early - sql-server

My job scheduler has a behavior I can't understand.
It is schedule to fire in the following conditions:
Occurs every 3 month(s) on day 1 of that month at 00:00:00. Schedule will be used starting on 30/09/2015.
So I expected to see it launched next july at midnight and this OK for years.
But it started this night (1st of june).
The script and database have been completely reinstalled on next 5th of may for a migration.
I am using SQL Server 2012 on an on premises server.
Does anybody has an explanation?
Thank you

Related

SQL Server Agent job history displaying future date

I was investigating a SQL Server Agent job which I have firing every 15 mins.
It is currently about 3:15 PM on Friday 17 June 2022. (Doing this long hand coz some people might get confused if I say 17/6/2022)
I can see the job history says it ran every 15 mins but stopped at 12 noon. Then it ran at 8:03 pm, 8:15pm, 8:30 pm.
Thing is, it's not that time yet! Like I said it's now around 3:15 pm.
What the heck is going on?
SQL Server version 2017 standard edition.
If it helps, like maybe there is some weird time zone thing going on I am in Sydney Australia. So GMT +10.
The time is correct on the server.
When I do SELECT GETDATE() it also returns the correct time.

Sql Server agent Job the first business day of each month

How can I schedule to run once on the first business day of every month in SQL Server JOB application?
Under Frequency, you can choose "The first weekday of every 1 month(s)".
It won't handle holidays, but as far as I know that's the closest you can get with the schedule configuration.

Disable SQL Server Agent Job temporarily

My SQL Server Agent job runs everyday 7 PM. How can I disable it to not run every 10th, 11th and 12th date of the month?
Now every month, On 9th, after completion of the job, I do manually by changing start date of the schedule to 13th. Is there any better approach get rid of this manual activity?

SQL Server agent job recreated

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...)

Transactional replication failing

i am facing issue in sql server Transactional replication and not able to get the root cause for it. First, let me tell you that i am not a DBA, so i may be dumb on few DBA concepts.
i am .Net developer and i have been given responsibility to setup the replication.
i have a Database in Headoffice and replicating few Tables to another server at retail Store.
First time, i configured the replication with selected articles.
the replication was continuous. it was running fine, but one Sunday night, it got failed with error "process could not execute 'sp_replcmds'".
after spending sometime on google, i couldn't find any solution. so, i rebuilt the Replication, but this time the replication was scheduled (every 15 Min), also i configured it as PULL instead of PUSH. it started, but again next Sunday night it got crashed.
So, i analyzed that in Sunday night, i had configured the Reindexing Job on the database, and Since, the recovery model was full, it was generating a very large TLOG and Repolication agent was not able to parse that.
Now, the third time, i again Rebuilt the Replication, and this time i scheduled the replication every 15 minutes but from 8:00 AM Morning to 11:30 PM, because after 11:30, no store do any transaction. Also, for Reindexing Job, i added 2 more steps. before Re-Indexing, i was changing the recovery model to simple and then Re-Indexing and after that i was changing the Recovery model back to Full. i was changing the recovery to Full, irrespective of the result from Re-Indexing step.
This setup was working fine and worked properly for around 2 Months.
Now, after 2 Months, again one Sunday night it got failed, with the same reason ("process could not execute 'sp_replcmds'"). Actually, i had scheduled the backup job, and i was taking Full Backup everyday and Log backup every 15 minutes, and no differential backup.
after, discovering that i had not configured the differential backup, i also configured the same (every 6 Hours). but, after configuring the Differential backup, in Sunday night Replication got failed.
Now, anybody, please help me with the recommended setup for my scenario.
my setup is
sql server - SQL Server 2008 R2 Enterprise on Windows Server 2008 R2
Distributor and Publisher are on same machine.
Subsriber is on the Retail Store server.
sp_replcmds is run by the log reader agent against the published database to get, well, replicated commands. According to the documentation, one needs to be at least db_owner to run that command. Make sure whatever account is running the log reader agent has at least db_owner in the published database.

Resources