Questions tagged [jobs]

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

370 questions
53
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,243
  • 4
  • 17
  • 24
51
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
  • 673
  • 1
  • 6
  • 7
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

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,505
  • 3
  • 20
  • 22
17
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
  • 271
  • 2
  • 4
  • 12
13
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,634
  • 15
  • 45
  • 67
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
  • 1
  • 7
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
11
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,227
  • 4
  • 14
  • 26
10
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
  • 203
  • 1
  • 2
  • 6
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
  • 1,956
  • 3
  • 21
  • 32
10
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
  • 225
  • 1
  • 2
  • 6
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
  • 450
  • 1
  • 5
  • 18
9
votes
2 answers

Error running Powershell Script in SQL Server Agent

I have a SQL job that runs via SQL Server Agent (Running SQL Server 2012 Enterprise). The last step of the job is to run an application located on a network share. Unfortunately I don't know the name of the folder that the application is in (the…
Greg
  • 3,132
  • 3
  • 28
  • 51
9
votes
2 answers

Transaction and Try-catch in SQL Server Job

We have DML operations in each step of a SQL Server job. To ensure the update/insert will be rolled back in case something goes wrong, I have wrapped the data modifications of each step in TRY CATCH and TRANSACTION blocks: BEGIN TRY BEGIN…
Sky
  • 3,634
  • 15
  • 45
  • 67
1
2 3
24 25