Questions tagged [sql-job]

A job is a specified series of operations performed sequentially

Jobs define an administrative task that can be executed one or more times (manually or via a schedule) and monitored for success or failure each time it executes

272 questions
0
votes
3 answers

Delete and Update in same time in mssql

I have a job on mssql server for deleting.But my wish is that update another table before deleting. I have two table which is connected by "user_id" column and my tables names are "UserInfo" and "AdvertInfo", they are connected with user_id column.…
KAYA
  • 49
  • 3
  • 11
0
votes
2 answers

Run a SQL Job From an asp.net mvc 4 web application

I need some help in figuring out how to start a SQL Server Agent Job from an asp.net mvc web application. The Job needs to be started on the click of a button. What is the right way of doing it? I just installed hangfire and I'm trying to configure…
newbie
  • 173
  • 4
  • 21
0
votes
0 answers

Any other possible ways to make a join like this @parameterServerName.msdb.dbo.sysjobs?

Building this Proc that will check if the job is running on one server and will start other job on the other server. Problem that I have here is: I cannot make a join this way INNER JOIN @parameterServerName.msdb.dbo.sysjobs Is there a way that I…
user8513344
0
votes
2 answers

MS SQL job is running well but it will take double time as per given time

I was created a job in MS-SQL Server Agent which running schedule is every 10 minutes time. But it run after 20 minutes continuously. What I did wrong in setting? enter image description here
Sagar
  • 15
  • 6
0
votes
1 answer

How to run the .exe or .bat files(with arguments) present in a shared/remote location using sql server jobs

I need to run a .exe and .bat files which are present in a different server locations using sql jobs. After doing an extensive search i could come up with below options Inside sql job step setting "Operating system(CmdExec)" as type and the…
Dinesh
  • 1
  • 1
  • 1
0
votes
3 answers

Set datetime variable to next day at 12 am using sql

I am writing a SQL job and I have to set the schedule running stamp to daily at 12:00:00 AM. The date format should be 2017-05-10 00:00:00.000 I have done something like this. But I don't know how to set the exact date and time(which is crucial).…
0
votes
1 answer

Log for affected rows of select and insert command - SQL Server- Help needed

so I have some commands which I want to put in a stored procedure(then stored procedure executed by a job) to automate. What I need is to make some sort of log(file or table?!) where to have the affected rows a select or insert did and also how long…
0
votes
0 answers

Configuration option 'xp_cmdshell' changed from 1 to 1. Run the RECONFIGURE statement to install

We have a full and diff restore db job created and it is failing with the below error. We have a production server which run the full DB back up SQL jobs of all the DB's and saves them in a different server(example server X) on the server X we …
darshan s
  • 1
  • 1
  • 1
0
votes
1 answer

SSIS package generates blank excel file when executed from SQL Job

I have an SSIS package that simply exports a database field into a excel file. When I run it in BIDS OR SSMS it outputs perfectly however when I run it from an SQL Job it only creates an empty excel file.
MAK
  • 1
0
votes
0 answers

Running the same SSIS package at the same time with different parameter values

I have a stored procedure which generates a job which in turn calls a SSIS Package and passes on an operation id variable to the SSIS pacakge. When two users run the SP at exactly the same time the result of the operation is as follows: user A:…
Jimmy Hodgson
  • 183
  • 11
0
votes
1 answer

How to find spid of SQL Agent job that is running or has already run?

I am having difficulties trying to find the SPID of a job that is still running over a certain timeframe or has already ran. Does anyone know where I can find that? I do know that I can look at the master.sys.sysprocesses table to find the spid's…
Paul
  • 373
  • 1
  • 5
  • 12
0
votes
3 answers

SSIS error while running package using SQL job

I have SSIS package that import data from excel to SQL database 2012. the package runs fine and deliver what it supposed to do when I run it on visual studio. However when I try SQL job to run the package it keep giving me error massage below.…
zazzu
  • 37
  • 9
0
votes
0 answers

SSIS Package with Dynamically creating Excel destination is not working from SQL Server Jobs

I'm currently working on a requirement to get data from sql server into Excel destination. I used the exact method from this link " https://sqljunkieshare.com/2012/02/28/how-to-create-and-map-excel-destination-dynamically-in-ssis/ " Except the…
gopi nath
  • 186
  • 3
  • 15
0
votes
3 answers

How to get results from sql-jobs without running it every time

I am new to SSC. My scenario is that I have created tables A, B, and C which are related to one another. Whenever I need data from these three tables I always need to join them to get results. It's a bit time consuming to do this all the…
0
votes
1 answer

SQLNCLI10 Error when executing stored procedure in SQL Server

I have a job running in one of my server and which uses a linked server and the linked server changed as part of upgrade and now my job fails everyday. I am getting the following error OLE DB provider "SQLNCLI10" for linked server "linked server"…
Sivajith
  • 1,181
  • 5
  • 19
  • 38