Questions tagged [jobs]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
24 views

Pending changes from a finished job

I'm getting the following error: Uncommitted changes pending for file MYTABLE in library MYLIB. CPF325E Cause . . . . . : Uncommitted changes are pending for file MYTABLE in library ...
0
votes
1answer
44 views

How can I run a pgAgent job every 10 second?

I have a PostgreSQL 11.3 Database. I installed pgAgent for creating jobs. Now I want to run my job every 10 second, but in GUI there is possibility to write with precision of minutes, not with ...
0
votes
1answer
32 views

Newly created jobs need to be set for failure notifications automatically

Whenever a new / existing job gets failed on an instance of SQL Server, we should recieve an email about failure notification. Please help on how we can automate it?
1
vote
1answer
61 views

Save SQL server job output results to text file

I would like to save results of the SQL job to a text file. This is the query SELECT sqltext.text, req.session_id, req.blocking_session_id, req.cpu_time, req.wait_type, req.status FROM sys....
1
vote
1answer
55 views

SQL Server transactional replication is out of sync

I have setup transactional replication in SQL Server and I am using PULL to retrieve the data from the subscriber. Recently, I noticed that the data in my subscriber is not synced up with the ...
0
votes
0answers
21 views

Mysql 8 event scheduler timezone

im a bit confused about the event scheduler. First off, it is running and working, but the timezone handling confuses me a bit, as it seems it's not what is documented on events metadata So to start ...
0
votes
0answers
31 views

ORA-27369: job of type EXECUTABLE failed with exit code: There are no child processes to wait for

I have existing .bat file where i call FDSLoader64.exe on daily basis to update following tables. FF_ADVANCED_AF FF_ADVANCED_SAF FF_BASIC_SAF FF_BASIC_AF FDSLoader64.exe is supposed to download ...
2
votes
3answers
60 views

Can a MSSQL job change its own active schedule?

I am planning a new job for MSSQL Sever 2016. I'd like the job to run on Sunday, every 10 minutes, until it sees a confirmation record is added to a table it checks as the final step in the job. If ...
0
votes
0answers
31 views

Automatic Query from root DB to new DB

I have access to an enterprise level DB used throughout the organization with tight constraints on who can access things. It contains almost all our data. I am a user of that DB with only read rights. ...
-1
votes
1answer
44 views

SQL Job failing due to an error [closed]

I am no expert with SQL for sure but I am wondering if I could take a swing at this on my own. I have an SQL job called "Misc Update NAV" that is scheduled to run every day at 7 am, however, when ...
1
vote
2answers
33 views

SSIS connection used based on passed value

I have an SSIS package that populates a reporting warehouse from a live and test environment. Currently the package has each step duplicated as the source connection changes between live and test. ...
0
votes
0answers
38 views

Refresh jobs failing after diskspace increase

We're refreshing our database weekly using various jobs. After an increase of diskspace I'm running in the following error: "Specified driver could not be loaded due to system error 126: The ...
4
votes
2answers
303 views

Start job from another SQL server instance

I have a job on an SQL 2008 server (Server A) (I know this is not ideal... That issue is being addressed). The agent runs under NT AUTHORITY\NETWORK SERVICE. I want to add a step that runs a job that ...
1
vote
2answers
69 views

is it possible to trim the table output for a specific job?

I have a routine to save the logins and apply them on a different server , and I run this routine from a job that I have scheduled to run everyday. On that job I have specified these 3 things: Log ...
0
votes
0answers
189 views

Create SQL Server Agent job for stored procedure with input parameter

Could you suggest please how to create SQL Server Agent job for a stored procedure that have 1 input parameter? The procedure is correctly created and i executed it using this code : EXECUTE dbo....
0
votes
2answers
112 views

Triggers vs. Jobs in SQL Server

I’m designing a database with a table that automatically gets loaded with a new record every 15 seconds (each record will have a 'timestamp' field and around 50 ‘float’ fields). Each record in this ...
2
votes
1answer
135 views

Run SQL Agent Job 3 times in a Row

