Questions tagged [sql-server-agent]

SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks, which are called jobs. SQL Server Agent uses SQL Server to store job information. Jobs contain one or more job steps. Each step contains its own task, for example, backing up a database. SQL Server Agent can run a job on a schedule, in response to a specific event, or on demand.

From Microsoft.com:

SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks, which are called jobs. SQL Server Agent uses SQL Server to store job information. Jobs contain one or more job steps. Each step contains its own task, for example, backing up a database. SQL Server Agent can run a job on a schedule, in response to a specific event, or on demand.

483 questions
1
vote
1 answer

SQL Server Agent - to update SQL table from Oracle

this is a newbie questions... is it possible to write a job that will update my sql (SQL Server 2008) table nightly - from an oracle db? i can't seem to find any tutorials online. please help. i have already created a ODBC connection in the Data…
Madam Zu Zu
  • 6,437
  • 19
  • 83
  • 129
1
vote
3 answers

SSIS Package Runs from Catalog, not from SQL Server Agent (Same User)

I have a SSIS package, developed for SQL Server 2012, that uses a script component to open an Excel workbook and execute a macro. This package runs in visual studio, and I am able to deploy to SQL Server 2012. In SQL Server, I am able to execute…
1
vote
0 answers

SSIS package / SQL Server Agent job maximum execution time

I have 2 SSIS packages started by a single SQL Server Agent Job. The first package took approximatively 2h30 and the second failed after 0:50. Unfortunately, I don't know where or why it failed but I want to first check if there are some limitations…
David GROSPELIER
  • 772
  • 1
  • 9
  • 35
1
vote
0 answers

Unable to set EXECUTE permissions on users. Permission Denied when running SQL Server Agent job

I'm getting the following error when starting a SQL Server Agent Job: The EXECUTE permission was denied on the object 'sp_...', database 'msdb', schema 'dbo' I can see this is a duplicate of many questions asked before, but none of those solutions…
hello123
  • 951
  • 2
  • 15
  • 25
1
vote
1 answer

SQL job does not open cmd

I have an SSIS package which has a script task that executes a program via cmd promt. The task runs fine when I execute the package from the integrated service catalog however when I run it as part of a sql server agent job the job reports…
Nathan TSQL_Jr
  • 117
  • 1
  • 8
1
vote
0 answers

SQL Server Agent Job is finished successfully but not executing (.appref-ms) files from an SSIS package

I am trying to execute a few executable files (.appref-ms) once a day. These files are essentially console applications that I created in C#. I created an SSIS package that run all of the files at the same time. In Visual Studio when I execute the…
Victor_Tlepshev
  • 478
  • 6
  • 19
1
vote
2 answers

Running SSIS Package in scheduled job

I'm trying to run SSIS package stored on my local PC through SQL Server Agent job , and it always fails. When run through my Login, it's always success. Below is the error I get: Executed as user: DESKTOP\sa. Microsoft (R) SQL Server Execute…
Sindhu B
  • 59
  • 8
1
vote
0 answers

Attunity driver fails when run from sql server agent job

This is unique. My package runs perfectly in Visual Studio debug mode, but when I put it to run via sql server agent, I get the following error: 'Oracle source cannot run on installed edition of Integration Services. It requires Enterprise…
Prabhat G
  • 2,974
  • 1
  • 22
  • 31
1
vote
1 answer

SQL Server Agent Job Is Idle - Duration Still Increasing

I have a SQL Agent Job that shows as idle in the Activity Monitor but the time duration keeps increasing. The job seems to have stopped as I've tried stopping it manually and SQL advises the job isn't running. SysJobActivity doesn't have a…
Brian
  • 83
  • 12
1
vote
1 answer

SSIS Package Running via SQL Server Agent Unable to Modify Variables

First the basics: I'm using VS2015 SSDT to create a SSIS Package to pick up two files on a DFSR share (Windows 2012 R2) that are then imported into a SQL Server 2016 database. The package is run via SQL Server Agent. The SQL Server Agent is running…
1
vote
2 answers

Cause of Intermittent SSIS Job failure with exit code -1073741819?

I am relatively new to SSIS. In the environment I am working in, I have access to a Dev database only. I create and test packages, then send these to a DBA to execute on our UAT environment. One of these packages, which is importing XML files, is…
YogoZuno
  • 405
  • 6
  • 25
1
vote
2 answers

Server Agent PowerShell job step - Difference between calling a file and calling a command

I have some simple PowerShell code to insert a value into a table: Invoke-SqlCmd -ServerInstance myserver -Query 'insert into Database.dbo.tbl values (1)' and if I save it as a file, I can call it in a CmdExec job step. However, can anyone tell me…
beehive
  • 93
  • 3
  • 11
1
vote
0 answers

Azure VM SQL Server Agent EXE/BAT file on shared drive

I have an Azure VM (Windows Server 2016 Datacenter) that is running MS SQL Server 2017. I've created several SSIS packages that use Execute Process Tasks to run EXEs and batch files that are stored on my Azure file storage account (i.e. \[storage…
1
vote
0 answers

SSIS package connection is not working in sql server agent

I'm trying to connect to a AS/400 system with a IBM DB2 for i5/OS IBMDA400 OLE DB Provider as a connector. I want to write data to a table in the AS/400 system and read data from the same location. So I build a package that writes data from a sql…
1
vote
1 answer

Running batch with BCP commands via SQL Server Agent

When I run batch file with: BCP "SELECT * FROM [KW_GRECOS].[dbo].[V_G076a]" queryout "G:\Bulk\V_G076a_new.bcp" -N -S localhost -T -E BCP "[KW_GRECOS].[dbo].[hist_V_G076a]" IN "G:\Bulk\V_G076a_new.bcp" -N -S localhost -T -E -b 1000000 -h…
Peter_K
  • 93
  • 1
  • 10