Questions tagged [jobs]
A scheduled task managed by the database, for example using SQL Server Agent, Oracle dbms_job, or MySQL Event Scheduler.
386
questions
0
votes
1
answer
39
views
SQL Server Job running as different user
A year or so ago I started working on a project to set up a job to run a stored procedure. I've now come back to this to finish it off. When I run the job I get an error that he job is running under ...
-2
votes
1
answer
51
views
script to place all backup files(Full, diff &log) in same folder for all Databases in the server [closed]
I have downloaded script from here : https://ola.hallengren.com/sql-server-backup.html
Thank you for the SQL Server Backup script, it's creating separate folders & subfolders for each database.
...
0
votes
0
answers
16
views
I want to fetch the data of the job already paused in postgres DB. I am using Quartz Scheduler [closed]
override fun pauseJob(jobName: String): Boolean {
val jobKey = JobKey.jobKey(jobName, "DEFAULT")
return try {
val jobDetail = schedulerFactoryBean.scheduler....
0
votes
0
answers
25
views
How to alert when a new SQL Agent Job is created in SQL Server 2019?
How do you alert when a new SQL Agent Job is created in SQL Server 2019? Is there some kind of trigger that would work here?
0
votes
0
answers
42
views
2019 SSIS job step running as a proxy/credential getting "Login failed for user 'domain\user'."
I have a new 2019 SSIS instance with one agent job that runs a package that runs sprocs on another sql instance. The 2019 SSIS sql service and agent service are running under a gmsa. The target ...
1
vote
0
answers
194
views
Unable to create and install pgAgent service
I'm trying to install pgAgent on my device. During the installation using the stackbuilder, the last step requires me to add the operating system username and password as below:
However, after ...
0
votes
1
answer
374
views
Why SQL Server Job fails with "EXECUTE AS LOGIN failed for the requested login"?
I created a SQL Server job, in which:
My user is set as the owner of the job
No user is specified for run as at any step.
The job failed with the error:
'EXECUTE AS LOGIN' failed for the requested ...
0
votes
1
answer
489
views
PLS-00306: wrong number or types of arguments in call to 'CREATE_JOB'
we are getting this error when we try to create this scheduler_job but we try to create it give us this error:
BEGIN
DBMS_SCHEDULER.CREATE_JOB
( job_name=>'PROC_TKN_WA_FIX_ARREARS',
job_type=...
2
votes
2
answers
256
views
Create a Job Schedule that runs on the 1st of month only if it falls on a Sunday
This job already has one schedule that runs on the first of the month.
However, we need to run the job on a different schedule if the first of the month falls on a Sunday.
It appears to me that the ...
0
votes
0
answers
99
views
Big Query Scheduled queries, log of scheduled query changes
We have a Big Query Scheduled queries, an sql developer said the cron of one scheduled query was changed.
I want to find out who changed it.
I think this documentation is the closest I got, but I can'...
1
vote
1
answer
120
views
pgAgent unwanted delay between jobs start time
I've been trying to make jobs running continuosly, so after previous run is done, the next one starts immediately. I made some initial success with following trigger:
CREATE or replace FUNCTION ...
0
votes
1
answer
89
views
SQL 2019 multi-step job fails due to output file in use from previous step
We recently upgraded our SQL server from 2012 to 2019. (A long overdue process, I know.)
Prior to the upgrade all of our regular scheduled jobs worked just fine.
After the upgrade, one scheduled job ...
0
votes
2
answers
520
views
PostgeSQL Schedule Jobs
I am looking a way that can give the ability to schedule jobs on PostgreSQL, for example to schedule execution of some procedures or statements based on interval or on specific schedule.
I tried ...
0
votes
0
answers
20
views
Create oracle scheduler fails
I want to create a scheduler that runs everyday at certain time, but it is never created. Is this correct :
DBMS_SCHEDULER.CREATE_JOB(
job_name => 'LOG_MEMORY_USAGE',
job_type => '...
0
votes
0
answers
21
views
Save Query Results into Excel and Automatically run it
I have a very simple query
Select * from Employees
I want to run this query automatically on a daily basis and save the results in excel using SQL Server. Is there any way I can achieve this purpose?
...
1
vote
1
answer
694
views
How can I add time and date to a query output file name in sql server agent job
I have a query set up in SQL Server agent to return an output result file. The problem I have is how to set a date and time stamp so that the file name always includes the date and time.
On the SQL ...
-1
votes
1
answer
54
views
Any possibility that Ola Hallengren could add a job name prefix option to the script that creates all the maintenance jobs? [closed]
When creating the jobs, they sort together for most of them, but some of the jobs are alphabetically far away from the other Ola jobs on servers with hundreds of jobs.
I would find it easier to see ...
0
votes
0
answers
187
views
Job getting account disabled Error, but works as normal when executed manually
The account used in a linked external SQL Server was disabled, by the external server, temporaly. After the restoration of access, various job routines that used this account continued working, as ...
1
vote
3
answers
537
views
How to prevent primary node's SQL jobs from running when the primary node goes into resolving state?
I have 2 nodes in an AG. Non-readable secondary, sync commit mode.
There are sql agent jobs setup on both machines. The schedules are turned off on secondary so those jobs wont run. If there is ...
1
vote
2
answers
80
views
Problem with Oracle Job Scheduling
I have a job that refreshes a materialised view refresh group on Oracle 19c. I wanted to refresh the group daily at midnight - trunc(sysdate)? The job was made using using the following PL/SQL:
...
0
votes
1
answer
122
views
On what basis is the sql job's step linked to a database?
I have couple of SQL jobs on source sql server, and on the job step a particular database is selected.
I want to move the databases and jobs on a new sql server, so I have scripted the jobs.
In the ...
0
votes
1
answer
55
views
What does it mean to reach a stable point during the execution of a job?
Trying to use sp_stop_job to stop a simple job that inserts data on a table when 100 rows were inserted I got confused to see the table end up with more than 100 rows every time.
Under the Remarks ...
1
vote
2
answers
994
views
SQL Server Backup Jobs Failing. The error seems to be related to MaximumErrorCount, but I am not sure how to fix value or if changing it will resolve?
My backup jobs are failing with following error when check it's history. I have already checked this link regarding maximumerrorcount value: SQL Server 2008 - Change the MaximumErrorCount or fix the ...
4
votes
2
answers
929
views
Why does this query fail when I run it from a SQL Server job?
I know how to solve the issue, but I don't understand the technicality of why the below query would work when I run it from SSMS, but the same query fails when I add it as a job in the SQL Server ...
0
votes
0
answers
78
views
Maintenance plan run date wrong
Win server 2019 & SQL Server 2017
On Jan 28th, 2022, I setup 3 maintenance plans to backup 3 databases from 3:00AM – 3:40AM. The last one finishes at 3:45AM. For a few weeks I confirmed that I am ...
0
votes
1
answer
29
views
Stop Changes to Maintenance Plan from Renaming Linked SQL Agent Job
Is there a way to stop a SQL job (which calls a maintenance plan) from being renamed every time i open and save that maintenance plan?
Each time i do that, a prefix of "_SubPlan" gets added ...
0
votes
4
answers
970
views
SQL Agent Job - Change all job steps to go to a specific step when the job fails
I have a SQL Agent Job that I need to change, so that any time any step fails the 'ON FAILURE' action goes to a specific step.
Does anyone have a script or can you show me how to write this so that I ...
0
votes
1
answer
273
views
Scheduling Next Run date for weekly agent jobs
On SQL Server I used maintenance plan wizard to create three jobs:
Job
Schedule
Job 1
Every 3 week on Sunday
Job 2
Every 3 week on Sunday
Job 3
Every 3 week on Sunday
I want the three jobs to run ...
0
votes
1
answer
479
views
DBCC CHECKDB job failed on SQL Server 2014
We have a DBCC CHECKDB job that runs weekly on Saturdays. This job was created thorugh Maintenance Plan wizard. Typical duration for this job is 1.5 hours. This past weekend the job failed with the ...
1
vote
0
answers
389
views
Sql Server Agent Job - Unable to start execution of step 1 (reason: Error authenticating proxy "user", system error: The user's account has expired.)
My predecessor created several "Intergration Services Catalogs" dtsx packages which are scheduled / run via SQL Server Agent -> Jobs using an SSISFileProxy which is using ...
2
votes
1
answer
671
views
Job to stop other job at specific time
We have a job which imports data daily from a remote SQL Server every night, I'll call it Import-Job. Most of the time this job runs through in about 15 minutes and everything is fine but due to a ...
0
votes
1
answer
662
views
Supabase postgres cron job not working special case
I'm having the problem, while insering a row using rpc through the nodejs library, with user service_role.
i gave permission to all roles. Without exception.
And for service_role I even gave it all ...
0
votes
2
answers
343
views
Need help in getting mysql event scheduled every monday and wednesday
I have coded an event as below to run every Monday and Wednesday, but it runs only on Monday and doesn't on Wednesday.
delimiter |
CREATE EVENT IF NOT EXISTS evnt_demo_ref_fs_test
ON SCHEDULE EVERY 1 ...
0
votes
1
answer
84
views
Would re-seeding the InstanceID column of sys.jobhistory table create issues?
I have two Production servers, one active, one passive. On the active server, application specific jobs are enabled and run all the time. Jobs on the passive server do not run.
On a regular schedule, ...
0
votes
0
answers
470
views
How to schedule a job using windows task scheduler to export data from potgresql eriodically into CSV file.?
I am facing an issue even after following all the steps as suggested in the answer provided by Neil Mcguigan for the question asked In the above link
I was getting an error - "psql: f_sendauth no ...
-1
votes
2
answers
270
views
SQL Server Agent Jobs and Availability group
I have two servers (Primary and Secondary), as well as an AG that keeps them in sync.
As we all know, System databases are not covered by the AG definition.
1.I require that all jobs on the primary ...
0
votes
0
answers
53
views
Cannot modify a job in SQL 2008 R2. The Modify window simply doesn't come up
I created a maintenance plan to perform daily backups with transaction log backups to be scheduled on four hour increments, however, I did not enable the job immediately, nor did I enter add the ...
0
votes
2
answers
101
views
Job to remove logins on secondary replica that don't exist in primary replica
How to remove logins on a secondary replica that don't exist in primary replica?
I want to create automated jobs that should check if the login still exists on a secondary after the login on the ...
2
votes
1
answer
148
views
How to trim the log file that stores information about job history execution?
I was having a look at my sql server jobs and proxies on an specific server in the production environment.
I pretty much have an script to check the status of the jobs but in case I have to ...
0
votes
1
answer
292
views
Archive logs Pg_archive cleaner
I have Postgres installed on windows 10. I have master-slave replication ( 1 pc is master and 2 other pc are slaves). I have archive logs saved on a file on master pc and slaves are connected to that ...
2
votes
1
answer
118
views
Jobs on the Mirror are running against the Primary
I have a mirrored set of jobs between the my current primary and mirrored failover SQL Server setup. In the past, the jobs on the mirrored server, when they are enabled, fail as they are not able to ...
1
vote
1
answer
298
views
*.bak file on another server file share
On a physical Dell server, I am trying to setup a backup job to *.bak file on to failover server.
In the video, DBA Fundamentals - backup 3 - setting up maintenance plans @6:24 backing up to a local ...
3
votes
2
answers
5k
views
Cannot give NT SERVICE\MSSQLSERVER permissions on network drive
I have an SSIS package that I would like to run as a job. The flat file source sits on Server A while the package and job sit on Server B.
When I run the job that executes the SSIS package I get an ...
0
votes
0
answers
26
views
Aborting long running query under AG configuration [duplicate]
Currently we have a process where any query running over 2 mins (only select) in primary database participating in db mirroring is killed, running every 5 mins.
As we have moved to Availability groups ...
1
vote
1
answer
269
views
Schedule suggestion and index rebuild / database integrity progress for Ola Hallengren’s Maintenance Script
I have to configure Ola Hallengren's Maintenance Scripts for my SQL Server 2017. SQL Database size about total 400GB.Total 10 Dbs. But I have some questions.
1- I will use these schedules like below. ...
2
votes
1
answer
350
views
Installing SSIS package outside of SSIDB catalog
I'm trying to simplify deployment of a SSIS package to a remote server. At the moment, I have
Local Visual Studio SSDT and SSIS package that has 4 connection managers - DEV environment
Remote server ...
0
votes
1
answer
158
views
Index automation job script
Our Production instance is running SQL Server 2014. There needs to be an automated Index defragmentation job that will either reorganize or rebuild the indexes based on the fragmentation level for a ...
1
vote
1
answer
1k
views
Why a job of dbms_job is BROKEN
I have Oracle job that uses dbms_job package. I see that it becomes BROKEN:
Select job,what,BROKEN from dba_jobs;
-------- ------------ -----------
1 statspack.snap; Y
I would like to know the ...
1
vote
0
answers
177
views
Oracle Scheduler Job - Exporting of CSV File every 16:01
I have already executed the code for scheduler. However, I have a problem whenever I execute my scheduler. Can someone help me with this? I'll appreciate all your response.
My procedure code:
create ...
0
votes
3
answers
1k
views
SQL Server Agent & sp_send_dbmail failing on permissions
I have set up a SQL Server Agent job to call sp_send_dbmail with a very simple select on a certain table in a certain database. Within the properties > permissions of the target database, the ...