Questions tagged [jobs]

A scheduled task managed by the database, for example using SQL Server Agent, Oracle dbms_job, or MySQL Event Scheduler.

408 questions
68
votes
4 answers

How to run recurring tasks on Postgresql without an external cron-like tool?

I would like to call a stored procedure on a regular basis. On Oracle, I would create a job for this. I have found that Postgresql can mimic this well by using an external tool (cron etc) and PgAgent. Do you know of an "internal" alternative which…
Stephan
  • 1,513
  • 4
  • 18
  • 27
53
votes
5 answers

Sql Server Maintenance Plan - Best Practices on Tasks and Scheduling

I am tasked with devising a maintenance plan for our Sql Server 2005 databases. I know for backups I want to do a daily full database backup and transactional log backups every 15 minutes. My problem comes to figuring out which other tasks I want…
Josh
  • 693
  • 1
  • 6
  • 7
26
votes
4 answers

Grant permissions to run a SQL Server job

I have a job on my SQL Server 2005 instance that I want to allow any database user to run. I'm not worried about security, since the input to the job's actual work comes from a database table. Just running the job, without adding records to that…
Shahar Mosek
  • 413
  • 1
  • 4
  • 6
21
votes
7 answers

Script to see running jobs in SQL Server with Job Start Time

how to write script to see running jobs in SQL Server with Job Start Time? SELECT sj.name, sja.run_requested_date, CONVERT(VARCHAR(12), sja.stop_execution_date-sja.start_execution_date, 114) Duration FROM msdb.dbo.sysjobactivity sja INNER…
zerbug
  • 329
  • 1
  • 2
  • 4
20
votes
4 answers

What is the Query to display the failed sql jobs

What is the Query to display the failed sql jobs,so that I can get all the failed job information with one query
Avi
  • 317
  • 1
  • 3
  • 6
19
votes
4 answers

How to changes or update local server connection in Maintenance plan job

Two days back our client changed one of our Dev Server name After Server Renamed, All my maintenance jobs and other jobs are failing because server name mismatch. We are using sql server 2012 version and server 2008 OS So today morning i renamed my…
sairam
  • 291
  • 3
  • 5
  • 12
19
votes
4 answers

Task scheduler for SQL Server Express

I have an ASP.NET MVC app which works with database under SQL Server 2008 R2 Express edition. There is a need to perform a regular task on updating some records in the database. Unfortunately the Express Edition lacks SQL Agent. What approach would…
rem
  • 1,555
  • 3
  • 20
  • 22
14
votes
3 answers

Calling a SQL Server job within another job

Is it possible to call a SQL Server job to run within another job? I know we can add all steps of Job 1 to Job 2, but I prefer not to do that. First the Job 2 is already quite big and second I couldn't find a copy-paste option to copy steps between…
Sky
  • 3,744
  • 18
  • 53
  • 68
13
votes
2 answers

Does @os_run_priority in sp_add_jobstep actually work in SQL Server 2008 R2?

Does @os_run_priority in sp_add_jobstep actually work, in SQL Server 2008 R2? It is described as "reserved" or "undocumented". However, I see it in the sp_add_jobstep definition: @os_run_priority INT = 0, -- -15 = Idle, -1 = Below Normal, 0 =…
benik9
  • 351
  • 2
  • 8
12
votes
1 answer

Allow non-sysadmin, non-owner of a SQL Server Agent job to execute it

I have a job that runs an SSIS package. Currently the owner is a proxy account. I can run the job manually from a sys-admin account. Our web service logs in using a limited account. It needs to execute the job. Currently it is unable to see the job…
Cruncher
  • 223
  • 1
  • 2
  • 6
12
votes
2 answers

deleting large volumes of rows from table efficiently in SQL Server

I have a table that has gotten a little out of control. I am not a DBA per se but seem to recall that deleting a huge volume of rows in one shot can cause transaction log issues, hamper overall system performance during the delete, etc... Is there…
JoeGeeky
  • 1,297
  • 4
  • 16
  • 26
12
votes
1 answer

Where EVENTS history are logged/recorded in MySql?

I just setup some stored procedures to run in the event scheduler using CREATE EVENT. I'm trying to find where (if somewhere) the history of it running is stored. I looked at the docs but couldn't find anything. Is there some table or log where I…
tucaz
  • 245
  • 1
  • 2
  • 6
12
votes
3 answers

How does SQL Server store the information in Job Schedule Properties?

I know there is SELECT * FROM msdb..sysjobschedules, but that just shows the next time a job is scheduled to run. I want to know how this is all determined and stored. So where does it store the value for Recurs every Monday check box?
joe
  • 319
  • 2
  • 7
10
votes
2 answers

How to clear an Error 15404 after a DB restart (besides rebooting)

Every so often (e.g. ~months) a SQL Server Agent hourly Job will begin reporting an Error 15404 and continue to do so until intervened with. [298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user…
crokusek
  • 2,110
  • 4
  • 25
  • 34
9
votes
2 answers

How to schedule jobs in Sql server 2008 for less than 10 sec?

I want to run a job every 3 seconds, however in SQL Server 2008 we cannot define an interval of less than 10 seconds. The job is used to insert/update visitor information, and segmentation information into a database which is tracked by google…
Musakkhir Sayyed
  • 490
  • 1
  • 5
  • 18
1
2 3
27 28