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
0 answers
20 views

xp_sqlagent_enum_jobs - Unable to enumerate Jobs due to failure to obtain serialization object

I a procedure whose job is to ensure that certain SQL agent jobs do not overlap with other jobs, the logic is as follows(Simplified): CREATE TABLE #Job ( job_id UNIQUEIDENTIFIER NOT NULL ,...
user avatar
0 votes
3 answers
38 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 ...
user avatar
  • 2,128
1 vote
2 answers
23 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: ...
user avatar
  • 137
0 votes
1 answer
23 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 ...
user avatar
  • 2,128
0 votes
1 answer
25 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 ...
user avatar
  • 4,384
1 vote
2 answers
48 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 ...
user avatar
3 votes
2 answers
353 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 ...
user avatar
  • 78
0 votes
0 answers
29 views

Scheduling a pgagent job for every alternate friday

I am unable to find a way to schedule a pgagent job for every alternate Friday. Can anybody help me with that? Below is the code for the shell script that I include in pgagent job: #!/bin/bash #backup ...
user avatar
0 votes
0 answers
46 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 ...
user avatar
0 votes
0 answers
22 views

SSIS packages who contains ('Power Query Source') can not be called by SQL Agent

I have ssis package who use a power query source where I introduced a power query in order to get clear data from a text file and then used a 'OLE DB Destination' to copy the data to a new table in my ...
user avatar
0 votes
1 answer
23 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 ...
user avatar
0 votes
4 answers
76 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 ...
user avatar
0 votes
1 answer
37 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 ...
user avatar
  • 411
0 votes
1 answer
182 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 ...
user avatar
0 votes
0 answers
43 views

Scheduled job not present on database, but visible from dba_scheduler_job_log

I'm seeing this error in the alert log (sorry, it's in italian!): *** 2021-09-14 23:50:17.891 *** SESSION ID:(249.6897) 2021-09-14 23:50:17.891 *** CLIENT ID:() 2021-09-14 23:50:17.891 *** SERVICE ...
user avatar
1 vote
0 answers
103 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 ...
user avatar
2 votes
1 answer
154 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 ...
user avatar
  • 33
0 votes
1 answer
176 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 ...
user avatar
0 votes
2 answers
48 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 ...
user avatar
0 votes
1 answer
50 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, ...
user avatar
  • 1
0 votes
0 answers
118 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 ...
user avatar
  • 1
-1 votes
1 answer
76 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 ...
user avatar
  • 1
0 votes
0 answers
39 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 ...
user avatar
  • 21
0 votes
2 answers
59 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 ...
user avatar
  • 1
2 votes
1 answer
90 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 ...
user avatar
0 votes
1 answer
64 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 ...
user avatar
2 votes
1 answer
57 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 ...
user avatar
  • 1,731
1 vote
1 answer
92 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 ...
user avatar
  • 21
1 vote
1 answer
1k views

Can not 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 ...
user avatar
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 ...
user avatar
  • 2,127
1 vote
1 answer
94 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. ...
user avatar
  • 1,048
1 vote
1 answer
146 views

Installing SSIS package outside of SSIDB catalog

I'm trying to simplify deployment of 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 ...
user avatar
  • 133
0 votes
1 answer
78 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 ...
user avatar
1 vote
1 answer
447 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 ...
user avatar
1 vote
0 answers
53 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 ...
user avatar
0 votes
3 answers
548 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 ...
user avatar
  • 123
0 votes
1 answer
893 views

How to reset failures count to zero when using dbms_jobs?

Is there some way to reset the failure count column to 0 in dba_jobs view? Sometimes a job fail and after fix it I need to wait the next scheduled execution, during this time I'd like to reset to 0 to ...
user avatar
  • 506
0 votes
0 answers
42 views

Can't connect Oracle 11g2 Database to Job Scheduler Agent on client/application server

Running 11g2 database on one Linux server and installed Oracle client and job scheduler agent on separate Linux (application) server sitting next to it. The connection betweeen them worked fine for ...
user avatar
  • 149
1 vote
1 answer
138 views

Target server is not communicating(polling) with master SQL Server

We set up multi-server administration to create a job on the master which are executed on target servers, and we had this issue because the target server was shut down after a virus attack and we set ...
user avatar
  • 11
-1 votes
2 answers
54 views

Rebuild Indexes [duplicate]

We have a database named WSS_Us_App in our Production SQL Server 2014. In this database all of the indexes need to be rebuilt as most have a fragmentation level greater than 50%. I plan to rebuild ...
user avatar
2 votes
1 answer
182 views

Can't take backup to the shared folder

Need your help. My sql job is not able to take backup to the shared folder although the domain account, under which the sql agent service account is running, has full permission on that shared folder. ...
user avatar
  • 1,163
1 vote
2 answers
53 views

SQL SERVER Detailed Backup Report

I need to create a script that gives the report for the following information: Backup Job Name Databases that have been backed up in the last 24 hours Size of each DB backup Start time of backup End ...
user avatar
4 votes
3 answers
764 views

How to prevent parallel running of SQL Agent jobs

What would be good ways to design a group of jobs such that they can never run at the same time? I am looking for a generic concept, like a semaphore, which makes it easier to ensure that some jobs ...
user avatar
  • 235
2 votes
1 answer
184 views

Job management: How to get the next running date by querying MSDB

Table sysjobschedules contains 2 columns next_run_date and next_run_time. With the help of sysschedules and column enable it should be easy to determine the next running date/time of a specific job. ...
user avatar
0 votes
2 answers
724 views

Maximum Error Count Reached

I created a maintenance plan to backup all the databases locally on a folder in E Drive. Out of nowhere, the job is failing occasionally. sometimes the job runs successfully and sometimes sends an ...
user avatar
2 votes
0 answers
541 views

PowerShell Script Not Working on SQL Server Job Step

I've some .CSV files generated in a shared folder \\SERVER01\DIR\Current and would like to copy to another folder in same server \\SERVER01\DIR\Archive. The script needs to copy, rename files adding ...
user avatar
  • 21
0 votes
1 answer
69 views

Report server scheduled job location

I inherited a SQL Server environment. In (database engine) SQL Server Agent are two jobs defined that apparently belong to the report server. First and only step in the first job: exec [ReportServer]....
user avatar
  • 101
0 votes
1 answer
495 views

sp_update_schedule says @schedule_id does not exist

I wrote a script that reads job schedules from msdb.dbo.sysschedules and runs sp_update_schedule to change the active_start_time for a given subset of jobs. In each case, sp_update_schedule fails with ...
user avatar
  • 820
-1 votes
2 answers
428 views

Why would a scheduled job fail in SQL Developer?

I am trying to create a scheduled job in Oracle SQL Developer that would run once a month and I am testing the Scheduler/Jobs feature where I have created a simple SQL query to test the ability to do ...
user avatar
1 vote
2 answers
281 views

Schedule Job to Start at Different Steps

I am working on a system that generates a number of recurring emails as parts of various jobs scheduled in SQL Server Agent. The emails contain text-based reports that are loosely associated to the ...
user avatar
  • 1,074

1
2 3 4 5
8