Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Friday, March 30, 2012

job_id not found

Hi
I am getting a wierd message when I click on the SnapShot Agent.
Error 14262, The Specified @.job_id (###) does not exist
any idea what could have caused this and what I can do to resolve this
thanks
P
Has someone deleted the job using the management folder in EM? Have a look
in the jobs subfolder and see if the snapshot job has been removed or not.
If it has, then the easiest solution is to set up the publication once
again.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Job that runs past the next scheduled start time

Hello group
I have a problem that I'm considering if the SQL Server Agent and Job
scheduling can help me solve.
I need to check some status very often (approximately every 30. sec.). I
have learned that you can get the job sceduling to start this often, so that
should not be a problem.
Normaly the job will just check this status and then stop.
Once in a while the status will signal that further processing should take
place. This processing may last more than 30 seconds, and therefore last
beyond the next start time of the job.
Is this a problem?
Will I have the same job running multiple times? That is not good.
When will the next job then start? Will it start 30 sec. after the long
running job completed, or will jobs queue op while the long running job is
processing so that I will get multiple starts when the first job completes?
I hope that you can understand my issue.
Regards
Anders> Will I have the same job running multiple times?
No. Agent is simple in this regard. If the job is already running when it is supposed to start, then
Agent will *not* start another instance of that job.
> When will the next job then start? Will it start 30 sec. after the long running job completed, or
> will jobs queue op while the long running job is processing so that I will get multiple starts
> when the first job completes?
Neither. It will start when it is supposed to. Say for simplicity of this example that you want to
start it every minute. Now, you have one occasion where it starts at 13:00:00 and it runs for 110
seconds. The job will not start at 13:01:00 since it is already running. As I said, this occasion
takes 110 seconds so it finishes at 13:01:50. Next time it is supposed to start is 13:02:00, and now
it isn't running so Agent will start it.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Anders K. Olsen" <akol_dk@.hotmail.com> wrote in message
news:OM4PQuc%23HHA.700@.TK2MSFTNGP05.phx.gbl...
> Hello group
> I have a problem that I'm considering if the SQL Server Agent and Job scheduling can help me
> solve.
> I need to check some status very often (approximately every 30. sec.). I have learned that you can
> get the job sceduling to start this often, so that should not be a problem.
> Normaly the job will just check this status and then stop.
> Once in a while the status will signal that further processing should take place. This processing
> may last more than 30 seconds, and therefore last beyond the next start time of the job.
> Is this a problem?
> Will I have the same job running multiple times? That is not good.
> When will the next job then start? Will it start 30 sec. after the long running job completed, or
> will jobs queue op while the long running job is processing so that I will get multiple starts
> when the first job completes?
> I hope that you can understand my issue.
> Regards
> Anders
>|||Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23GdwCgd%23HHA.1208@.TK2MSFTNGP03.phx.gbl...
>> Will I have the same job running multiple times?
> No. Agent is simple in this regard. If the job is already running when it
> is supposed to start, then Agent will *not* start another instance of that
> job.
Sometimes simple is good :-)
>> When will the next job then start? Will it start 30 sec. after the long
>> running job completed, or will jobs queue op while the long running job
>> is processing so that I will get multiple starts when the first job
>> completes?
> Neither. It will start when it is supposed to. Say for simplicity of this
> example that you want to start it every minute. Now, you have one occasion
> where it starts at 13:00:00 and it runs for 110 seconds. The job will not
> start at 13:01:00 since it is already running. As I said, this occasion
> takes 110 seconds so it finishes at 13:01:50. Next time it is supposed to
> start is 13:02:00, and now it isn't running so Agent will start it.
This is fine for our purposes, so we will continue along this line.
Thank you for your help.
Regards
Anderssql

Monday, March 26, 2012

Job Sequencing ?

I have a job that runs a batch file, tsql step, and then another batch file.
My question is will the agent say the first step is complete and move on
when it starts the batch file or will it know to wait until after the batch
has ran to start the second step?
TIA
--
nivekHi
It waits for the prior step to finish.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"nivek" <eckart_612@.hotmail.com> wrote in message
news:36GdnYIXz77QzN3fRVn-3A@.centurytel.net...
> I have a job that runs a batch file, tsql step, and then another batch
file.
> My question is will the agent say the first step is complete and move on
> when it starts the batch file or will it know to wait until after the
batch
> has ran to start the second step?
> TIA
> --
> nivek
>
>
>

Job Sequencing ?

I have a job that runs a batch file, tsql step, and then another batch file.
My question is will the agent say the first step is complete and move on
when it starts the batch file or will it know to wait until after the batch
has ran to start the second step?
TIA
nivekHi
It waits for the prior step to finish.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"nivek" <eckart_612@.hotmail.com> wrote in message
news:36GdnYIXz77QzN3fRVn-3A@.centurytel.net...
> I have a job that runs a batch file, tsql step, and then another batch
file.
> My question is will the agent say the first step is complete and move on
> when it starts the batch file or will it know to wait until after the
batch
> has ran to start the second step?
> TIA
> --
> nivek
>
>
>

Job Sequencing ?

