Friday, March 30, 2012
Job/DTS Scheduled Execution
Just a quick question...
I have 2 DTS's - one which imports a small amount of data (about 60 rows
max), and another which imports about 20,000 rows (and will increase over
time).
I had a job running the smaller import every two minutes (as it reports real
time data) - I've added the other import to this but it would seem that the
20,000 rows will take more than 2 minutes.
I was wondering if anyone could advise as to what is likely to happen when
the job takes more than 2 minutes to run - I'm "guessing" that 2 minutes
after it started, it'll start again, and start over writing data thats only
just been written with the last import (and round and round it goes) - but
because of the nature of this, wouldn't this cause the server to overload a
bit, ie, it would be constantly starting new executions of the job whilst
the previous execution was running - or does SQL have anything inbuilt to
prevent this.
I'm thinking that my best bet would be to split these apart - have the
smaller import in one job running every two minutes, and the other in a
separate job that runs, perhaps every 5 (will have to time it I guess) ...
Any info on this would be appreciated.
Regards
RobAgent will not start a job if that job is currently executing. I.e., you wil
l not have several
instances of the same job executing at the same time. Does that answer your
question?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Rob Meade" <ku.shn.tsews.thbu@.edaem.bor> wrote in message
news:uDRBiAOHGHA.3700@.TK2MSFTNGP15.phx.gbl...
> Hi all,
> Just a quick question...
> I have 2 DTS's - one which imports a small amount of data (about 60 rows m
ax), and another which
> imports about 20,000 rows (and will increase over time).
> I had a job running the smaller import every two minutes (as it reports re
al time data) - I've
> added the other import to this but it would seem that the 20,000 rows will
take more than 2
> minutes.
> I was wondering if anyone could advise as to what is likely to happen when
the job takes more than
> 2 minutes to run - I'm "guessing" that 2 minutes after it started, it'll s
tart again, and start
> over writing data thats only just been written with the last import (and r
ound and round it
> goes) - but because of the nature of this, wouldn't this cause the server
to overload a bit, ie,
> it would be constantly starting new executions of the job whilst the previ
ous execution was
> running - or does SQL have anything inbuilt to prevent this.
> I'm thinking that my best bet would be to split these apart - have the sma
ller import in one job
> running every two minutes, and the other in a separate job that runs, perh
aps every 5 (will have
> to time it I guess) ...
> Any info on this would be appreciated.
> Regards
> Rob
>|||hi Rob,
What about to call the second DTS from the first one? (As last task, of
course)? So this way I would keep one job no more.
"Rob Meade" wrote:
> Hi all,
> Just a quick question...
> I have 2 DTS's - one which imports a small amount of data (about 60 rows
> max), and another which imports about 20,000 rows (and will increase over
> time).
> I had a job running the smaller import every two minutes (as it reports re
al
> time data) - I've added the other import to this but it would seem that th
e
> 20,000 rows will take more than 2 minutes.
> I was wondering if anyone could advise as to what is likely to happen when
> the job takes more than 2 minutes to run - I'm "guessing" that 2 minutes
> after it started, it'll start again, and start over writing data thats onl
y
> just been written with the last import (and round and round it goes) - but
> because of the nature of this, wouldn't this cause the server to overload
a
> bit, ie, it would be constantly starting new executions of the job whilst
> the previous execution was running - or does SQL have anything inbuilt to
> prevent this.
> I'm thinking that my best bet would be to split these apart - have the
> smaller import in one job running every two minutes, and the other in a
> separate job that runs, perhaps every 5 (will have to time it I guess) ...
> Any info on this would be appreciated.
> Regards
> Rob
>
>|||"Tibor Karaszi" wrote ...
> Agent will not start a job if that job is currently executing. I.e., you
> will not have several instances of the same job executing at the same
> time. Does that answer your question?
Hi Tibor,
Yes it does - thank you :o)
Rob|||"Enric" wrote ...
> What about to call the second DTS from the first one? (As last task, of
> course)? So this way I would keep one job no more.
I could do - but of course then I'd have an even longer wait for the first
lot of info...
Cheers though.
Rob
JOB TIME (twice a day)..?
In our database a job is scheduled to run at 6:30 PM.
I need to run that job twice a day ie., at 12:30 PM & 6:30 PM
Is it possible?
Is there any alternative for this without creating a new job?
Thanks,
Soura
Yes, right click on the agent, select agent properties and have it run every
6 hours, starting at 12:30 pm. ending at 7:00 pm
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:65EADF5F-4D28-4835-A54F-F209FD3422F7@.microsoft.com...
> Hi,
> In our database a job is scheduled to run at 6:30 PM.
> I need to run that job twice a day ie., at 12:30 PM & 6:30 PM
> Is it possible?
> Is there any alternative for this without creating a new job?
> Thanks,
> Soura
|||Thank you Cotter
It's working fine.
Soura.
"Hilary Cotter" wrote:
> Yes, right click on the agent, select agent properties and have it run every
> 6 hours, starting at 12:30 pm. ending at 7:00 pm
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "SouRa" <SouRa@.discussions.microsoft.com> wrote in message
> news:65EADF5F-4D28-4835-A54F-F209FD3422F7@.microsoft.com...
>
>
Job that runs past the next scheduled start time
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
Wednesday, March 28, 2012
Job succeeds manually but fails if scheduled
up to email me when they're completed. Every morning I get in to a
bunch of emails like this:
<quote
JOB RUN:'Tech Pubs Email Notification' was run on 18/03/2006 at
00:00:00
DURATION:0 hours, 0 minutes, 0 seconds
STATUS: Succeeded
MESSAGES:The job succeeded. The Job was invoked by Schedule 10 (Send
Mail). The last step to run was step 1 (Send Mail).
</quote
However, the most important job - the database backup - fails every
time.
<quote>
JOB RUN:'DB Backup Job for DB Maintenance Plan 'DB Maintenance Plan1''
was run on 20/03/2006 at 18:00:00
DURATION:0 hours, 0 minutes, 2 seconds
STATUS: Failed
MESSAGES:The job failed. The Job was invoked by Schedule 7 (Schedule
1). The last step to run was step 1 (Step 1).
</quote
What's strange is that the job runs successfully if you kick it off
manually (in EM: right-click and "Start Job")!!! Does anyone have any
idea of why that might be? Where to look for diagnostic information?
TIA
Edwardteddysnips@.hotmail.com wrote:
> My client has a number of jobs that are run overnight. We've set them
> up to email me when they're completed. Every morning I get in to a
> bunch of emails like this:
> <quote>
> JOB RUN:'Tech Pubs Email Notification' was run on 18/03/2006 at
> 00:00:00
> DURATION:0 hours, 0 minutes, 0 seconds
> STATUS: Succeeded
> MESSAGES:The job succeeded. The Job was invoked by Schedule 10 (Send
> Mail). The last step to run was step 1 (Send Mail).
> </quote>
> However, the most important job - the database backup - fails every
> time.
> <quote>
> JOB RUN:'DB Backup Job for DB Maintenance Plan 'DB Maintenance Plan1''
> was run on 20/03/2006 at 18:00:00
> DURATION:0 hours, 0 minutes, 2 seconds
> STATUS: Failed
> MESSAGES:The job failed. The Job was invoked by Schedule 7 (Schedule
> 1). The last step to run was step 1 (Step 1).
> </quote>
> What's strange is that the job runs successfully if you kick it off
> manually (in EM: right-click and "Start Job")!!! Does anyone have any
> idea of why that might be? Where to look for diagnostic information?
> TIA
> Edward
Edward,
Have you got the right permissions?
This might sound a bit obvious but its usually the case. You might not
be the owner of the package and the system will only schedule the job
to run if the permissions are correct.
Bryan|||Bryan wrote:
> teddysnips@.hotmail.com wrote:
[...]
>
> Edward,
> Have you got the right permissions?
> This might sound a bit obvious but its usually the case. You might not
> be the owner of the package and the system will only schedule the job
> to run if the permissions are correct.
> Bryan
I would have assumed so, but I'll check. Thanks for the suggestion.
Edward|||Bryan wrote:
[...]
> Edward,
> Have you got the right permissions?
> This might sound a bit obvious but its usually the case. You might not
> be the owner of the package and the system will only schedule the job
> to run if the permissions are correct.
I checked on this today. All the jobs that run correctly have exactly
the same owners/permissions as the job that fails. I can't find any
attribute of the job (apart from what it actually does, obviously) that
distinguishes it from any of the other, successful jobs.
One other thing of which I was not aware. Apparently this job had been
scheduled successfully up until about a week ago, when it began
failing.
Any further thoughts/ideas?
TIA
Edward|||Hi Edward,
To be honest I don't ( I hate admitting defeat though....)
I have encountered this problem in the past especially when picking up
from any previous owners of packages.
One solution I have done is to copy the code from one package and dump
it into a package that is being allowed to run but with a different
owner.
This usually confirmed to myself that the problem must a a Owner /
Permission issue.
Apart from that I'm at a loss to recommend any other course of action.|||(teddysnips@.hotmail.com) writes:
> I checked on this today. All the jobs that run correctly have exactly
> the same owners/permissions as the job that fails. I can't find any
> attribute of the job (apart from what it actually does, obviously) that
> distinguishes it from any of the other, successful jobs.
> One other thing of which I was not aware. Apparently this job had been
> scheduled successfully up until about a week ago, when it began
> failing.
> Any further thoughts/ideas?
Check View History for the job. Don't miss to check View Step History.
Unfortunately, jobs that set up from a maintenance plan does not seem to
write very much useful information, so I'm not really expecting this to
give you anything. (But check nevertheless.) I the maintenance plan has
its own log somewhere, but I don't remember where - or if there was anything
that useful in it.
May you should scrap the plan, and set up the jobs without it.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||<teddysnips@.hotmail.com> wrote in message
news:1142932717.825816.151430@.z34g2000cwc.googlegr oups.com...
> My client has a number of jobs that are run overnight. We've set them
> up to email me when they're completed. Every morning I get in to a
> bunch of emails like this:
> <quote>
> JOB RUN: 'Tech Pubs Email Notification' was run on 18/03/2006 at
> 00:00:00
> DURATION: 0 hours, 0 minutes, 0 seconds
> STATUS: Succeeded
> MESSAGES: The job succeeded. The Job was invoked by Schedule 10 (Send
> Mail). The last step to run was step 1 (Send Mail).
> </quote>
> However, the most important job - the database backup - fails every
> time.
> <quote>
> JOB RUN: 'DB Backup Job for DB Maintenance Plan 'DB Maintenance Plan1''
> was run on 20/03/2006 at 18:00:00
> DURATION: 0 hours, 0 minutes, 2 seconds
> STATUS: Failed
> MESSAGES: The job failed. The Job was invoked by Schedule 7 (Schedule
> 1). The last step to run was step 1 (Step 1).
> </quote>
> What's strange is that the job runs successfully if you kick it off
> manually (in EM: right-click and "Start Job")!!! Does anyone have any
> idea of why that might be? Where to look for diagnostic information?
> TIA
> Edward
If it isn't the owner of the job step (sa would be good if sa owns the
database), then check for proper disk
space in the backup destination.
Monday, March 26, 2012
Job scheduling
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 Schedules Not Schedu;ling
steps/ and related job schedules in SQL Analyzer ...
however the job is never scheduled. I can not identify
anything that is incorrect.
The commands process properly... and I can browse the
resulting msdb table entries in sys_jobs, sys_jobsteps,
and sys_jobschedules... however nothing ever gets
scheduled.
Please provide assistance where appropriate.
USE MSDB
EXEC sp_add_job
@.job_name='MailPointDBEmailFTCTPopulation',
@.enabled=1,
@.notify_level_eventlog=3
EXEC sp_add_jobstep
@.job_name='MailPointDBEmailFTCTPopulation',
@.step_name='EmailFTCTPopulation',
@.subsystem='TSQL',
@.command='EXEC sp_fulltext_table Email, ''update_index'''
EXEC sp_add_jobschedule
@.job_name='MailPointDBEmailFTCTPopulation',
@.name='MailPointDBEmailFTCTPopulation',
@.enabled=1,
@.freq_type=4,
@.freq_interval=1,
@.active_start_time=183000
EXEC sp_add_job
@.job_name='MailPointDBDocumentFTCTPopulation',
@.enabled=1,
@.notify_level_eventlog=3
EXEC sp_add_jobstep
@.job_name='MailPointDBDocumentFTCTPopulation',
@.step_name='DocumentFTCTPopulation',
@.subsystem='TSQL',
@.command='EXEC sp_fulltext_table
Document, ''update_index'''
EXEC sp_add_jobschedule
@.job_name='MailPointDBDocumentFTCTPopulation',
@.name='MailPointDBDocumentFTCTPopulation',
@.enabled=1,
@.freq_type=4,
@.freq_interval=1,
@.active_start_time=183000
GOis agent running on your server ?
jobi
"Philip" <plippard@.nc.rr.com> wrote in message
news:154f01c35247$39bb07a0$a001280a@.phx.gbl...
> I can execute the following file to create jobs/ job
> steps/ and related job schedules in SQL Analyzer ...
> however the job is never scheduled. I can not identify
> anything that is incorrect.
> The commands process properly... and I can browse the
> resulting msdb table entries in sys_jobs, sys_jobsteps,
> and sys_jobschedules... however nothing ever gets
> scheduled.
> Please provide assistance where appropriate.
> USE MSDB
> EXEC sp_add_job
> @.job_name='MailPointDBEmailFTCTPopulation',
> @.enabled=1,
> @.notify_level_eventlog=3
> EXEC sp_add_jobstep
> @.job_name='MailPointDBEmailFTCTPopulation',
> @.step_name='EmailFTCTPopulation',
> @.subsystem='TSQL',
> @.command='EXEC sp_fulltext_table Email, ''update_index'''
> EXEC sp_add_jobschedule
> @.job_name='MailPointDBEmailFTCTPopulation',
> @.name='MailPointDBEmailFTCTPopulation',
> @.enabled=1,
> @.freq_type=4,
> @.freq_interval=1,
> @.active_start_time=183000
> EXEC sp_add_job
> @.job_name='MailPointDBDocumentFTCTPopulation',
> @.enabled=1,
> @.notify_level_eventlog=3
> EXEC sp_add_jobstep
> @.job_name='MailPointDBDocumentFTCTPopulation',
> @.step_name='DocumentFTCTPopulation',
> @.subsystem='TSQL',
> @.command='EXEC sp_fulltext_table
> Document, ''update_index'''
> EXEC sp_add_jobschedule
> @.job_name='MailPointDBDocumentFTCTPopulation',
> @.name='MailPointDBDocumentFTCTPopulation',
> @.enabled=1,
> @.freq_type=4,
> @.freq_interval=1,
> @.active_start_time=183000
> GO
>
Job Scheduler Question - 2005
it only keeps 50 events listed in the history. Is there any way to expand
this or a query that can be used to extract more history about the executed
jobs?
Yes I am talking about the history and know how to access it. I was asking if
there was a way to expand the number of executions or having a way to look
past the list of 50.
"Tibor Karaszi" wrote:
> Are you talking of how many executions it has history for? If so, Right-click Agent, Properties,
> History.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Big Ern" <BigErn@.discussions.microsoft.com> wrote in message
> news:9528FF37-5BD1-4CA5-AFC5-B7EC2F3D0AE0@.microsoft.com...
>
>
Friday, March 23, 2012
job schedule information
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 Schedule
I use Enterprise Manager and sort by that column, they are not sorted
correctly.
Suggestions?Hopefully following query can give you the required result.
select sj.name, sj.description,
case sj.enabled
when 0 then 'Enabled'
else 'Disabled' end as 'Job Status',
sjs.next_run_date,
right('000000' + convert(varchar(6),sjs.next_run_time),6) 'Next Run Time'
from msdb.dbo.sysjobs sj, msdb.dbo.sysjobschedules sjs
where sj.job_id = sjs.job_id
order by sjs.next_run_date, sjs.next_run_time
Please let us know whether this helped you or not?
"John Carlton" wrote:
> I would like to view all the scheduled jobs , sorted by Next Run Date. When
> I use Enterprise Manager and sort by that column, they are not sorted
> correctly.
> Suggestions?|||Yes, perfect. Thanks!
"Absar Ahmad" wrote:
> Hopefully following query can give you the required result.
> select sj.name, sj.description,
> case sj.enabled
> when 0 then 'Enabled'
> else 'Disabled' end as 'Job Status',
> sjs.next_run_date,
> right('000000' + convert(varchar(6),sjs.next_run_time),6) 'Next Run Time'
> from msdb.dbo.sysjobs sj, msdb.dbo.sysjobschedules sjs
> where sj.job_id = sjs.job_id
> order by sjs.next_run_date, sjs.next_run_time
> Please let us know whether this helped you or not?
> "John Carlton" wrote:
> > I would like to view all the scheduled jobs , sorted by Next Run Date. When
> > I use Enterprise Manager and sort by that column, they are not sorted
> > correctly.
> > Suggestions?
Job Schedule
I use Enterprise Manager and sort by that column, they are not sorted
correctly.
Suggestions?Hopefully following query can give you the required result.
select sj.name, sj.description,
case sj.enabled
when 0 then 'Enabled'
else 'Disabled' end as 'Job Status',
sjs.next_run_date,
right('000000' + convert(varchar(6),sjs.next_run_time),6) 'Next Run Time'
from msdb.dbo.sysjobs sj, msdb.dbo.sysjobschedules sjs
where sj.job_id = sjs.job_id
order by sjs.next_run_date, sjs.next_run_time
Please let us know whether this helped you or not?
"John Carlton" wrote:
> I would like to view all the scheduled jobs , sorted by Next Run Date. Wh
en
> I use Enterprise Manager and sort by that column, they are not sorted
> correctly.
> Suggestions?|||Yes, perfect. Thanks!
"Absar Ahmad" wrote:
[vbcol=seagreen]
> Hopefully following query can give you the required result.
> select sj.name, sj.description,
> case sj.enabled
> when 0 then 'Enabled'
> else 'Disabled' end as 'Job Status',
> sjs.next_run_date,
> right('000000' + convert(varchar(6),sjs.next_run_time),6) 'Next Run Time'
> from msdb.dbo.sysjobs sj, msdb.dbo.sysjobschedules sjs
> where sj.job_id = sjs.job_id
> order by sjs.next_run_date, sjs.next_run_time
> Please let us know whether this helped you or not?
> "John Carlton" wrote:
>
Job Schedule
I use Enterprise Manager and sort by that column, they are not sorted
correctly.
Suggestions?
Hopefully following query can give you the required result.
select sj.name, sj.description,
case sj.enabled
when 0 then 'Enabled'
else 'Disabled' end as 'Job Status',
sjs.next_run_date,
right('000000' + convert(varchar(6),sjs.next_run_time),6) 'Next Run Time'
from msdb.dbo.sysjobs sj, msdb.dbo.sysjobschedules sjs
where sj.job_id = sjs.job_id
order by sjs.next_run_date, sjs.next_run_time
Please let us know whether this helped you or not?
"John Carlton" wrote:
> I would like to view all the scheduled jobs , sorted by Next Run Date. When
> I use Enterprise Manager and sort by that column, they are not sorted
> correctly.
> Suggestions?
|||Yes, perfect. Thanks!
"Absar Ahmad" wrote:
[vbcol=seagreen]
> Hopefully following query can give you the required result.
> select sj.name, sj.description,
> case sj.enabled
> when 0 then 'Enabled'
> else 'Disabled' end as 'Job Status',
> sjs.next_run_date,
> right('000000' + convert(varchar(6),sjs.next_run_time),6) 'Next Run Time'
> from msdb.dbo.sysjobs sj, msdb.dbo.sysjobschedules sjs
> where sj.job_id = sjs.job_id
> order by sjs.next_run_date, sjs.next_run_time
> Please let us know whether this helped you or not?
> "John Carlton" wrote:
sql
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 running with status performing completion action
I have a job status "performing completion action" for one of mine sql scheduled task job.
The job executes a dts pkg (which I just rum manually, and all worked fine)
What does it mean?, I can not stop this job and refresh is not working ether.
What I can do?
Thank you,
Lclose your em and reopen it. it does not refresh very well.|||Sorry,
What is a EM and how I can close it / reopen it.
I'm a user, who is just trying to find out more about processies.
Thank you|||enterprise manager has a problem refreshing sometimes. if you are looking at jobs, i assume this is the application you are looking at.|||I did close it, the message still there.|||close your em and reopen it. it does not refresh very well...or right-click on the job and choose "refresh job" ;)
I also had this happen recently because our jobs are set up to send email notifications when the job is complete, and the servers(s) in question were unable to send emails because the network was having email problems. I ended up stopping and starting the mail service (xp_stopmail, xp_startmail) and the problem was fixed.
Then I had to send an abusive email off to the network admin group for not letting us know when they were going to intentionally damage the network.|||THANK YOU FOR ALL SUGGESTIONS, BUT WE HAD TO RESTART THE SERVER.
AS WELL AS OUT MAIL SERVER WAS REBOOTED.
jOB TASK WAS NOT ABLE TO SEND AN E-MAIL DUE TO MAIL SERVER FAILRE,
THANK YOU|||Yeah, I was gonna say...
issue the xp_stopmail and xp_startmail on the affected server, OR reboot the entire infrastructure.
either one will work ;)
JOb running SSIS package
[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'VOLCANO\Administrator', error code 0x534. [SQLSTATE 42000] (ConnIsLoginSysAdmin)
Can you tell me what operating system you have? Windows 2000, Windows 2003?
Thanks
Ovidiu Burlacu
|||when i turn on the computer i get error messages about an open file? everything listed in the menu includes this axel but i canoot open it and I need to fix this error, it is preventing me from installing a camera. any help?
|||
This forum (and the error above) is for SQL Server Integration Services - is your question related to that?
JOb running SSIS package
[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'VOLCANO\Administrator', error code 0x534. [SQLSTATE 42000] (ConnIsLoginSysAdmin)
Can you tell me what operating system you have? Windows 2000, Windows 2003?
Thanks
Ovidiu Burlacu
|||
This forum (and the error above) is for SQL Server Integration Services - is your question related to that?
job run when idle
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
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 ownership problem
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
Job ownership problem
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 t
o
be another SQL login id, e.g. myUser, the scheduled jobs failed. "myUser" ha
s
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.
IvanIf 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. Th
e
>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" h
as
>the "db_owner" role. The owner of DTS packages is "Domain\Administrator" an
d
>I logon the Windows server as local Administrator. I am not sure if there i
s
>any problem on this. Can anyone advise? Thanks.
>Ivan
Wednesday, March 21, 2012
Job ownership problem
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.
IvanIf 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