SQL Server Agent Not Scheduling - sql

I am running SQL Server Standard (linux) in a docker container and the Agent is not working to any schedule (recurring, one time).
The agent itself works, I have programmed a couple jobs which are completing successfully. However, the jobs do not even start when I activate the schedule meaning there isn't even an error message to review or record in the job activity monitor. Below is my configuration:
sql server job properties

I corrected the timezone issue by passing the proper environment variable, America/Toronto did not not pass properly, so I used America/New_York.

Related

Alternative to SQL Server Agent for running jobs on hosting service

What is the alternative for running jobs when the hosting company that provides shared SQL Server services blocks access to SQL Server Agent?
All windows machines have a built in tool, "Windows Task Scheduler" which can run jobs on a schedule determined by you. Its an easy tool to learn and you probably will have to run your jobs using SQLCMD.
If you don't have access to agent, then you wont get access to Window Scheduler for sure. Request access to the agent or at least have them create a job for you that runs at a specific time. If not the alternative is pretty ugly.
1.What is purpose of the job to be run by the Agent job?
How often did you want it to run (Schedule) ?
If you can answer those two then maybe, we can have an alternative..

Restart a remote windows service using batch file

Haloo all,
I am having couple of windows services running at different Servers which will execute at predefined set of time periods.
Some times it may happen that service is not functioning as desired, then I will go and restart that particular service. After that it will start functioning.
Currently using SQL Stored Procedure and SQL Jobs every 30 mins system will be checking whether the service is functioning or not and if it is not functioning then it will trigger a dbmail to my ID as a notification. (There is a table in my data base in that I will be getting the last executed date and time).
My question is, is there any way like.....using the SQL job I can restart these windows service directly...using a batch file or something...Please note that the SQL database is not on the same server in which the Windows service is running....But all these servers are connected by WAN.
Yes, create a bat file that does a "stop" or "restart" or "start" for the services you want . "sc \servername stop servicename" or "sc \servername start servicename" or "sc \servername restart servicename". This bat file can be executed remotely or directly on the server, you can then call this bat file using a sql job or using a windows task scheduler. Back in the day, all of our server management was done using VBScript or DOS, via bat files.

SQL Azure: Timeout expired

we have some cloud Services hosted in Windows Azure and also some Azure SQL database. At night (during 4:00 - 6:00 utc) there are running some Jobs to import data into database. Since some weeks all the Jobs fails with an timeout expired exception of the database. If I run the Jobs later (during 7:00 - 9:00 utc) on my local machine within the Emulator, all Jobs work without any Problems on the same database.
At the mport time is no much traffic from our site on the database server. The monitoring of the manage portal shows that there are not many open Connections, no throttled ones and no connection errors. There are much more traffic during my local runs.
The sys.event_log do not contains any errors or other possible issues.
Are there any logs or other Options to get more Information about why the Jobs failed at night?
Update
It seems, that the SQL Azure Server ignores the command timeout property. The Jobs start at 4:30 UTC and stops with an timeout exception at 4:37. But the query, which gets an timeout, has an command timeout of 1200 (20 minutes). And before starting the command, there are some downloads from an ftp-server, file parsing and other SQL queries.
Just to note that SQL Azure isn't a full version of MS SQL and does have some limitations. Most notable limitation is the infrastructure that its built on. Your SQL Azure DB will be hosted on a Small Instance server that has shared resource with hundreds of other users. Although there is a fair use policy on the machines it does take time for the servers to kick in.
My suggestion would be to have some way of determining if the Job is actually starting or if the connection pool is timing out prior to starting the job. I.E. create a jobs table that is inserted into to say its started and have this as the first action on your job.
Alternatively you could think about migrating to a VM setup in Azure. This is where you have a Small or Medium instance VM with a fully fledged version of MS SQL Server running on it. That way you can run your jobs against the server correctly and control you connection pooling more appropriately.

Jobs are not running on schedule

I have a job scheduled to run daily at 10 PM. It was running fine but now, it is not.
It stopped running on schedule and I need to manually kickoff the job daily.
Jobs are scheduled to run with [sa] account and password has not expired.
I don't understand why this is happening suddenly.
My server is SQL Server 2008 R2. Even I restarted the server couple of days back.
Do I need to install any service pack/hotfix?
I ran into the same issue, make sure there isn't another job running before that may delay the start off of the job and make sure the algorithm is fcfs. To debug, set the job to run at a different time, and if it runs successfully there may be another job slightly earlier then 10 causing the error.

How to start SQL Server agent jobs automatically

I am writing PowerShell scripts to control SQL Server agent start/stop to ensure all the contained jobs runs according to defined schedule. I want to make sure that the only thing I need to do is to start the SQL Server Agent Windows Service, and then all the contained SQL Server Jobs will run automatically according to defined schedule? No need to control each job's start/stop specifically?
I am using SQL Server 2008 on Windows Server 2003.
thanks in advance,
George
When you start SQL Server Agent all jobs (if they are not disabled) will run automatically and it's no need to control each job. Just make sure that jobs are enabled.