How do I execute SQL Agent job 3 times in a row? We are creating Data Warehouse Project. It ETLs data from Flatfile Legacy Folder, and creates Dim and Fact tables. SSIS Project Environment Variable (...
3
votes
1answer
292 views

How to handle failed Index Optimization (Ola Hallengren) step in SQL Azure Elastic Job Agent?

I have created a SQL maintenance job using Azure Elastic Job Agent with the following step: EXEC jobs.sp_add_jobstep @job_name = @jobName, @step_name = 'Optimize indexes and statistics', @command=N' ...
1
vote
2answers
77 views

Run shell script on Oracle 11g

I have an oracle database: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production "CORE 11.2.0.1.0 Production" TNS for Linux: Version 11.2.0.1.0 - ...
0
votes
1answer
392 views

Does SQL server log when and who enabled / disabled jobs by default?

Is there any default logging or history of when a SQL job was enabled or disabled?
0
votes
2answers
179 views

Stop long running scheduled job

I need to launch a scheduled job at 12 o'clock at night and keep this job running for a period of 8 hours. What happens now is that the job is running for more than 12 hours and I really need to avoid ...
0
votes
0answers
38 views

Ola Hallengren - Parallel Backup Jobs failing on SINGLE_USER DB - 'Database is in transition' [952]

I'm using Ola's DatabasesInParallel option for "multi-threaded" execution. Last night a db was temporarily placed into SINGLE_USER for an application-based archive process and it caused all 5 threads ...
5
votes
1answer
234 views

What's the values for the Freq_Interval column in MSDB.dbo.SysSchedules when Freq_Type is weekly and more than one day is selected in the schedule?

I'm reading up on the SysSchedules table in the Microsoft API, and am trying to incorporate using this table in a query. In the documentation, the Freq_Interval column seems to be defined out for ...
4
votes
1answer
274 views

Why are these T-SQL jobs from different SQL Server instances executed on the same instance (AlwaysOn Availability Groups)

Recently, our blocked processes dashboard has been reporting blocked processes around the time when we do our statistic update. The reason was quickly found: an update statistics job step (T-SQL) ...
3
votes
5answers
305 views

How to stop a job for the rest of the day after the relevant condition has been satisfied once?

I have a job that runs every 5 minutes to check an IF condition. If the condition is true, it will send an email, if not, it won’t do anything. My problem is that once the IF condition is true, it ...
1
vote
1answer
63 views

Giving access to only one SQL Agent Job

I need to allow a user only to execute a specific Agent job, rather than be able to execute the other jobs that are there . Please advise how to accomplish this. This user will only run a copy only ...
0
votes
0answers
115 views

how to collect the information provided by tokens in order to troubleshoot failing jobs quickly?

I was working on a way to take advantage of the SQL Server Agent Tokens and Macros because I work a lot with jobs and job steps and sometimes I have to notify different people depending on the outcome ...
0
votes
2answers
295 views

Rebuild index error: “The job was stopped prior to completion by User”

I have a rebuild index job that is set to run every night. The job used to run fine, but last night for some reason the SQL Server Agent Job was stopped. The rebuild index job was running on 9 ...
3
votes
2answers
94 views

function to check whether the current server is involved in an availability group and if so, whether it is the primary

I used to have 2 servers on an availability group, but there was a problem with one of them servers involved,while patching, and to make a long story short I removed all the databases from the ...
0
votes
1answer
546 views

How to create SQL Agent job to automatically restore a database from latest backups?

There are 3 different folders which store respectively full, differential, and log backups. Different types of backups occur in different schedules. Now I need to create a new job which will ...
2
votes
2answers
517 views

availability groups - checking for primary server - cannot call a procedure with parameters

In my servers that are involved in alwayson availability groups if there are jobs running, inside the jobs I always test whether the current server is the primary in the availability group. So the ...
0
votes
1answer
49 views

How to format the output of this query into year…second?

I have this query that given @secs a number of seconds, it returns a table with year,months,weeks,days,hours,minutes and seconds. take for example: declare @secs int select @secs = 19475298 ...
1
vote
0answers
744 views

dbcc failing with Cannot continue the execution because… alwayson having a change of state event for each db

I got a job DatabaseIntegrityCheck - USER_DATABASES, failing with the following error: Date and time: 2018-10-29 02:34:13 Command: DBCC CHECKDB ([one of my databases]) WITH NO_INFOMSGS, ...
1
vote
0answers
130 views

OLA Output File Cleanup - Better Options

Does anyone have a way to change the Ola Hallengren "Output File Cleanup" job that doesn't require CmdExec? My company is trying to eliminate CmdExec where ever possible. I was thinking a PowerShell ...
0
votes
1answer
316 views

Why do we need to use proxies for syadmin job steps?

I read somewhere that for non-TSQL SQL Server Agent jobs, the job runs under SQL Server Service Agent account when the job owner is the sysadmin. I just don't get why we need to use proxies even the ...
0
votes
1answer
177 views

Log shipping - Job schedules

When we configure the Log Shipping, there are jobs automatically created that run on schedule. What happens if db size grows or there is network latency, does SQL Server auto handle the job schedules? ...
2
votes
1answer
32 views

Schedule database backup question

Good day. This may be a stupid question and you can give me a stupid answer if you need to. I know you can schedule a task to backup a sql database at logon, shutdown, specific time, etc. But What I ...
0
votes
1answer
101 views

ORA-24155 - Why am I getting this error when creating a chain rule

When trying to create a new chain rule, I receive ORA-24155 stating that the the rule I'm trying to create is not in the ruleset which doesn't make sense. I stop and drop all jobs/chains and then ...
0
votes
1answer
271 views

CmdExec Powershell Job Step Escape Double Quotes

I have a PowerShell job step I'm trying to execute and it's failing with a syntax error I believe is because I'm trying to escape double-quotes in my code. Can anyone take a look and help me with ...
1
vote
2answers
1k views

How to stop the SQL Server Agent Job Scheduler with T-SQL?

I have a job that I manually start in coordinated time periods that does a bunch of heavy lifting (mostly restoring backups and configuring for a different server) There are several jobs scheduled to ...
0
votes
1answer
56 views

SQL job ignoring IF condition

I have a job with a few steps(that run reports information) and i added a query i wrote to the last step. Sometimes the job fails because of factors i can not control (application issues) and my query ...
3
votes
1answer
1k views

INSERT failed in SQL Job because of incorrect SET options 'QUOTED_IDENTIFIER'

I created a sql job to query the plan cache and get the serial plans alone and then clear it from the plan cache. As part of step 1 in the SQL job,i filter only the serial plans and insert it into a ...
1
vote
2answers
1k views

How to find the list of SQL Server jobs using PowerShell?

I need to create Windows PowerShell Scripts that will check and list down all SQL Jobs scheduled on a given database server. Is it possible to find out the list using PowerShell Scripts? If yes, how ...
1
vote
4answers
173 views

replace all references to a drive inside the jobs to another drive

I have a server where all my sql server backups are currently being saved to the G: drive. Now there is no enough disk space on drive G: to keep backups for the last 5 days. I have asked to add ...
0
votes
1answer
465 views

length of the result exceeds the > length limit (2GB) of the target large type

Getting the following error message on the Sql Server Error Log: SQLServer Error: 599, WRITE: The length of the result exceeds the length limit (2GB) of the target large type. [SQLSTATE 42000] (...
0
votes
1answer
49 views

job send email to developers upon complexion and include DBAs if it fails

I have a job that sends an email to an operator (which contains a list of emails within it) upon complexion. Some of these people that are on that list are the developers who build everything in that ...
0
votes
1answer
98 views

Even out disk i/o

We noticed that when a few of our Microsoft SQL server jobs run disk I/O goes from a background of 1-5 disk queue length to 100-700 disk queue length. The thing is the jobs only run for 1-2 minutes so ...
2
votes
1answer
977 views

How do I find a job that sends a specific email?

I had a job sending an irrelevant email to a group of users. The title of the email was Staging -> [AUPAIR] arrivalDate trigger issue. When I query the jobs table in the msdb database using the ...
0
votes
1answer
48 views

What's the best way to pass a variable/valuable between steps in a SQL Server job

For example, if I create a dtsx package that fills out an excel sheet, but only email it out if there is actual data?
0
votes
0answers
78 views

Is there a date modified timestamp for steps in a job on msdb?

I need to figure out which steps have been modified since the beginning of the month. I can find which jobs have been modified, but some of the jobs have 20+ steps, so knowing which specific step was ...