I have a job that runs a batch file, tsql step, and then another batch file.
My question is will the agent say the first step is complete and move on
when it starts the batch file or will it know to wait until after the batch
has ran to start the second step?
TIA
nivek
Hi
It waits for the prior step to finish.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"nivek" <eckart_612@.hotmail.com> wrote in message
news:36GdnYIXz77QzN3fRVn-3A@.centurytel.net...
> I have a job that runs a batch file, tsql step, and then another batch
file.
> My question is will the agent say the first step is complete and move on
> when it starts the batch file or will it know to wait until after the
batch
> has ran to start the second step?
> TIA
> --
> nivek
>
>
>
sql

job scheduling

Hello,
Is it possible to schedule the sql agent to run a job every so many
seconds? I may have a need to schedule a job at a certain interval of
seconds and the sql agent gui scheduler seems to only allow scheduling
by the minute or more.
Thanks,
Greg
http://sqldev.net/sqlagent/SQLAgentR...JobsInSecs.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Greg" <gjackson@.thq.com> wrote in message news:d9ii90l53hekbeg32g0cfcmfhavuak1dm5@.4ax.com...
> Hello,
> Is it possible to schedule the sql agent to run a job every so many
> seconds? I may have a need to schedule a job at a certain interval of
> seconds and the sql agent gui scheduler seems to only allow scheduling
> by the minute or more.
> Thanks,
> Greg
|||If you are going to have something run every so many seconds you might
consider having a never ending stored procedure that uses the WAITFOR DELAY
command to control your running of some commands every few seconds.
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Greg" <gjackson@.thq.com> wrote in message
news:d9ii90l53hekbeg32g0cfcmfhavuak1dm5@.4ax.com...
> Hello,
> Is it possible to schedule the sql agent to run a job every so many
> seconds? I may have a need to schedule a job at a certain interval of
> seconds and the sql agent gui scheduler seems to only allow scheduling
> by the minute or more.
> Thanks,
> Greg

Job scheduling

Hi,

I have two jobs scheduled on the Agent. Each job has ten steps. The next step is executed only if the previous suceeds.

I want Job 2 to execute only if Job 1 suceeds. How do I schedule that?

I was thinking that I can have the ten steps of Job 2 as steps (11 to 20) of Job 1 with each step executing after the previous one succeeds. If I do that then I can get rid of Job 2.

Let me know what approach you would advise.

Thanksthats what i would do|||I think that is the only option. I am not aware of any other way of controlling the job sequence.|||You don't have to merge two jobs into one. At the end of job1, on step 10 choose "go to next step if succeeds" and then add one more step with command:

exec sp_start_job @.job_name = job2

Job Scheduling

