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
0
votes
1 answer

Sql Server Agent job failing to execute stored procedure

I have a stored procedure that I can execute in SSMS with a non domain SQL Server user. This stored procedure selects data from tables in one database (DB1) truncates and selects into a table in DB2. The user has datareader,datawriter and dbowner…
0
votes
2 answers

SQL Job (Send Mail) - error formatting query probably invalid parameters

I know this has come up a lot in the past but none of the fixes I've Googled or found on here has worked for me in this instance. I'm running a fairly standard SQL Server Agent Job as a Transact-SQL script with the follow details: (replaced some…
0
votes
1 answer

SSIS package execution succeeds but doesn't do its job

I use SQL Server Agent to fill tables in DataWarehouse. I have about 50 steps in the job and every step is run with a proxy account. And every step works correctly besides one: SSIS package which contains about 20 Execute SQL Tasks which execute…
Michal Hruška
  • 444
  • 2
  • 6
  • 15
0
votes
1 answer

SQL Server 2012 Job Failure - send email

After doing some research here and elsewhere, and trying a few troubleshooting attempts, I come to you good folks for help. In SQL Server 2012, I have a job, with (currently) only one step. That step goes something like this: EXEC…
0
votes
0 answers

Database Backup Failure SQL Server 2012 Enterprise

I am running a split disk backup such as: BACKUP DATABASE [At] TO DISK = N'O:\sql_bak\At_full1.bak', DISK = N'M:\sql_bak\At_full2.bak', DISK = N'L:\sql_bak\At_full3.bak' WITH NOFORMAT, INIT, NAME = N'At-Full Database Backup', SKIP,…
0
votes
1 answer

Whats the best to run sql scripts stored in a text column?

I've got the task to automate the database modification scripts in our simulation server. Each simulation generates a few databases, all based from an common base DB, which is empty. But now is needed to do the same to get the data from last year's…
Fabricio Araujo
  • 3,810
  • 3
  • 28
  • 43
0
votes
0 answers

Reducing PowerShell memory usage per shell

I have some problems with Windows Powershell 4. I need to execute hundreds of very small (Azure) PowerShell scripts. The problem is that each shell uses 50-70 MB when I look in the Task Manager. So i tried to use WSman and reduce…
0
votes
0 answers

SQL Server Agent service account login failure

I am using SQL Server 2014 on a Windows 2012 server. I have several database instances on the server. One of the instances has an error in the log every day at 2 AM. Login failed for user MyDomain\SQLAgentAccount. Reason: Could not find a…
CountyDBA
  • 1
  • 1
0
votes
1 answer

Re-run entire job sql server - not just a step

I'm working on SQL Server Agent and i have some troubles. I need to re-run a job when a step fail, I mean, the entire job - not just the step. Is it possible ? Do you know the best way to do this ? Thanks a lot.
0
votes
2 answers

SQL Server Agent Emails: Error Formatting Query

I was running into an issue when creating and implementing a new SQL server agent job to run and email the results of a simple query: EXEC ms.dbo.sp_send_dbmail @profile_name = 'Main DB Mail Profile', @recipients = 'test@myemail.com', @subject =…
Benjamin S
  • 575
  • 1
  • 7
  • 21
0
votes
3 answers

Using current database name in T-SQL has Using statement

I have application runs T-SQL statements to update more than one database the problem is i'm using the following t-sql USE [msdb] GO DECLARE @jobId BINARY(16) EXEC msdb.dbo.sp_add_job @job_name=N'test2', @enabled=1, …
Amr Elnashar
  • 1,739
  • 12
  • 33
  • 53
0
votes
0 answers

grant user execute access to a specific sql server agent job

I would like to grant a SQL user account access to execute two specific SQL Agent jobs. I know I can grant the user SQLAgentOperatorRole, but this allows them to see and execute all SQL Agent jobs. I would prefer that they are only able to see and…
Braden
  • 3
  • 3
0
votes
1 answer

SQL Server Agent available on Azure?

I would like to delete records from an database table on Azure when the table reaches a certain size. I would normally do this by scheduling a stored procedure job using SQL Server Agent. Is the SQL Server Agent available on databases held on…
stewmuskie
  • 19
  • 4
0
votes
1 answer

SSIS package working on stand alonne, but fail with SQL Agent

I have an SSIS package, that worked just fine for months. It was planned in an SQL Agent Job, and launched every day, as the 8 step of the 23-steps job. Then all out of nowhere (understand, with absolutely no changes), the said package/step, started…
Enauofas
  • 35
  • 1
  • 1
  • 6
0
votes
1 answer

SQL Agent cannot access UNC share

I have a SSIS package which creates a folder in an UNC share and then creates a file there (using script task). The domain account which is used by SSIS and Agent has all the possible permissions in the DB computer and the share computer. It always…
BuahahaXD
  • 609
  • 2
  • 8
  • 24