How do I schedule the jobs to run in sequence? I have created a package to
call the sql server agent jobs in sequence but looks like all the jobs are
running at the same time, not waiting for the other jobs to complete. I did
put the constriants not to run the second job until the first job is
complete. But still it is not behaving as instructed.
Any thoughts,
Thanks,
MariJobs run asynchronously and independently of each other.
You need to make ONE job and call each "job" as an individual step. That
way, "job"/step 2 will not start until "job"/step 1 is complete (and you can
terminate the whole sequence on an individual step failure, or you can have
individual step failures ignored and just move to the next step).
"Maria" <Maria@.discussions.microsoft.com> wrote in message
news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
> How do I schedule the jobs to run in sequence? I have created a package to
> call the sql server agent jobs in sequence but looks like all the jobs are
> running at the same time, not waiting for the other jobs to complete. I
> did
> put the constriants not to run the second job until the first job is
> complete. But still it is not behaving as instructed.
> Any thoughts,
> Thanks,
> Mari|||Thank you Aaron. But there is no option to define the "type" for sql server
Agent jobs to call the another job. I guess you know what I am talking.
When I am creating the 'job', for the step 1, there is no Agent Jobs
options. We have only IS package or AS or activeX etc., but not the agent
jobs : (
Tks
"Aaron Bertrand [SQL Server MVP]" wrote:

> Jobs run asynchronously and independently of each other.
> You need to make ONE job and call each "job" as an individual step. That
> way, "job"/step 2 will not start until "job"/step 1 is complete (and you c
an
> terminate the whole sequence on an individual step failure, or you can hav
e
> individual step failures ignored and just move to the next step).
>
> "Maria" <Maria@.discussions.microsoft.com> wrote in message
> news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
>
>|||If you are using SQL Server 2005, Service Broker can be used to guarantee
in-order execution:
http://www.microsoft.com/technet/te...lt.a
spx
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Maria" <Maria@.discussions.microsoft.com> wrote in message
news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
> How do I schedule the jobs to run in sequence? I have created a package to
> call the sql server agent jobs in sequence but looks like all the jobs are
> running at the same time, not waiting for the other jobs to complete. I
> did
> put the constriants not to run the second job until the first job is
> complete. But still it is not behaving as instructed.
> Any thoughts,
> Thanks,
> Mari|||Maria wrote:
> How do I schedule the jobs to run in sequence? I have created a package to
> call the sql server agent jobs in sequence but looks like all the jobs are
> running at the same time, not waiting for the other jobs to complete. I di
d
> put the constriants not to run the second job until the first job is
> complete. But still it is not behaving as instructed.
> Any thoughts,
> Thanks,
> Mari
Are you referring to SQL Agent jobs, or tasks within a DTS package?|||It is "Execute SQL Server Agent Job Task" under Maintenance Plan Tasks for a
DTS package.
"Tracy McKibben" wrote:

> Maria wrote:
> Are you referring to SQL Agent jobs, or tasks within a DTS package?
>|||Maria wrote:
> It is "Execute SQL Server Agent Job Task" under Maintenance Plan Tasks for
a
> DTS package.
>
I'm not familiar with that one. So, you're using a DTS package to
execute Maintenance Plan tasks. Is the DTS package then going to be
scheduled to run via SQL Agent? Seems sorta bass-ackwards... Am I
completely not understanding what you're trying to accomplish?|||I think your understanding is right. But looks like that doesn't work. When
I
created the package to run all these jobs in a sequence, all thejobs are
running at the same time though I put constraints on it.
Hope this is clear.
thanks
"Tracy McKibben" wrote:

> Maria wrote:
> I'm not familiar with that one. So, you're using a DTS package to
> execute Maintenance Plan tasks. Is the DTS package then going to be
> scheduled to run via SQL Agent? Seems sorta bass-ackwards... Am I
> completely not understanding what you're trying to accomplish?
>|||Hi Roger,
I never used the Broker Service. Could you give some more details how to use
this service to schedule batch jobs.
Thanks
"Roger Wolter[MSFT]" wrote:

> If you are using SQL Server 2005, Service Broker can be used to guarantee
> in-order execution:
> http://www.microsoft.com/technet/te...lt
.aspx
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Maria" <Maria@.discussions.microsoft.com> wrote in message
> news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
>
>|||Maria wrote:
> I think your understanding is right. But looks like that doesn't work. Whe
n I
> created the package to run all these jobs in a sequence, all thejobs are
> running at the same time though I put constraints on it.
>
Ok... Well, that leads me to ask, why not just let the maintenance plan
schedule the jobs in SQL Agent like it's supposed to, instead of
wrapping them in a DTS package like this?
I'll go one step further, and suggest that you dump the maintenance plan
altogether, and write your own processes to do what the maintenance plan
offers you. Write your own BACKUP job, write your own index maintenance
routine, don't shrink your databases. You'll learn alot more about your
environment by doing so...sql

job scheduling

Hello,
Is it possible to schedule the sql agent to run a job every so many
seconds? I may have a need to schedule a job at a certain interval of
seconds and the sql agent gui scheduler seems to only allow scheduling
by the minute or more.
Thanks,
Greghttp://sqldev.net/sqlagent/SQLAgent...gJobsInSecs.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Greg" <gjackson@.thq.com> wrote in message news:d9ii90l53hekbeg32g0cfcmfhavuak1dm5@.
4ax.com..
.
> Hello,
> Is it possible to schedule the sql agent to run a job every so many
> seconds? I may have a need to schedule a job at a certain interval of
> seconds and the sql agent gui scheduler seems to only allow scheduling
> by the minute or more.
> Thanks,
> Greg|||If you are going to have something run every so many seconds you might
consider having a never ending stored procedure that uses the WAITFOR DELAY
command to control your running of some commands every few seconds.
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Greg" <gjackson@.thq.com> wrote in message
news:d9ii90l53hekbeg32g0cfcmfhavuak1dm5@.
4ax.com...
> Hello,
> Is it possible to schedule the sql agent to run a job every so many
> seconds? I may have a need to schedule a job at a certain interval of
> seconds and the sql agent gui scheduler seems to only allow scheduling
> by the minute or more.
> Thanks,
> Greg

job scheduling

Hello,
Is it possible to schedule the sql agent to run a job every so many
seconds? I may have a need to schedule a job at a certain interval of
seconds and the sql agent gui scheduler seems to only allow scheduling
by the minute or more.
Thanks,
Greghttp://sqldev.net/sqlagent/SQLAgentRecuringJobsInSecs.htm
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Greg" <gjackson@.thq.com> wrote in message news:d9ii90l53hekbeg32g0cfcmfhavuak1dm5@.4ax.com...
> Hello,
> Is it possible to schedule the sql agent to run a job every so many
> seconds? I may have a need to schedule a job at a certain interval of
> seconds and the sql agent gui scheduler seems to only allow scheduling
> by the minute or more.
> Thanks,
> Greg|||If you are going to have something run every so many seconds you might
consider having a never ending stored procedure that uses the WAITFOR DELAY
command to control your running of some commands every few seconds.
--
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Greg" <gjackson@.thq.com> wrote in message
news:d9ii90l53hekbeg32g0cfcmfhavuak1dm5@.4ax.com...
> Hello,
> Is it possible to schedule the sql agent to run a job every so many
> seconds? I may have a need to schedule a job at a certain interval of
> seconds and the sql agent gui scheduler seems to only allow scheduling
> by the minute or more.
> Thanks,
> Greg

Job Scheduler

Hello,

I am have problems running a couple of jobs. It makes no sense. I have checked and made sure the agent service is running the same user level permissions as I am. I run the job manually from SMS and it works fine.

User is a Windows Login.

Any suggestions would be greatly appreciated.

Date 6/11/2007 6:00:01 AM
Log Job History (BidBackLog)

Step ID 1
Server TWSQLRPTS
Job Name BidBackLog
Step Name Step1
Duration 00:00:21
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: TWDOMAIN\SQLADMIN. ... 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 6:00:01 AM Error: 2007-06-11 06:00:22.50 Code: 0xC0202009 Source: BidBacklog Connection manager "TWSQLRPTS.HomeBASE" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login failed for user 'TWDOMAIN\SQLADMIN'.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Cannot open database "HomeBASE" requested by the login. The login failed.". End Error Error: 2007-06-11 06:00:22.50 Code: 0xC020801C Source: DTSTask_DTSDataPumpTask_1 OLE DB Source [1] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager ... The package execution fa... The step failed.

TrussworksLeo1 wrote:

Hello,

I am have problems running a couple of jobs. It makes no sense. I have checked and made sure the agent service is running the same user level permissions as I am. I run the job manually from SMS and it works fine.

User is a Windows Login.

Any suggestions would be greatly appreciated.

Date 6/11/2007 6:00:01 AM
Log Job History (BidBackLog)

Step ID 1
Server TWSQLRPTS
Job Name BidBackLog
Step Name Step1
Duration 00:00:21
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: TWDOMAIN\SQLADMIN. ... 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 6:00:01 AM Error: 2007-06-11 06:00:22.50 Code: 0xC0202009 Source: BidBacklog Connection manager "TWSQLRPTS.HomeBASE" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login failed for user 'TWDOMAIN\SQLADMIN'.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Cannot open database "HomeBASE" requested by the login. The login failed.". End Error Error: 2007-06-11 06:00:22.50 Code: 0xC020801C Source: DTSTask_DTSDataPumpTask_1 OLE DB Source [1] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager ... The package execution fa... The step failed.

The user, TWDOMAIN\SQLADMIN doesn't have access to the databases... You're likely using windows authentication for your database connections, and when Agent runs the job, the user account is that of the SQL Server service account. (In this case ...\SQLADMIN)|||

Phil,

Thanks for the reply.

I have checked the permissions. The user is the owner of the databases that it is writting to, but it reads from a database that has mirroring setup. It will not let me change permisssions on that database. Do you know a way around this?

Thanks, Leo

Friday, March 23, 2012

job schedule information

Hi,
Does anyone has a script to find out what are the scheduled timining for all sql server agent jobs.
I'm trying to get the result with the following query, it doen't seem working..

select sj.name,
case sjs.freq_type
when '1 ' then 'Once'
when '4' then 'Daily'
when '8' then 'Weekly'
when '16' then 'Monthly'
when '32' then 'Monthly relative'
when '64' then 'When SQL Server Agent starts' end as Frequency,
case sjs.freq_interval
when '1' then 'Sunday'
when '2' then 'Monday'
when '4' then 'Tuesday'
when '8' then 'Wednesday'
when '16' then 'Thursday'
when '32' then 'Friday'
when '64' then 'Saturday' end as DAY
from sysjobs sj, sysjobschedules sjs
where sj.job_id = sjs.job_id

Any help would be greately appreciated.
ThanksThat should work fine. Just remember to run that against the msdb database!

Or you could just do...

select sj.name,
case sjs.freq_type
when '1 ' then 'Once'
when '4' then 'Daily'
when '8' then 'Weekly'
when '16' then 'Monthly'
when '32' then 'Monthly relative'
when '64' then 'When SQL Server Agent starts' end as Frequency,
case sjs.freq_interval
when '1' then 'Sunday'
when '2' then 'Monday'
when '4' then 'Tuesday'
when '8' then 'Wednesday'
when '16' then 'Thursday'
when '32' then 'Friday'
when '64' then 'Saturday' end as DAY
from msdb..sysjobs sj, msdb..sysjobschedules sjs
where sj.job_id = sjs.job_id|||It not working the way i wanted. I wanted to get something like..
if the job runs every 10 min between 6 am to 6 pm.. i need to get that info also.
Any suggessions.

Job Schedualing

Hello,

I m using Sql server 2005 express and sql management studio express.

Just wonder if we have sql agent for them so I can do job scheduling.

Otherwise.. do we have sql agent for full edition of sql 2005.

Due to I m really new to asp.net and sql server, how do we usually do schedule work?

Thanx in advance,

Regards,

Elton

The most common way is to use the built in windows Scheduler.... but I found this solution on Code Project.

Job runs for a long time in SQL Server Agent 2005

I have an exe in C# in .Net 1.1. This accesses an Oracle database and an SQL Server 2000 database. It is scheduled in SQL Server Agent. It runs for normally 30 seconds and stops

Recently we migrated the database to SQL Server 2005. We created this job manually in SQL Server Agent. Even after running for 3 minutes it never stops (abnormal)

However this exe runs normally in the Windows 2003 scheduler and the command prompt.

Am stumped for an answer.

Any help

Thanks and regards

jarathna

Do have relevant oracle client drivers installed on this SQL 2005 instance?

Ibelieve this is something related to the Operating system related process, if this is scheduled via SQLagent job then ensure SQLserver serivces do have relevant privileges on that C# & Oracle based components share.

job run when idle

I'm trying to get a SQL Agent scheduled job working using the Schedule
Type of 'Start whenever the CPUs become idle', but it doesn't seem to
be working.
I setup a maintenance task to check db integrity (as a test), set it
to run today in about 2 minutes, changed the Schedule type to 'Start
on idle' and the 'Define idle CPU condition' and watched CPU
utilization and the monitor to see if it runs, but it never does.
What step am I missing?
Thanks!
Chris
I don't use this feature, and don't know anybody who uses this feature
(though that doesn't mean nobody uses it). The reason is that for a SQL
Server job, it's better to know when it'll run than it is to leave it to
'random' chances.
Linchi
"cbtechlists@.gmail.com" wrote:

> I'm trying to get a SQL Agent scheduled job working using the Schedule
> Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> be working.
> I setup a maintenance task to check db integrity (as a test), set it
> to run today in about 2 minutes, changed the Schedule type to 'Start
> on idle' and the 'Define idle CPU condition' and watched CPU
> utilization and the monitor to see if it runs, but it never does.
> What step am I missing?
> Thanks!
> Chris
>
|||I'm with Linchi, CPU utilization jobs generally shouldn't be used. I
would use the performance counters on the machine to keeps a log for
an average day/week of work and design a date/time strategy around
that. It should give you the best times to run these types of things,
i.e. low cpu + low I/O + low users @. 4:00 am everyday. Also take into
account any data loads or batch executions of programs or ones that
users manually do.
On Mar 20, 9:44Xam, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> I don't use this feature, and don't know anybody who uses this feature
> (though that doesn't mean nobody uses it). The reason is that for a SQL
> Server job, it's better to know when it'll run than it is to leave it to
> 'random' chances.
> Linchi
>
> "cbtechli...@.gmail.com" wrote:
>
>
> - Show quoted text -

job run when idle

I'm trying to get a SQL Agent scheduled job working using the Schedule
Type of 'Start whenever the CPUs become idle', but it doesn't seem to
be working.
I setup a maintenance task to check db integrity (as a test), set it
to run today in about 2 minutes, changed the Schedule type to 'Start
on idle' and the 'Define idle CPU condition' and watched CPU
utilization and the monitor to see if it runs, but it never does.
What step am I missing?
Thanks!
ChrisI don't use this feature, and don't know anybody who uses this feature
(though that doesn't mean nobody uses it). The reason is that for a SQL
Server job, it's better to know when it'll run than it is to leave it to
'random' chances.
Linchi
"cbtechlists@.gmail.com" wrote:
> I'm trying to get a SQL Agent scheduled job working using the Schedule
> Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> be working.
> I setup a maintenance task to check db integrity (as a test), set it
> to run today in about 2 minutes, changed the Schedule type to 'Start
> on idle' and the 'Define idle CPU condition' and watched CPU
> utilization and the monitor to see if it runs, but it never does.
> What step am I missing?
> Thanks!
> Chris
>|||I'm with Linchi, CPU utilization jobs generally shouldn't be used. I
would use the performance counters on the machine to keeps a log for
an average day/week of work and design a date/time strategy around
that. It should give you the best times to run these types of things,
i.e. low cpu + low I/O + low users @. 4:00 am everyday. Also take into
account any data loads or batch executions of programs or ones that
users manually do.
On Mar 20, 9:44=A0am, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> I don't use this feature, and don't know anybody who uses this feature
> (though that doesn't mean nobody uses it). The reason is that for a SQL
> Server job, it's better to know when it'll run than it is to leave it to
> 'random' chances.
> Linchi
>
> "cbtechli...@.gmail.com" wrote:
> > I'm trying to get a SQL Agent scheduled job working using the Schedule
> > Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> > be working.
> > I setup a maintenance task to check db integrity (as a test), set it
> > to run today in about 2 minutes, changed the Schedule type to 'Start
> > on idle' and the 'Define idle CPU condition' and watched CPU
> > utilization and the monitor to see if it runs, but it never does.
> > What step am I missing?
> > Thanks!
> > Chris- Hide quoted text -
> - Show quoted text -sql

job result cancelled

I have a sql job that has recently started cancelling, on its own. I didn't
know this was possible. Under what conditions would the sql agent cancel a
job. I have no errors in the sql log, or event log, and an evening watching
memory counters in perfmon showed no problems there.
If the status of a job shows cancelled, that means the job was stopped
manually. What is that job executing? What is the job history saying?
"amill1" wrote:

> I have a sql job that has recently started cancelling, on its own. I didn't
> know this was possible. Under what conditions would the sql agent cancel a
> job. I have no errors in the sql log, or event log, and an evening watching
> memory counters in perfmon showed no problems there.
|||Yea, that's what I thought, but I know I am not getting up at 2 in the
morning and cancelling it in my sleep . The job is running multiple steps
to load summary tables for reporting. There are five steps total and most
nights it cancels somewhere around step 3. The job history says
"The step was cancelled (stopped) as the result of a stop job request. "
If I was answering this post I would say someone stopped it also, but no one
has the permission to do that other than myself.
"Jack" wrote:
[vbcol=seagreen]
> If the status of a job shows cancelled, that means the job was stopped
> manually. What is that job executing? What is the job history saying?
> "amill1" wrote:
|||There are 2 possibilities:
1> Someone is issuing sp_stop_job to that job from another schueduled job.
You probably need to use Profiler (use sp_trace_create if you don't want to
get up at 2 am to run it manually) to find out that information.
2> The SQLServerAgent service is being restarted every morning around that
time. Check Scheduled Tasks on that server.
"amill1" wrote:
[vbcol=seagreen]
> Yea, that's what I thought, but I know I am not getting up at 2 in the
> morning and cancelling it in my sleep . The job is running multiple steps
> to load summary tables for reporting. There are five steps total and most
> nights it cancels somewhere around step 3. The job history says
> "The step was cancelled (stopped) as the result of a stop job request. "
> If I was answering this post I would say someone stopped it also, but no one
> has the permission to do that other than myself.
>
> "Jack" wrote:
|||Thanks for the reply. I know that the SQL Agent is not getting restarted
because I have other jobs that run and complete during the time this job is
getting cancelled. I'll look for the sp_stop_job, but since I wrote all the
jobs and don't remember putting it there I don't think I'll find it. I
appreciate the suggestions.
"Jack" wrote:
[vbcol=seagreen]
> There are 2 possibilities:
> 1> Someone is issuing sp_stop_job to that job from another schueduled job.
> You probably need to use Profiler (use sp_trace_create if you don't want to
> get up at 2 am to run it manually) to find out that information.
> 2> The SQLServerAgent service is being restarted every morning around that
> time. Check Scheduled Tasks on that server.
> "amill1" wrote:
|||Go to the Advanced tab for the job steps and make sure you are fully logging
the execution. Also, in the job history, it will say who kicked the job
off. It will also tell you who cancelled the job.
Also take a look at the SQLAgent Error Log.
Sincerely,
Anthony Thomas

"amill1" <amill1@.discussions.microsoft.com> wrote in message
news:915304CB-882E-4168-BB24-BAF8F62F4CBA@.microsoft.com...
Thanks for the reply. I know that the SQL Agent is not getting restarted
because I have other jobs that run and complete during the time this job is
getting cancelled. I'll look for the sp_stop_job, but since I wrote all the
jobs and don't remember putting it there I don't think I'll find it. I
appreciate the suggestions.
"Jack" wrote:

> There are 2 possibilities:
> 1> Someone is issuing sp_stop_job to that job from another schueduled
job.
> You probably need to use Profiler (use sp_trace_create if you don't want
to
> get up at 2 am to run it manually) to find out that information.
> 2> The SQLServerAgent service is being restarted every morning around
that[vbcol=seagreen]
> time. Check Scheduled Tasks on that server.
> "amill1" wrote:
steps[vbcol=seagreen]
most[vbcol=seagreen]
"[vbcol=seagreen]
one[vbcol=seagreen]
saying?[vbcol=seagreen]
I didn't[vbcol=seagreen]
cancel a[vbcol=seagreen]
watching[vbcol=seagreen]

job result cancelled

I have a sql job that has recently started cancelling, on its own. I didn't
know this was possible. Under what conditions would the sql agent cancel a
job. I have no errors in the sql log, or event log, and an evening watching
memory counters in perfmon showed no problems there.If the status of a job shows cancelled, that means the job was stopped
manually. What is that job executing? What is the job history saying?
"amill1" wrote:

> I have a sql job that has recently started cancelling, on its own. I didn
't
> know this was possible. Under what conditions would the sql agent cancel
a
> job. I have no errors in the sql log, or event log, and an evening watchi
ng
> memory counters in perfmon showed no problems there.|||Yea, that's what I thought, but I know I am not getting up at 2 in the
morning and cancelling it in my sleep . The job is running multiple step
s
to load summary tables for reporting. There are five steps total and most
nights it cancels somewhere around step 3. The job history says
"The step was cancelled (stopped) as the result of a stop job request. "
If I was answering this post I would say someone stopped it also, but no one
has the permission to do that other than myself.
"Jack" wrote:
[vbcol=seagreen]
> If the status of a job shows cancelled, that means the job was stopped
> manually. What is that job executing? What is the job history saying?
> "amill1" wrote:
>|||There are 2 possibilities:
1> Someone is issuing sp_stop_job to that job from another schueduled job.
You probably need to use Profiler (use sp_trace_create if you don't want to
get up at 2 am to run it manually) to find out that information.
2> The SQLServerAgent service is being restarted every morning around that
time. Check Scheduled Tasks on that server.
"amill1" wrote:
[vbcol=seagreen]
> Yea, that's what I thought, but I know I am not getting up at 2 in the
> morning and cancelling it in my sleep . The job is running multiple st
eps
> to load summary tables for reporting. There are five steps total and most
> nights it cancels somewhere around step 3. The job history says
> "The step was cancelled (stopped) as the result of a stop job request. "
> If I was answering this post I would say someone stopped it also, but no o
ne
> has the permission to do that other than myself.
>
> "Jack" wrote:
>|||Thanks for the reply. I know that the SQL Agent is not getting restarted
because I have other jobs that run and complete during the time this job is
getting cancelled. I'll look for the sp_stop_job, but since I wrote all the
jobs and don't remember putting it there I don't think I'll find it. I
appreciate the suggestions.
"Jack" wrote:
[vbcol=seagreen]
> There are 2 possibilities:
> 1> Someone is issuing sp_stop_job to that job from another schueduled job
.
> You probably need to use Profiler (use sp_trace_create if you don't want t
o
> get up at 2 am to run it manually) to find out that information.
> 2> The SQLServerAgent service is being restarted every morning around tha
t
> time. Check Scheduled Tasks on that server.
> "amill1" wrote:
>|||Go to the Advanced tab for the job steps and make sure you are fully logging
the execution. Also, in the job history, it will say who kicked the job
off. It will also tell you who cancelled the job.
Also take a look at the SQLAgent Error Log.
Sincerely,
Anthony Thomas
"amill1" <amill1@.discussions.microsoft.com> wrote in message
news:915304CB-882E-4168-BB24-BAF8F62F4CBA@.microsoft.com...
Thanks for the reply. I know that the SQL Agent is not getting restarted
because I have other jobs that run and complete during the time this job is
getting cancelled. I'll look for the sp_stop_job, but since I wrote all the
jobs and don't remember putting it there I don't think I'll find it. I
appreciate the suggestions.
"Jack" wrote:

> There are 2 possibilities:
> 1> Someone is issuing sp_stop_job to that job from another schueduled
job.
> You probably need to use Profiler (use sp_trace_create if you don't want
to
> get up at 2 am to run it manually) to find out that information.
> 2> The SQLServerAgent service is being restarted every morning around
that[vbcol=seagreen]
> time. Check Scheduled Tasks on that server.
> "amill1" wrote:
>
steps[vbcol=seagreen]
most[vbcol=seagreen]
"[vbcol=seagreen]
one[vbcol=seagreen]
saying?[vbcol=seagreen]
I didn't[vbcol=seagreen]
cancel a[vbcol=seagreen]
watching[vbcol=seagreen]sql

job result cancelled

I have a sql job that has recently started cancelling, on its own. I didn't
know this was possible. Under what conditions would the sql agent cancel a
job. I have no errors in the sql log, or event log, and an evening watching
memory counters in perfmon showed no problems there.If the status of a job shows cancelled, that means the job was stopped
manually. What is that job executing? What is the job history saying?
"amill1" wrote:
> I have a sql job that has recently started cancelling, on its own. I didn't
> know this was possible. Under what conditions would the sql agent cancel a
> job. I have no errors in the sql log, or event log, and an evening watching
> memory counters in perfmon showed no problems there.|||Yea, that's what I thought, but I know I am not getting up at 2 in the
morning and cancelling it in my sleep :) . The job is running multiple steps
to load summary tables for reporting. There are five steps total and most
nights it cancels somewhere around step 3. The job history says
"The step was cancelled (stopped) as the result of a stop job request. "
If I was answering this post I would say someone stopped it also, but no one
has the permission to do that other than myself.
"Jack" wrote:
> If the status of a job shows cancelled, that means the job was stopped
> manually. What is that job executing? What is the job history saying?
> "amill1" wrote:
> > I have a sql job that has recently started cancelling, on its own. I didn't
> > know this was possible. Under what conditions would the sql agent cancel a
> > job. I have no errors in the sql log, or event log, and an evening watching
> > memory counters in perfmon showed no problems there.|||There are 2 possibilities:
1> Someone is issuing sp_stop_job to that job from another schueduled job.
You probably need to use Profiler (use sp_trace_create if you don't want to
get up at 2 am to run it manually) to find out that information.
2> The SQLServerAgent service is being restarted every morning around that
time. Check Scheduled Tasks on that server.
"amill1" wrote:
> Yea, that's what I thought, but I know I am not getting up at 2 in the
> morning and cancelling it in my sleep :) . The job is running multiple steps
> to load summary tables for reporting. There are five steps total and most
> nights it cancels somewhere around step 3. The job history says
> "The step was cancelled (stopped) as the result of a stop job request. "
> If I was answering this post I would say someone stopped it also, but no one
> has the permission to do that other than myself.
>
> "Jack" wrote:
> > If the status of a job shows cancelled, that means the job was stopped
> > manually. What is that job executing? What is the job history saying?
> >
> > "amill1" wrote:
> >
> > > I have a sql job that has recently started cancelling, on its own. I didn't
> > > know this was possible. Under what conditions would the sql agent cancel a
> > > job. I have no errors in the sql log, or event log, and an evening watching
> > > memory counters in perfmon showed no problems there.|||Thanks for the reply. I know that the SQL Agent is not getting restarted
because I have other jobs that run and complete during the time this job is
getting cancelled. I'll look for the sp_stop_job, but since I wrote all the
jobs and don't remember putting it there I don't think I'll find it. I
appreciate the suggestions.
"Jack" wrote:
> There are 2 possibilities:
> 1> Someone is issuing sp_stop_job to that job from another schueduled job.
> You probably need to use Profiler (use sp_trace_create if you don't want to
> get up at 2 am to run it manually) to find out that information.
> 2> The SQLServerAgent service is being restarted every morning around that
> time. Check Scheduled Tasks on that server.
> "amill1" wrote:
> > Yea, that's what I thought, but I know I am not getting up at 2 in the
> > morning and cancelling it in my sleep :) . The job is running multiple steps
> > to load summary tables for reporting. There are five steps total and most
> > nights it cancels somewhere around step 3. The job history says
> > "The step was cancelled (stopped) as the result of a stop job request. "
> > If I was answering this post I would say someone stopped it also, but no one
> > has the permission to do that other than myself.
> >
> >
> >
> > "Jack" wrote:
> >
> > > If the status of a job shows cancelled, that means the job was stopped
> > > manually. What is that job executing? What is the job history saying?
> > >
> > > "amill1" wrote:
> > >
> > > > I have a sql job that has recently started cancelling, on its own. I didn't
> > > > know this was possible. Under what conditions would the sql agent cancel a
> > > > job. I have no errors in the sql log, or event log, and an evening watching
> > > > memory counters in perfmon showed no problems there.|||Go to the Advanced tab for the job steps and make sure you are fully logging
the execution. Also, in the job history, it will say who kicked the job
off. It will also tell you who cancelled the job.
Also take a look at the SQLAgent Error Log.
Sincerely,
Anthony Thomas
"amill1" <amill1@.discussions.microsoft.com> wrote in message
news:915304CB-882E-4168-BB24-BAF8F62F4CBA@.microsoft.com...
Thanks for the reply. I know that the SQL Agent is not getting restarted
because I have other jobs that run and complete during the time this job is
getting cancelled. I'll look for the sp_stop_job, but since I wrote all the
jobs and don't remember putting it there I don't think I'll find it. I
appreciate the suggestions.
"Jack" wrote:
> There are 2 possibilities:
> 1> Someone is issuing sp_stop_job to that job from another schueduled
job.
> You probably need to use Profiler (use sp_trace_create if you don't want
to
> get up at 2 am to run it manually) to find out that information.
> 2> The SQLServerAgent service is being restarted every morning around
that
> time. Check Scheduled Tasks on that server.
> "amill1" wrote:
> > Yea, that's what I thought, but I know I am not getting up at 2 in the
> > morning and cancelling it in my sleep :) . The job is running multiple
steps
> > to load summary tables for reporting. There are five steps total and
most
> > nights it cancels somewhere around step 3. The job history says
> > "The step was cancelled (stopped) as the result of a stop job request.
"
> > If I was answering this post I would say someone stopped it also, but no
one
> > has the permission to do that other than myself.
> >
> >
> >
> > "Jack" wrote:
> >
> > > If the status of a job shows cancelled, that means the job was stopped
> > > manually. What is that job executing? What is the job history
saying?
> > >
> > > "amill1" wrote:
> > >
> > > > I have a sql job that has recently started cancelling, on its own.
I didn't
> > > > know this was possible. Under what conditions would the sql agent
cancel a
> > > > job. I have no errors in the sql log, or event log, and an evening
watching
> > > > memory counters in perfmon showed no problems there.

Job ownership problem

Dear all,
I have scheduled some jobs in SQL Server Agent to run some DTS packages. The
original owner of these jobs is "sa". However, when I changed to the owner to
be another SQL login id, e.g. myUser, the scheduled jobs failed. "myUser" has
the "db_owner" role. The owner of DTS packages is "Domain\Administrator" and
I logon the Windows server as local Administrator. I am not sure if there is
any problem on this. Can anyone advise? Thanks.
Ivan
If the job is owned by sa or a login that is a member of the
sysadmins server role, then the job executes under the
security context of the SQL Server Agent service account. If
the job is owned by a login that is not a member of the
sysadmins server role, then the job is executed under the
security context of the proxy account.
And then...the default setting for SQL Agent is that
non-sysadmins cannot execute CmdExec or ActiveX scripting
jobs. Scheduling a package is done by executing a CmdExec
step in the job.
That the basics of it and why you are having problems with
your job. You can find more information in the following
article:
INF: How to Run a DTS Package as a Scheduled Job
http://support.microsoft.com/?id=269074
-Sue
On Mon, 31 Oct 2005 20:34:02 -0800, "Ivan"
<Ivan@.discussions.microsoft.com> wrote:

>Dear all,
>I have scheduled some jobs in SQL Server Agent to run some DTS packages. The
>original owner of these jobs is "sa". However, when I changed to the owner to
>be another SQL login id, e.g. myUser, the scheduled jobs failed. "myUser" has
>the "db_owner" role. The owner of DTS packages is "Domain\Administrator" and
>I logon the Windows server as local Administrator. I am not sure if there is
>any problem on this. Can anyone advise? Thanks.
>Ivan
sql