Showing posts with label 4pm. Show all posts
Showing posts with label 4pm. Show all posts

Monday, March 12, 2012

Scheduled email subscription can't be sent out on time

I have a report which is scheduled to be sent out by email every Tuesday at
4pm. It used to run and be sent out on time. Then I changed the report a
little adding a couple more subreports, the report being sent out that week
was a few minutes delayed but it was ok. Then I installed Reporting Services
SP1 and from that week the report was delayed over 12 hours to be sent out
and it is like this since then. I dropped the old shared schedule and added a
new shaed schedule but the report still can't be sent out on time. Does
anybody have any idea how to fix it?
Thanks,
MaryIs you Sql Server on the same box? Is it possible the clock on the machine
that has SQL is 12 hours off?
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> I have a report which is scheduled to be sent out by email every Tuesday
at
> 4pm. It used to run and be sent out on time. Then I changed the report a
> little adding a couple more subreports, the report being sent out that
week
> was a few minutes delayed but it was ok. Then I installed Reporting
Services
> SP1 and from that week the report was delayed over 12 hours to be sent out
> and it is like this since then. I dropped the old shared schedule and
added a
> new shaed schedule but the report still can't be sent out on time. Does
> anybody have any idea how to fix it?
> Thanks,
> Mary|||Daniel,
Thank you for your response. Sql Server is on the same box, and the clock on
that machine is fine. The report was sent out on time before I installed SP1.
Any idea about why this could happen?
Thanks.
"Daniel Reib [MSFT]" wrote:
> Is you Sql Server on the same box? Is it possible the clock on the machine
> that has SQL is 12 hours off?
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Mary" <Mary@.discussions.microsoft.com> wrote in message
> news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > I have a report which is scheduled to be sent out by email every Tuesday
> at
> > 4pm. It used to run and be sent out on time. Then I changed the report a
> > little adding a couple more subreports, the report being sent out that
> week
> > was a few minutes delayed but it was ok. Then I installed Reporting
> Services
> > SP1 and from that week the report was delayed over 12 hours to be sent out
> > and it is like this since then. I dropped the old shared schedule and
> added a
> > new shaed schedule but the report still can't be sent out on time. Does
> > anybody have any idea how to fix it?
> >
> > Thanks,
> >
> > Mary
>
>|||Can you look at the SQL job that was created to see when it is scheduled to
fire.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> Daniel,
> Thank you for your response. Sql Server is on the same box, and the clock
on
> that machine is fine. The report was sent out on time before I installed
SP1.
> Any idea about why this could happen?
> Thanks.
> "Daniel Reib [MSFT]" wrote:
> > Is you Sql Server on the same box? Is it possible the clock on the
machine
> > that has SQL is 12 hours off?
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > I have a report which is scheduled to be sent out by email every
Tuesday
> > at
> > > 4pm. It used to run and be sent out on time. Then I changed the report
a
> > > little adding a couple more subreports, the report being sent out that
> > week
> > > was a few minutes delayed but it was ok. Then I installed Reporting
> > Services
> > > SP1 and from that week the report was delayed over 12 hours to be sent
out
> > > and it is like this since then. I dropped the old shared schedule and
> > added a
> > > new shaed schedule but the report still can't be sent out on time.
Does
> > > anybody have any idea how to fix it?
> > >
> > > Thanks,
> > >
> > > Mary
> >
> >
> >|||Ok, I am assuming that is what you expect. The next thing to check would be
to check the history of the job. Make sure that it is firing when you
expect. If they are then look in the ReportServerService<date>.log file.
Around the time the schedule is fired an event should be picked up from the
Event table, and this should be logged.
Can you verify that all of this is happening.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> Daniel,
> The SQL job is scheduled to fire on Every week on Tuesday 4pm.
> Thanks
> "Daniel Reib [MSFT]" wrote:
> > Can you look at the SQL job that was created to see when it is scheduled
to
> > fire.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > Daniel,
> > >
> > > Thank you for your response. Sql Server is on the same box, and the
clock
> > on
> > > that machine is fine. The report was sent out on time before I
installed
> > SP1.
> > > Any idea about why this could happen?
> > >
> > > Thanks.
> > >
> > > "Daniel Reib [MSFT]" wrote:
> > >
> > > > Is you Sql Server on the same box? Is it possible the clock on the
> > machine
> > > > that has SQL is 12 hours off?
> > > >
> > > > --
> > > > -Daniel
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > I have a report which is scheduled to be sent out by email every
> > Tuesday
> > > > at
> > > > > 4pm. It used to run and be sent out on time. Then I changed the
report
> > a
> > > > > little adding a couple more subreports, the report being sent out
that
> > > > week
> > > > > was a few minutes delayed but it was ok. Then I installed
Reporting
> > > > Services
> > > > > SP1 and from that week the report was delayed over 12 hours to be
sent
> > out
> > > > > and it is like this since then. I dropped the old shared schedule
and
> > > > added a
> > > > > new shaed schedule but the report still can't be sent out on time.
> > Does
> > > > > anybody have any idea how to fix it?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Mary
> > > >
> > > >
> > > >
> >
> >
> >|||Daniel,
One thing I want to mention is that I changed the schedule to the new
schedule last week for the report to be sent out on every Monday 4pm with
which the latest running time was on 8/09 at 4pm. I checked the history of
the job and it was running at 8/09/2004 4pm. Then I checked the log file
around that time. There is no any event for this job on 8/09 at 4pm, but I
found the event for this job on the log file dated at 8/10/2004 2:02am which
was the actual time this report was sent out this morning. I cut that part of
the log file for this job and paste it here:
ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
0c6ad482-0b44-405e-a1cc-c15b0f1b238d executed at 8/10/2004 2:02:56 AM.
ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
0c6ad482-0b44-405e-a1cc-c15b0f1b238d execution completed at 8/10/2004 2:02:56
AM.
Thanks
"Daniel Reib [MSFT]" wrote:
> Ok, I am assuming that is what you expect. The next thing to check would be
> to check the history of the job. Make sure that it is firing when you
> expect. If they are then look in the ReportServerService<date>.log file.
> Around the time the schedule is fired an event should be picked up from the
> Event table, and this should be logged.
> Can you verify that all of this is happening.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Mary" <Mary@.discussions.microsoft.com> wrote in message
> news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> > Daniel,
> >
> > The SQL job is scheduled to fire on Every week on Tuesday 4pm.
> >
> > Thanks
> >
> > "Daniel Reib [MSFT]" wrote:
> >
> > > Can you look at the SQL job that was created to see when it is scheduled
> to
> > > fire.
> > >
> > > --
> > > -Daniel
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > > Daniel,
> > > >
> > > > Thank you for your response. Sql Server is on the same box, and the
> clock
> > > on
> > > > that machine is fine. The report was sent out on time before I
> installed
> > > SP1.
> > > > Any idea about why this could happen?
> > > >
> > > > Thanks.
> > > >
> > > > "Daniel Reib [MSFT]" wrote:
> > > >
> > > > > Is you Sql Server on the same box? Is it possible the clock on the
> > > machine
> > > > > that has SQL is 12 hours off?
> > > > >
> > > > > --
> > > > > -Daniel
> > > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > > > >
> > > > >
> > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > > I have a report which is scheduled to be sent out by email every
> > > Tuesday
> > > > > at
> > > > > > 4pm. It used to run and be sent out on time. Then I changed the
> report
> > > a
> > > > > > little adding a couple more subreports, the report being sent out
> that
> > > > > week
> > > > > > was a few minutes delayed but it was ok. Then I installed
> Reporting
> > > > > Services
> > > > > > SP1 and from that week the report was delayed over 12 hours to be
> sent
> > > out
> > > > > > and it is like this since then. I dropped the old shared schedule
> and
> > > > > added a
> > > > > > new shaed schedule but the report still can't be sent out on time.
> > > Does
> > > > > > anybody have any idea how to fix it?
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Mary
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>|||What happens if you run the job manually. Right click on the Sql Agent job
and choose start job. This should cause the job to execute.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:3DF5F4E2-AEC5-4DA1-B495-B2B821F319E9@.microsoft.com...
> Daniel,
> One thing I want to mention is that I changed the schedule to the new
> schedule last week for the report to be sent out on every Monday 4pm with
> which the latest running time was on 8/09 at 4pm. I checked the history
of
> the job and it was running at 8/09/2004 4pm. Then I checked the log file
> around that time. There is no any event for this job on 8/09 at 4pm, but I
> found the event for this job on the log file dated at 8/10/2004 2:02am
which
> was the actual time this report was sent out this morning. I cut that part
of
> the log file for this job and paste it here:
> ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> 0c6ad482-0b44-405e-a1cc-c15b0f1b238d executed at 8/10/2004 2:02:56 AM.
> ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> 0c6ad482-0b44-405e-a1cc-c15b0f1b238d execution completed at 8/10/2004
2:02:56
> AM.
> Thanks
> "Daniel Reib [MSFT]" wrote:
> > Ok, I am assuming that is what you expect. The next thing to check
would be
> > to check the history of the job. Make sure that it is firing when you
> > expect. If they are then look in the ReportServerService<date>.log
file.
> > Around the time the schedule is fired an event should be picked up from
the
> > Event table, and this should be logged.
> >
> > Can you verify that all of this is happening.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> > > Daniel,
> > >
> > > The SQL job is scheduled to fire on Every week on Tuesday 4pm.
> > >
> > > Thanks
> > >
> > > "Daniel Reib [MSFT]" wrote:
> > >
> > > > Can you look at the SQL job that was created to see when it is
scheduled
> > to
> > > > fire.
> > > >
> > > > --
> > > > -Daniel
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > > > Daniel,
> > > > >
> > > > > Thank you for your response. Sql Server is on the same box, and
the
> > clock
> > > > on
> > > > > that machine is fine. The report was sent out on time before I
> > installed
> > > > SP1.
> > > > > Any idea about why this could happen?
> > > > >
> > > > > Thanks.
> > > > >
> > > > > "Daniel Reib [MSFT]" wrote:
> > > > >
> > > > > > Is you Sql Server on the same box? Is it possible the clock on
the
> > > > machine
> > > > > > that has SQL is 12 hours off?
> > > > > >
> > > > > > --
> > > > > > -Daniel
> > > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.
> > > > > >
> > > > > >
> > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > > > I have a report which is scheduled to be sent out by email
every
> > > > Tuesday
> > > > > > at
> > > > > > > 4pm. It used to run and be sent out on time. Then I changed
the
> > report
> > > > a
> > > > > > > little adding a couple more subreports, the report being sent
out
> > that
> > > > > > week
> > > > > > > was a few minutes delayed but it was ok. Then I installed
> > Reporting
> > > > > > Services
> > > > > > > SP1 and from that week the report was delayed over 12 hours to
be
> > sent
> > > > out
> > > > > > > and it is like this since then. I dropped the old shared
schedule
> > and
> > > > > > added a
> > > > > > > new shaed schedule but the report still can't be sent out on
time.
> > > > Does
> > > > > > > anybody have any idea how to fix it?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Mary
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >|||When you manually start the job a row should be placed in the Event table in
the report server database. Is this happening? Also can you tell me the
value for the element PollingInterval in the rsreportserver.config file.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:4A142D53-7729-4FA2-AB95-F610CA049DB0@.microsoft.com...
> I just manually started the job 10 minutes ago and the SQL job was running
> successfully. But there was no event fired around that time for this job
when
> I checked the report server log file and also there was no email coming in
to
> the mailbox so far.
> "Daniel Reib [MSFT]" wrote:
> > What happens if you run the job manually. Right click on the Sql Agent
job
> > and choose start job. This should cause the job to execute.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > news:3DF5F4E2-AEC5-4DA1-B495-B2B821F319E9@.microsoft.com...
> > > Daniel,
> > >
> > > One thing I want to mention is that I changed the schedule to the new
> > > schedule last week for the report to be sent out on every Monday 4pm
with
> > > which the latest running time was on 8/09 at 4pm. I checked the
history
> > of
> > > the job and it was running at 8/09/2004 4pm. Then I checked the log
file
> > > around that time. There is no any event for this job on 8/09 at 4pm,
but I
> > > found the event for this job on the log file dated at 8/10/2004 2:02am
> > which
> > > was the actual time this report was sent out this morning. I cut that
part
> > of
> > > the log file for this job and paste it here:
> > > ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d executed at 8/10/2004 2:02:56 AM.
> > > ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d execution completed at 8/10/2004
> > 2:02:56
> > > AM.
> > >
> > > Thanks
> > >
> > > "Daniel Reib [MSFT]" wrote:
> > >
> > > > Ok, I am assuming that is what you expect. The next thing to check
> > would be
> > > > to check the history of the job. Make sure that it is firing when
you
> > > > expect. If they are then look in the ReportServerService<date>.log
> > file.
> > > > Around the time the schedule is fired an event should be picked up
from
> > the
> > > > Event table, and this should be logged.
> > > >
> > > > Can you verify that all of this is happening.
> > > >
> > > > --
> > > > -Daniel
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> > > > > Daniel,
> > > > >
> > > > > The SQL job is scheduled to fire on Every week on Tuesday 4pm.
> > > > >
> > > > > Thanks
> > > > >
> > > > > "Daniel Reib [MSFT]" wrote:
> > > > >
> > > > > > Can you look at the SQL job that was created to see when it is
> > scheduled
> > > > to
> > > > > > fire.
> > > > > >
> > > > > > --
> > > > > > -Daniel
> > > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.
> > > > > >
> > > > > >
> > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > > > > > Daniel,
> > > > > > >
> > > > > > > Thank you for your response. Sql Server is on the same box,
and
> > the
> > > > clock
> > > > > > on
> > > > > > > that machine is fine. The report was sent out on time before I
> > > > installed
> > > > > > SP1.
> > > > > > > Any idea about why this could happen?
> > > > > > >
> > > > > > > Thanks.
> > > > > > >
> > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > >
> > > > > > > > Is you Sql Server on the same box? Is it possible the clock
on
> > the
> > > > > > machine
> > > > > > > > that has SQL is 12 hours off?
> > > > > > > >
> > > > > > > > --
> > > > > > > > -Daniel
> > > > > > > > This posting is provided "AS IS" with no warranties, and
confers
> > no
> > > > > > rights.
> > > > > > > >
> > > > > > > >
> > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > > > > > I have a report which is scheduled to be sent out by email
> > every
> > > > > > Tuesday
> > > > > > > > at
> > > > > > > > > 4pm. It used to run and be sent out on time. Then I
changed
> > the
> > > > report
> > > > > > a
> > > > > > > > > little adding a couple more subreports, the report being
sent
> > out
> > > > that
> > > > > > > > week
> > > > > > > > > was a few minutes delayed but it was ok. Then I installed
> > > > Reporting
> > > > > > > > Services
> > > > > > > > > SP1 and from that week the report was delayed over 12
hours to
> > be
> > > > sent
> > > > > > out
> > > > > > > > > and it is like this since then. I dropped the old shared
> > schedule
> > > > and
> > > > > > > > added a
> > > > > > > > > new shaed schedule but the report still can't be sent out
on
> > time.
> > > > > > Does
> > > > > > > > > anybody have any idea how to fix it?
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > >
> > > > > > > > > Mary
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >|||So try this:
Turn off the reportServer service
Run the job manually
See if a row is in the events table
Turn on the ReportServer service
See if row disappears
Send me the latest reportserverservice<date>.log file
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:79C1481E-78A5-4594-8758-8AECD43776A6@.microsoft.com...
> Daniel,
> I checked Event table in report server database on that machine and there
is
> currently no row in that table. The value for PollingInterval is 10.
> Thanks
>
> "Daniel Reib [MSFT]" wrote:
> > When you manually start the job a row should be placed in the Event
table in
> > the report server database. Is this happening? Also can you tell me
the
> > value for the element PollingInterval in the rsreportserver.config file.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > news:4A142D53-7729-4FA2-AB95-F610CA049DB0@.microsoft.com...
> > > I just manually started the job 10 minutes ago and the SQL job was
running
> > > successfully. But there was no event fired around that time for this
job
> > when
> > > I checked the report server log file and also there was no email
coming in
> > to
> > > the mailbox so far.
> > >
> > > "Daniel Reib [MSFT]" wrote:
> > >
> > > > What happens if you run the job manually. Right click on the Sql
Agent
> > job
> > > > and choose start job. This should cause the job to execute.
> > > >
> > > > --
> > > > -Daniel
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > news:3DF5F4E2-AEC5-4DA1-B495-B2B821F319E9@.microsoft.com...
> > > > > Daniel,
> > > > >
> > > > > One thing I want to mention is that I changed the schedule to the
new
> > > > > schedule last week for the report to be sent out on every Monday
4pm
> > with
> > > > > which the latest running time was on 8/09 at 4pm. I checked the
> > history
> > > > of
> > > > > the job and it was running at 8/09/2004 4pm. Then I checked the
log
> > file
> > > > > around that time. There is no any event for this job on 8/09 at
4pm,
> > but I
> > > > > found the event for this job on the log file dated at 8/10/2004
2:02am
> > > > which
> > > > > was the actual time this report was sent out this morning. I cut
that
> > part
> > > > of
> > > > > the log file for this job and paste it here:
> > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d executed at 8/10/2004 2:02:56
AM.
> > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d execution completed at
8/10/2004
> > > > 2:02:56
> > > > > AM.
> > > > >
> > > > > Thanks
> > > > >
> > > > > "Daniel Reib [MSFT]" wrote:
> > > > >
> > > > > > Ok, I am assuming that is what you expect. The next thing to
check
> > > > would be
> > > > > > to check the history of the job. Make sure that it is firing
when
> > you
> > > > > > expect. If they are then look in the
ReportServerService<date>.log
> > > > file.
> > > > > > Around the time the schedule is fired an event should be picked
up
> > from
> > > > the
> > > > > > Event table, and this should be logged.
> > > > > >
> > > > > > Can you verify that all of this is happening.
> > > > > >
> > > > > > --
> > > > > > -Daniel
> > > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.
> > > > > >
> > > > > >
> > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> > > > > > > Daniel,
> > > > > > >
> > > > > > > The SQL job is scheduled to fire on Every week on Tuesday 4pm.
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > >
> > > > > > > > Can you look at the SQL job that was created to see when it
is
> > > > scheduled
> > > > > > to
> > > > > > > > fire.
> > > > > > > >
> > > > > > > > --
> > > > > > > > -Daniel
> > > > > > > > This posting is provided "AS IS" with no warranties, and
confers
> > no
> > > > > > rights.
> > > > > > > >
> > > > > > > >
> > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > > > > > > > Daniel,
> > > > > > > > >
> > > > > > > > > Thank you for your response. Sql Server is on the same
box,
> > and
> > > > the
> > > > > > clock
> > > > > > > > on
> > > > > > > > > that machine is fine. The report was sent out on time
before I
> > > > > > installed
> > > > > > > > SP1.
> > > > > > > > > Any idea about why this could happen?
> > > > > > > > >
> > > > > > > > > Thanks.
> > > > > > > > >
> > > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > > >
> > > > > > > > > > Is you Sql Server on the same box? Is it possible the
clock
> > on
> > > > the
> > > > > > > > machine
> > > > > > > > > > that has SQL is 12 hours off?
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > -Daniel
> > > > > > > > > > This posting is provided "AS IS" with no warranties, and
> > confers
> > > > no
> > > > > > > > rights.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > > >
news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > > > > > > > I have a report which is scheduled to be sent out by
email
> > > > every
> > > > > > > > Tuesday
> > > > > > > > > > at
> > > > > > > > > > > 4pm. It used to run and be sent out on time. Then I
> > changed
> > > > the
> > > > > > report
> > > > > > > > a
> > > > > > > > > > > little adding a couple more subreports, the report
being
> > sent
> > > > out
> > > > > > that
> > > > > > > > > > week
> > > > > > > > > > > was a few minutes delayed but it was ok. Then I
installed
> > > > > > Reporting
> > > > > > > > > > Services
> > > > > > > > > > > SP1 and from that week the report was delayed over 12
> > hours to
> > > > be
> > > > > > sent
> > > > > > > > out
> > > > > > > > > > > and it is like this since then. I dropped the old
shared
> > > > schedule
> > > > > > and
> > > > > > > > > > added a
> > > > > > > > > > > new shaed schedule but the report still can't be sent
out
> > on
> > > > time.
> > > > > > > > Does
> > > > > > > > > > > anybody have any idea how to fix it?
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > >
> > > > > > > > > > > Mary
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >|||I turned off reportServe service and ran the job manually, there was no row
in Event table. Then I turned on the service and there is still no row in
that table. We have some jobs scheduled to run every 10 minutes, so the log
file is big. I don't see anywhere I can send attachment, so I'm sending you
the part aroud 3:24pm when the job was last run. Again, I don't see anything
in the log file for this job around 3:24pm.
ReportingServicesService!library!d98!08/11/2004-15:23:52:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server system
properties.
ReportingServicesService!library!230!8/11/2004-15:23:52:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server system
properties.
ReportingServicesService!library!cf0!8/11/2004-15:23:52:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server system
properties.
ReportingServicesService!library!230!8/11/2004-15:23:52:: Schedule
87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 8/11/2004 3:23:52
PM.
ReportingServicesService!library!cf0!8/11/2004-15:23:52:: Schedule
87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 8/11/2004 3:23:52
PM.
ReportingServicesService!dbpolling!230!8/11/2004-15:23:52:: EventPolling
finished processing item 4cd4644b-8a15-43fd-baf1-c2ca8cbcd0d9
ReportingServicesService!dbpolling!d44!8/11/2004-15:23:52:: EventPolling
processing 1 more items. 4 Total items in internal queue.
ReportingServicesService!dbpolling!230!8/11/2004-15:23:52:: EventPolling
processing item a2ff2ad5-dc41-442b-ba91-d3a9e1d76a47
ReportingServicesService!dbpolling!cf0!8/11/2004-15:23:52:: EventPolling
finished processing item ec3f0cbd-0ec0-44bd-b714-6af044c06ba0
ReportingServicesService!library!d98!08/11/2004-15:23:52:: Schedule
87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 08/11/2004
15:23:52.
ReportingServicesService!dbpolling!d98!08/11/2004-15:23:52:: EventPolling
finished processing item b98d78ad-15dd-48ce-8c32-8db9fc716d61
ReportingServicesService!library!230!8/11/2004-15:23:52:: Schedule
87d27b74-96a1-4f41-9df0-c451424665cf executed at 8/11/2004 3:23:52 PM.
ReportingServicesService!schedule!230!8/11/2004-15:23:52:: Updating report
execution snapshot for report /Summary Open Order Reports/OOCByDateFDR
ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54:: EventPolling
polling service stopped
ReportingServicesService!dbpolling!8c0!8/11/2004-15:23:54:: EventPolling
heartbeat thread exiting for stop.
ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54::
NotificationPolling polling service stopped
ReportingServicesService!dbpolling!c48!8/11/2004-15:23:54::
NotificationPolling heartbeat thread exiting for stop.
ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54:: SchedulePolling
polling service stopped
ReportingServicesService!servicecontroller!9e8!8/11/2004-15:23:54:: Service
controller exiting.
ReportingServicesService!processing!bc8!8/11/2004-15:23:54:: e ERROR:
Throwing
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query
execution failed for data set 'GMS'., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query
execution failed for data set 'GMS'. -->
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at
Microsoft.ReportingServices.DataExtensions.CommandWrapper.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.ReportProcessing.a0.v()
-- End of inner exception stack trace --
"Daniel Reib [MSFT]" wrote:
> So try this:
> Turn off the reportServer service
> Run the job manually
> See if a row is in the events table
> Turn on the ReportServer service
> See if row disappears
> Send me the latest reportserverservice<date>.log file
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Mary" <Mary@.discussions.microsoft.com> wrote in message
> news:79C1481E-78A5-4594-8758-8AECD43776A6@.microsoft.com...
> > Daniel,
> >
> > I checked Event table in report server database on that machine and there
> is
> > currently no row in that table. The value for PollingInterval is 10.
> >
> > Thanks
> >
> >
> >
> > "Daniel Reib [MSFT]" wrote:
> >
> > > When you manually start the job a row should be placed in the Event
> table in
> > > the report server database. Is this happening? Also can you tell me
> the
> > > value for the element PollingInterval in the rsreportserver.config file.
> > >
> > > --
> > > -Daniel
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > news:4A142D53-7729-4FA2-AB95-F610CA049DB0@.microsoft.com...
> > > > I just manually started the job 10 minutes ago and the SQL job was
> running
> > > > successfully. But there was no event fired around that time for this
> job
> > > when
> > > > I checked the report server log file and also there was no email
> coming in
> > > to
> > > > the mailbox so far.
> > > >
> > > > "Daniel Reib [MSFT]" wrote:
> > > >
> > > > > What happens if you run the job manually. Right click on the Sql
> Agent
> > > job
> > > > > and choose start job. This should cause the job to execute.
> > > > >
> > > > > --
> > > > > -Daniel
> > > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > > > >
> > > > >
> > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > news:3DF5F4E2-AEC5-4DA1-B495-B2B821F319E9@.microsoft.com...
> > > > > > Daniel,
> > > > > >
> > > > > > One thing I want to mention is that I changed the schedule to the
> new
> > > > > > schedule last week for the report to be sent out on every Monday
> 4pm
> > > with
> > > > > > which the latest running time was on 8/09 at 4pm. I checked the
> > > history
> > > > > of
> > > > > > the job and it was running at 8/09/2004 4pm. Then I checked the
> log
> > > file
> > > > > > around that time. There is no any event for this job on 8/09 at
> 4pm,
> > > but I
> > > > > > found the event for this job on the log file dated at 8/10/2004
> 2:02am
> > > > > which
> > > > > > was the actual time this report was sent out this morning. I cut
> that
> > > part
> > > > > of
> > > > > > the log file for this job and paste it here:
> > > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> > > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d executed at 8/10/2004 2:02:56
> AM.
> > > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56:: Schedule
> > > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d execution completed at
> 8/10/2004
> > > > > 2:02:56
> > > > > > AM.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > >
> > > > > > > Ok, I am assuming that is what you expect. The next thing to
> check
> > > > > would be
> > > > > > > to check the history of the job. Make sure that it is firing
> when
> > > you
> > > > > > > expect. If they are then look in the
> ReportServerService<date>.log
> > > > > file.
> > > > > > > Around the time the schedule is fired an event should be picked
> up
> > > from
> > > > > the
> > > > > > > Event table, and this should be logged.
> > > > > > >
> > > > > > > Can you verify that all of this is happening.
> > > > > > >
> > > > > > > --
> > > > > > > -Daniel
> > > > > > > This posting is provided "AS IS" with no warranties, and confers
> no
> > > > > rights.
> > > > > > >
> > > > > > >
> > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> > > > > > > > Daniel,
> > > > > > > >
> > > > > > > > The SQL job is scheduled to fire on Every week on Tuesday 4pm.
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > >
> > > > > > > > > Can you look at the SQL job that was created to see when it
> is
> > > > > scheduled
> > > > > > > to
> > > > > > > > > fire.
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > -Daniel
> > > > > > > > > This posting is provided "AS IS" with no warranties, and
> confers
> > > no
> > > > > > > rights.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > > news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > > > > > > > > Daniel,
> > > > > > > > > >
> > > > > > > > > > Thank you for your response. Sql Server is on the same
> box,
> > > and
> > > > > the
> > > > > > > clock
> > > > > > > > > on
> > > > > > > > > > that machine is fine. The report was sent out on time
> before I
> > > > > > > installed
> > > > > > > > > SP1.
> > > > > > > > > > Any idea about why this could happen?
> > > > > > > > > >
> > > > > > > > > > Thanks.
> > > > > > > > > >
> > > > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > > > >
> > > > > > > > > > > Is you Sql Server on the same box? Is it possible the
> clock
> > > on
> > > > > the
> > > > > > > > > machine
> > > > > > > > > > > that has SQL is 12 hours off?
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > -Daniel
> > > > > > > > > > > This posting is provided "AS IS" with no warranties, and
> > > confers
> > > > > no
> > > > > > > > > rights.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > > > >
> news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > > > > > > > > I have a report which is scheduled to be sent out by
> email
> > > > > every
> > > > > > > > > Tuesday
> > > > > > > > > > > at
> > > > > > > > > > > > 4pm. It used to run and be sent out on time. Then I
> > > changed
> > > > > the
> > > > > > > report
> > > > > > > > > a
> > > > > > > > > > > > little adding a couple more subreports, the report
> being
> > > sent
> > > > > out
> > > > > > > that
> > > > > > > > > > > week
> > > > > > > > > > > > was a few minutes delayed but it was ok. Then I
> installed
> > > > > > > Reporting
> > > > > > > > > > > Services
> > > > > > > > > > > > SP1 and from that week the report was delayed over 12
> > > hours to
> > > > > be
> > > > > > > sent
> > > > > > > > > out
> > > > > > > > > > > > and it is like this since then. I dropped the old
> shared
> > > > > schedule
> > > > > > > and
> > > > > > > > > > > added a
> > > > > > > > > > > > new shaed schedule but the report still can't be sent
> out
> > > on
> > > > > time.
> > > > > > > > > Does
> > > > > > > > > > > > anybody have any idea how to fix it?
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks,
> > > > > > > > > > > >
> > > > > > > > > > > > Mary
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>|||Ok, now we are getting somewhere. The fact that there was no row in the
event table after the job was fired is a problem. All the job does is call
a stored procedure which should enter a row in the event table. You say the
job fires successfully? There are no errors reported? Who is the job
owner?
Can you try running the command that the job runs from Query Analyzer? Run
it as the same user as the job. Does that add a row. If not was there an
error? You might also try running just the SQL in the stored proc that is
called, does that succeed? Do these with the reportServer service turned
off, otherwise if the row does get in then it will pick it up and delete the
row.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:778ADD45-9F76-4EAE-A58E-071B2DBC2AFA@.microsoft.com...
> I turned off reportServe service and ran the job manually, there was no
row
> in Event table. Then I turned on the service and there is still no row in
> that table. We have some jobs scheduled to run every 10 minutes, so the
log
> file is big. I don't see anywhere I can send attachment, so I'm sending
you
> the part aroud 3:24pm when the job was last run. Again, I don't see
anything
> in the log file for this job around 3:24pm.
> ReportingServicesService!library!d98!08/11/2004-15:23:52:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server
system
> properties.
> ReportingServicesService!library!230!8/11/2004-15:23:52:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server
system
> properties.
> ReportingServicesService!library!cf0!8/11/2004-15:23:52:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server
system
> properties.
> ReportingServicesService!library!230!8/11/2004-15:23:52:: Schedule
> 87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 8/11/2004
3:23:52
> PM.
> ReportingServicesService!library!cf0!8/11/2004-15:23:52:: Schedule
> 87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 8/11/2004
3:23:52
> PM.
> ReportingServicesService!dbpolling!230!8/11/2004-15:23:52:: EventPolling
> finished processing item 4cd4644b-8a15-43fd-baf1-c2ca8cbcd0d9
> ReportingServicesService!dbpolling!d44!8/11/2004-15:23:52:: EventPolling
> processing 1 more items. 4 Total items in internal queue.
> ReportingServicesService!dbpolling!230!8/11/2004-15:23:52:: EventPolling
> processing item a2ff2ad5-dc41-442b-ba91-d3a9e1d76a47
> ReportingServicesService!dbpolling!cf0!8/11/2004-15:23:52:: EventPolling
> finished processing item ec3f0cbd-0ec0-44bd-b714-6af044c06ba0
> ReportingServicesService!library!d98!08/11/2004-15:23:52:: Schedule
> 87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 08/11/2004
> 15:23:52.
> ReportingServicesService!dbpolling!d98!08/11/2004-15:23:52:: EventPolling
> finished processing item b98d78ad-15dd-48ce-8c32-8db9fc716d61
> ReportingServicesService!library!230!8/11/2004-15:23:52:: Schedule
> 87d27b74-96a1-4f41-9df0-c451424665cf executed at 8/11/2004 3:23:52 PM.
> ReportingServicesService!schedule!230!8/11/2004-15:23:52:: Updating report
> execution snapshot for report /Summary Open Order Reports/OOCByDateFDR
> ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54:: EventPolling
> polling service stopped
> ReportingServicesService!dbpolling!8c0!8/11/2004-15:23:54:: EventPolling
> heartbeat thread exiting for stop.
> ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54::
> NotificationPolling polling service stopped
> ReportingServicesService!dbpolling!c48!8/11/2004-15:23:54::
> NotificationPolling heartbeat thread exiting for stop.
> ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54::
SchedulePolling
> polling service stopped
> ReportingServicesService!servicecontroller!9e8!8/11/2004-15:23:54::
Service
> controller exiting.
> ReportingServicesService!processing!bc8!8/11/2004-15:23:54:: e ERROR:
> Throwing
> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Query
> execution failed for data set 'GMS'., ;
> Info:
> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Query
> execution failed for data set 'GMS'. -->
> System.Threading.ThreadAbortException: Thread was being aborted.
> at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
> at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior)
> at
>
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(Comman
dBehavior behavior)
> at
>
Microsoft.ReportingServices.DataExtensions.CommandWrapper.ExecuteReader(Comm
andBehavior behavior)
> at Microsoft.ReportingServices.ReportProcessing.a0.v()
> -- End of inner exception stack trace --
>
> "Daniel Reib [MSFT]" wrote:
> > So try this:
> >
> > Turn off the reportServer service
> > Run the job manually
> > See if a row is in the events table
> > Turn on the ReportServer service
> > See if row disappears
> > Send me the latest reportserverservice<date>.log file
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > news:79C1481E-78A5-4594-8758-8AECD43776A6@.microsoft.com...
> > > Daniel,
> > >
> > > I checked Event table in report server database on that machine and
there
> > is
> > > currently no row in that table. The value for PollingInterval is 10.
> > >
> > > Thanks
> > >
> > >
> > >
> > > "Daniel Reib [MSFT]" wrote:
> > >
> > > > When you manually start the job a row should be placed in the Event
> > table in
> > > > the report server database. Is this happening? Also can you tell
me
> > the
> > > > value for the element PollingInterval in the rsreportserver.config
file.
> > > >
> > > > --
> > > > -Daniel
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > news:4A142D53-7729-4FA2-AB95-F610CA049DB0@.microsoft.com...
> > > > > I just manually started the job 10 minutes ago and the SQL job was
> > running
> > > > > successfully. But there was no event fired around that time for
this
> > job
> > > > when
> > > > > I checked the report server log file and also there was no email
> > coming in
> > > > to
> > > > > the mailbox so far.
> > > > >
> > > > > "Daniel Reib [MSFT]" wrote:
> > > > >
> > > > > > What happens if you run the job manually. Right click on the
Sql
> > Agent
> > > > job
> > > > > > and choose start job. This should cause the job to execute.
> > > > > >
> > > > > > --
> > > > > > -Daniel
> > > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.
> > > > > >
> > > > > >
> > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > news:3DF5F4E2-AEC5-4DA1-B495-B2B821F319E9@.microsoft.com...
> > > > > > > Daniel,
> > > > > > >
> > > > > > > One thing I want to mention is that I changed the schedule to
the
> > new
> > > > > > > schedule last week for the report to be sent out on every
Monday
> > 4pm
> > > > with
> > > > > > > which the latest running time was on 8/09 at 4pm. I checked
the
> > > > history
> > > > > > of
> > > > > > > the job and it was running at 8/09/2004 4pm. Then I checked
the
> > log
> > > > file
> > > > > > > around that time. There is no any event for this job on 8/09
at
> > 4pm,
> > > > but I
> > > > > > > found the event for this job on the log file dated at
8/10/2004
> > 2:02am
> > > > > > which
> > > > > > > was the actual time this report was sent out this morning. I
cut
> > that
> > > > part
> > > > > > of
> > > > > > > the log file for this job and paste it here:
> > > > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56::
Schedule
> > > > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d executed at 8/10/2004
2:02:56
> > AM.
> > > > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56::
Schedule
> > > > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d execution completed at
> > 8/10/2004
> > > > > > 2:02:56
> > > > > > > AM.
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > >
> > > > > > > > Ok, I am assuming that is what you expect. The next thing
to
> > check
> > > > > > would be
> > > > > > > > to check the history of the job. Make sure that it is
firing
> > when
> > > > you
> > > > > > > > expect. If they are then look in the
> > ReportServerService<date>.log
> > > > > > file.
> > > > > > > > Around the time the schedule is fired an event should be
picked
> > up
> > > > from
> > > > > > the
> > > > > > > > Event table, and this should be logged.
> > > > > > > >
> > > > > > > > Can you verify that all of this is happening.
> > > > > > > >
> > > > > > > > --
> > > > > > > > -Daniel
> > > > > > > > This posting is provided "AS IS" with no warranties, and
confers
> > no
> > > > > > rights.
> > > > > > > >
> > > > > > > >
> > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> > > > > > > > > Daniel,
> > > > > > > > >
> > > > > > > > > The SQL job is scheduled to fire on Every week on Tuesday
4pm.
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > > >
> > > > > > > > > > Can you look at the SQL job that was created to see when
it
> > is
> > > > > > scheduled
> > > > > > > > to
> > > > > > > > > > fire.
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > -Daniel
> > > > > > > > > > This posting is provided "AS IS" with no warranties, and
> > confers
> > > > no
> > > > > > > > rights.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > > >
news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > > > > > > > > > Daniel,
> > > > > > > > > > >
> > > > > > > > > > > Thank you for your response. Sql Server is on the same
> > box,
> > > > and
> > > > > > the
> > > > > > > > clock
> > > > > > > > > > on
> > > > > > > > > > > that machine is fine. The report was sent out on time
> > before I
> > > > > > > > installed
> > > > > > > > > > SP1.
> > > > > > > > > > > Any idea about why this could happen?
> > > > > > > > > > >
> > > > > > > > > > > Thanks.
> > > > > > > > > > >
> > > > > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Is you Sql Server on the same box? Is it possible
the
> > clock
> > > > on
> > > > > > the
> > > > > > > > > > machine
> > > > > > > > > > > > that has SQL is 12 hours off?
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > -Daniel
> > > > > > > > > > > > This posting is provided "AS IS" with no warranties,
and
> > > > confers
> > > > > > no
> > > > > > > > > > rights.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in
message
> > > > > > > > > > > >
> > news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > > > > > > > > > I have a report which is scheduled to be sent out
by
> > email
> > > > > > every
> > > > > > > > > > Tuesday
> > > > > > > > > > > > at
> > > > > > > > > > > > > 4pm. It used to run and be sent out on time. Then
I
> > > > changed
> > > > > > the
> > > > > > > > report
> > > > > > > > > > a
> > > > > > > > > > > > > little adding a couple more subreports, the report
> > being
> > > > sent
> > > > > > out
> > > > > > > > that
> > > > > > > > > > > > week
> > > > > > > > > > > > > was a few minutes delayed but it was ok. Then I
> > installed
> > > > > > > > Reporting
> > > > > > > > > > > > Services
> > > > > > > > > > > > > SP1 and from that week the report was delayed over
12
> > > > hours to
> > > > > > be
> > > > > > > > sent
> > > > > > > > > > out
> > > > > > > > > > > > > and it is like this since then. I dropped the old
> > shared
> > > > > > schedule
> > > > > > > > and
> > > > > > > > > > > > added a
> > > > > > > > > > > > > new shaed schedule but the report still can't be
sent
> > out
> > > > on
> > > > > > time.
> > > > > > > > > > Does
> > > > > > > > > > > > > anybody have any idea how to fix it?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > >
> > > > > > > > > > > > > Mary
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >|||My guess is the service you are turning on and off is actually pointing to
the other DB. You should run rsconfig to make sure it is pointing to the
database you think it is.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mary" <Mary@.discussions.microsoft.com> wrote in message
news:363E5281-4099-447F-81DB-AED237198B5B@.microsoft.com...
> Daniel,
> WhenI tried to run the command the job runs, I realized I was wrong at
some
> point. There are actually two report server database on the same machine
with
> another one is called ReporterverII (I guess it resulted from two times of
> the initial installations). So the job command is actually using
> ReportServerII database but all I checked yesterday was another
ReportServer
> database. Here is what I did today: I turned off ReporServer service and
> manully started the SQL job with the job successfully ran at 12:13pm, then
I
> found there was a row added to the Event table with this job ID but with
> TimeEntered was 16:13pm. Then I truned on the ReportServer service, that
row
> is still in the Event table. I checked log file around that time stamp,
and I
> didn't find anything for this job. Also there is no email coming in so
far.
> Hope I'm not cofussing you.
> Thanks
> "Daniel Reib [MSFT]" wrote:
> > Ok, now we are getting somewhere. The fact that there was no row in the
> > event table after the job was fired is a problem. All the job does is
call
> > a stored procedure which should enter a row in the event table. You say
the
> > job fires successfully? There are no errors reported? Who is the job
> > owner?
> >
> > Can you try running the command that the job runs from Query Analyzer?
Run
> > it as the same user as the job. Does that add a row. If not was there
an
> > error? You might also try running just the SQL in the stored proc that
is
> > called, does that succeed? Do these with the reportServer service
turned
> > off, otherwise if the row does get in then it will pick it up and delete
the
> > row.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > news:778ADD45-9F76-4EAE-A58E-071B2DBC2AFA@.microsoft.com...
> > > I turned off reportServe service and ran the job manually, there was
no
> > row
> > > in Event table. Then I turned on the service and there is still no row
in
> > > that table. We have some jobs scheduled to run every 10 minutes, so
the
> > log
> > > file is big. I don't see anywhere I can send attachment, so I'm
sending
> > you
> > > the part aroud 3:24pm when the job was last run. Again, I don't see
> > anything
> > > in the log file for this job around 3:24pm.
> > >
> > > ReportingServicesService!library!d98!08/11/2004-15:23:52:: i INFO:
> > > Initializing EnableExecutionLogging to 'True' as specified in Server
> > system
> > > properties.
> > > ReportingServicesService!library!230!8/11/2004-15:23:52:: i INFO:
> > > Initializing EnableExecutionLogging to 'True' as specified in Server
> > system
> > > properties.
> > > ReportingServicesService!library!cf0!8/11/2004-15:23:52:: i INFO:
> > > Initializing EnableExecutionLogging to 'True' as specified in Server
> > system
> > > properties.
> > > ReportingServicesService!library!230!8/11/2004-15:23:52:: Schedule
> > > 87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 8/11/2004
> > 3:23:52
> > > PM.
> > > ReportingServicesService!library!cf0!8/11/2004-15:23:52:: Schedule
> > > 87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 8/11/2004
> > 3:23:52
> > > PM.
> > > ReportingServicesService!dbpolling!230!8/11/2004-15:23:52::
EventPolling
> > > finished processing item 4cd4644b-8a15-43fd-baf1-c2ca8cbcd0d9
> > > ReportingServicesService!dbpolling!d44!8/11/2004-15:23:52::
EventPolling
> > > processing 1 more items. 4 Total items in internal queue.
> > > ReportingServicesService!dbpolling!230!8/11/2004-15:23:52::
EventPolling
> > > processing item a2ff2ad5-dc41-442b-ba91-d3a9e1d76a47
> > > ReportingServicesService!dbpolling!cf0!8/11/2004-15:23:52::
EventPolling
> > > finished processing item ec3f0cbd-0ec0-44bd-b714-6af044c06ba0
> > > ReportingServicesService!library!d98!08/11/2004-15:23:52:: Schedule
> > > 87d27b74-96a1-4f41-9df0-c451424665cf execution completed at 08/11/2004
> > > 15:23:52.
> > > ReportingServicesService!dbpolling!d98!08/11/2004-15:23:52::
EventPolling
> > > finished processing item b98d78ad-15dd-48ce-8c32-8db9fc716d61
> > > ReportingServicesService!library!230!8/11/2004-15:23:52:: Schedule
> > > 87d27b74-96a1-4f41-9df0-c451424665cf executed at 8/11/2004 3:23:52 PM.
> > > ReportingServicesService!schedule!230!8/11/2004-15:23:52:: Updating
report
> > > execution snapshot for report /Summary Open Order Reports/OOCByDateFDR
> > > ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54::
EventPolling
> > > polling service stopped
> > > ReportingServicesService!dbpolling!8c0!8/11/2004-15:23:54::
EventPolling
> > > heartbeat thread exiting for stop.
> > > ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54::
> > > NotificationPolling polling service stopped
> > > ReportingServicesService!dbpolling!c48!8/11/2004-15:23:54::
> > > NotificationPolling heartbeat thread exiting for stop.
> > > ReportingServicesService!dbpolling!9e8!8/11/2004-15:23:54::
> > SchedulePolling
> > > polling service stopped
> > > ReportingServicesService!servicecontroller!9e8!8/11/2004-15:23:54::
> > Service
> > > controller exiting.
> > > ReportingServicesService!processing!bc8!8/11/2004-15:23:54:: e ERROR:
> > > Throwing
> > >
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
> > Query
> > > execution failed for data set 'GMS'., ;
> > > Info:
> > >
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
> > Query
> > > execution failed for data set 'GMS'. -->
> > > System.Threading.ThreadAbortException: Thread was being aborted.
> > > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
> > > cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
> > > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
> > behavior)
> > > at
> > >
> >
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(Comman
> > dBehavior behavior)
> > > at
> > >
> >
Microsoft.ReportingServices.DataExtensions.CommandWrapper.ExecuteReader(Comm
> > andBehavior behavior)
> > > at Microsoft.ReportingServices.ReportProcessing.a0.v()
> > > -- End of inner exception stack trace --
> > >
> > >
> > > "Daniel Reib [MSFT]" wrote:
> > >
> > > > So try this:
> > > >
> > > > Turn off the reportServer service
> > > > Run the job manually
> > > > See if a row is in the events table
> > > > Turn on the ReportServer service
> > > > See if row disappears
> > > > Send me the latest reportserverservice<date>.log file
> > > >
> > > > --
> > > > -Daniel
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > news:79C1481E-78A5-4594-8758-8AECD43776A6@.microsoft.com...
> > > > > Daniel,
> > > > >
> > > > > I checked Event table in report server database on that machine
and
> > there
> > > > is
> > > > > currently no row in that table. The value for PollingInterval is
10.
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > > >
> > > > > "Daniel Reib [MSFT]" wrote:
> > > > >
> > > > > > When you manually start the job a row should be placed in the
Event
> > > > table in
> > > > > > the report server database. Is this happening? Also can you
tell
> > me
> > > > the
> > > > > > value for the element PollingInterval in the
rsreportserver.config
> > file.
> > > > > >
> > > > > > --
> > > > > > -Daniel
> > > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.
> > > > > >
> > > > > >
> > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > news:4A142D53-7729-4FA2-AB95-F610CA049DB0@.microsoft.com...
> > > > > > > I just manually started the job 10 minutes ago and the SQL job
was
> > > > running
> > > > > > > successfully. But there was no event fired around that time
for
> > this
> > > > job
> > > > > > when
> > > > > > > I checked the report server log file and also there was no
email
> > > > coming in
> > > > > > to
> > > > > > > the mailbox so far.
> > > > > > >
> > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > >
> > > > > > > > What happens if you run the job manually. Right click on
the
> > Sql
> > > > Agent
> > > > > > job
> > > > > > > > and choose start job. This should cause the job to execute.
> > > > > > > >
> > > > > > > > --
> > > > > > > > -Daniel
> > > > > > > > This posting is provided "AS IS" with no warranties, and
confers
> > no
> > > > > > rights.
> > > > > > > >
> > > > > > > >
> > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > news:3DF5F4E2-AEC5-4DA1-B495-B2B821F319E9@.microsoft.com...
> > > > > > > > > Daniel,
> > > > > > > > >
> > > > > > > > > One thing I want to mention is that I changed the schedule
to
> > the
> > > > new
> > > > > > > > > schedule last week for the report to be sent out on every
> > Monday
> > > > 4pm
> > > > > > with
> > > > > > > > > which the latest running time was on 8/09 at 4pm. I
checked
> > the
> > > > > > history
> > > > > > > > of
> > > > > > > > > the job and it was running at 8/09/2004 4pm. Then I
checked
> > the
> > > > log
> > > > > > file
> > > > > > > > > around that time. There is no any event for this job on
8/09
> > at
> > > > 4pm,
> > > > > > but I
> > > > > > > > > found the event for this job on the log file dated at
> > 8/10/2004
> > > > 2:02am
> > > > > > > > which
> > > > > > > > > was the actual time this report was sent out this morning.
I
> > cut
> > > > that
> > > > > > part
> > > > > > > > of
> > > > > > > > > the log file for this job and paste it here:
> > > > > > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56::
> > Schedule
> > > > > > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d executed at 8/10/2004
> > 2:02:56
> > > > AM.
> > > > > > > > > ReportingServicesService!library!de8!8/10/2004-02:02:56::
> > Schedule
> > > > > > > > > 0c6ad482-0b44-405e-a1cc-c15b0f1b238d execution completed
at
> > > > 8/10/2004
> > > > > > > > 2:02:56
> > > > > > > > > AM.
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > > >
> > > > > > > > > > Ok, I am assuming that is what you expect. The next
thing
> > to
> > > > check
> > > > > > > > would be
> > > > > > > > > > to check the history of the job. Make sure that it is
> > firing
> > > > when
> > > > > > you
> > > > > > > > > > expect. If they are then look in the
> > > > ReportServerService<date>.log
> > > > > > > > file.
> > > > > > > > > > Around the time the schedule is fired an event should be
> > picked
> > > > up
> > > > > > from
> > > > > > > > the
> > > > > > > > > > Event table, and this should be logged.
> > > > > > > > > >
> > > > > > > > > > Can you verify that all of this is happening.
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > -Daniel
> > > > > > > > > > This posting is provided "AS IS" with no warranties, and
> > confers
> > > > no
> > > > > > > > rights.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in message
> > > > > > > > > >
news:00B85A4A-D50E-40BC-8B85-F3BA129515CD@.microsoft.com...
> > > > > > > > > > > Daniel,
> > > > > > > > > > >
> > > > > > > > > > > The SQL job is scheduled to fire on Every week on
Tuesday
> > 4pm.
> > > > > > > > > > >
> > > > > > > > > > > Thanks
> > > > > > > > > > >
> > > > > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Can you look at the SQL job that was created to see
when
> > it
> > > > is
> > > > > > > > scheduled
> > > > > > > > > > to
> > > > > > > > > > > > fire.
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > -Daniel
> > > > > > > > > > > > This posting is provided "AS IS" with no warranties,
and
> > > > confers
> > > > > > no
> > > > > > > > > > rights.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in
message
> > > > > > > > > > > >
> > news:241C68BF-31FC-4A20-8371-216B270AB697@.microsoft.com...
> > > > > > > > > > > > > Daniel,
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thank you for your response. Sql Server is on the
same
> > > > box,
> > > > > > and
> > > > > > > > the
> > > > > > > > > > clock
> > > > > > > > > > > > on
> > > > > > > > > > > > > that machine is fine. The report was sent out on
time
> > > > before I
> > > > > > > > > > installed
> > > > > > > > > > > > SP1.
> > > > > > > > > > > > > Any idea about why this could happen?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks.
> > > > > > > > > > > > >
> > > > > > > > > > > > > "Daniel Reib [MSFT]" wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Is you Sql Server on the same box? Is it
possible
> > the
> > > > clock
> > > > > > on
> > > > > > > > the
> > > > > > > > > > > > machine
> > > > > > > > > > > > > > that has SQL is 12 hours off?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > > -Daniel
> > > > > > > > > > > > > > This posting is provided "AS IS" with no
warranties,
> > and
> > > > > > confers
> > > > > > > > no
> > > > > > > > > > > > rights.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > "Mary" <Mary@.discussions.microsoft.com> wrote in
> > message
> > > > > > > > > > > > > >
> > > > news:6DAB515D-B442-47BB-88DA-BFA95E9F08D3@.microsoft.com...
> > > > > > > > > > > > > > > I have a report which is scheduled to be sent
out
> > by
> > > > email
> > > > > > > > every
> > > > > > > > > > > > Tuesday
> > > > > > > > > > > > > > at
> > > > > > > > > > > > > > > 4pm. It used to run and be sent out on time.
Then
> > I
> > > > > > changed
> > > > > > > > the
> > > > > > > > > > report
> > > > > > > > > > > > a
> > > > > > > > > > > > > > > little adding a couple more subreports, the
report
> > > > being
> > > > > > sent
> > > > > > > > out
> > > > > > > > > > that
> > > > > > > > > > > > > > week
> > > > > > > > > > > > > > > was a few minutes delayed but it was ok. Then
I
> > > > installed
> > > > > > > > > > Reporting
> > > > > > > > > > > > > > Services
> > > > > > > > > > > > > > > SP1 and from that week the report was delayed
over
> > 12
> > > > > > hours to
> > > > > > > > be
> > > > > > > > > > sent
> > > > > > > > > > > > out
> > > > > > > > > > > > > > > and it is like this since then. I dropped the
old
> > > > shared
> > > > > > > > schedule
> > > > > > > > > > and
> > > > > > > > > > > > > > added a
> > > > > > > > > > > > > > > new shaed schedule but the report still can't
be
> > sent
> > > > out
> > > > > > on
> > > > > > > > time.
> > > > > > > > > > > > Does
> > > > > > > > > > > > > > > anybody have any idea how to fix it?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Mary
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >

Tuesday, February 21, 2012

Schedule a SQL statement to run from SQL Server ?

How can I schedule a SQL Statement to run from SQL Server say every day at 4
pm ?
For example, I would like to run the following sql statement every day at 4
pm:
"delete myTable where myCol < dateadd(day, -1, getdate())". Can I schedule
it to run automatically on SQL server ?
Thanks.
Create an SQL Server Agent job. EM, Management, SQL Server Agent, Jobs.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"fniles" <fniles@.pfmail.com> wrote in message news:O9n50NcGFHA.2280@.TK2MSFTNGP15.phx.gbl...
> How can I schedule a SQL Statement to run from SQL Server say every day at 4 pm ?
> For example, I would like to run the following sql statement every day at 4 pm:
> "delete myTable where myCol < dateadd(day, -1, getdate())". Can I schedule it to run automatically
> on SQL server ?
> Thanks.
>
|||"fniles" <fniles@.pfmail.com> wrote in message
news:O9n50NcGFHA.2280@.TK2MSFTNGP15.phx.gbl...
> How can I schedule a SQL Statement to run from SQL Server say every day at
4
> pm ?
> For example, I would like to run the following sql statement every day at
4
> pm:
> "delete myTable where myCol < dateadd(day, -1, getdate())". Can I schedule
> it to run automatically on SQL server ?
Create a new job in the SQL Server Agent, where it runs your T-SQL
statement. Then schedule it to run every 4 hours (see the Schedules tab).
Steve
|||Have you looked at Management / SQL Server Agent / Jobs?
Also, since other things can be running on the server, and your job won't
always run at *precisely* 4:00, and if precision in the amount of data you
delete is important, you may want to say:
DECLARE @.yesterday400 SMALLDATETIME
SET @.yesterday400 = DATEADD(HOUR, 16, DATEADD(DAY, -1, DATEDIFF(DAY, 0,
GETDATE())))
DELETE myTable WHERE myCol < @.yesterday400
(This will make sure the cutoff is always yesterday at exactly 4:00 PM, as
opposed to the time the statement is executed, which could be a few seconds
off.)
You should also consider putting your DELETE statement in a stored
procedure, and calling the stored procedure from the job.
http://www.aspfaq.com/
(Reverse address to reply.)
"fniles" <fniles@.pfmail.com> wrote in message
news:O9n50NcGFHA.2280@.TK2MSFTNGP15.phx.gbl...
> How can I schedule a SQL Statement to run from SQL Server say every day at
4
> pm ?
> For example, I would like to run the following sql statement every day at
4
> pm:
> "delete myTable where myCol < dateadd(day, -1, getdate())". Can I schedule
> it to run automatically on SQL server ?
> Thanks.
>
|||Thank you all for your replies.
In Enterprise Manager, I do not see Management or SQL Server Agent.
I do see under "Tools" - "Job Scheduling" where I can schedule a T-SQL to
run. Is this what you all meant ?
Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23LOVUPcGFHA.2356@.TK2MSFTNGP12.phx.gbl...
> Create an SQL Server Agent job. EM, Management, SQL Server Agent, Jobs.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:O9n50NcGFHA.2280@.TK2MSFTNGP15.phx.gbl...
>
|||I think you're looking in the wrong place.
http://www.aspfaq.com/img/2403.gif
http://www.aspfaq.com/
(Reverse address to reply.)
"fniles" <fniles@.pfmail.com> wrote in message
news:#Si9kYcGFHA.2752@.TK2MSFTNGP12.phx.gbl...
> Thank you all for your replies.
> In Enterprise Manager, I do not see Management or SQL Server Agent.
> I do see under "Tools" - "Job Scheduling" where I can schedule a T-SQL to
> run. Is this what you all meant ?
> Thanks.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in[vbcol=seagreen]
> message news:%23LOVUPcGFHA.2356@.TK2MSFTNGP12.phx.gbl...
at
>
|||Thank you all for your replies.
I found the Management / SQL Server Agent / Jobs.
When I went there, and click "Jobs", I did see the job that I created
earlier using the menu "Tools" - "Job Scheduling".
So, creating a job thru menu "Tools" - "Job Scheduling" and thru Management
/ SQL Server Agent / Jobs are the same, right ?
Thanks.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:u8FBAVcGFHA.1476@.TK2MSFTNGP09.phx.gbl...
> Have you looked at Management / SQL Server Agent / Jobs?
> Also, since other things can be running on the server, and your job won't
> always run at *precisely* 4:00, and if precision in the amount of data you
> delete is important, you may want to say:
> DECLARE @.yesterday400 SMALLDATETIME
> SET @.yesterday400 = DATEADD(HOUR, 16, DATEADD(DAY, -1, DATEDIFF(DAY, 0,
> GETDATE())))
> DELETE myTable WHERE myCol < @.yesterday400
> (This will make sure the cutoff is always yesterday at exactly 4:00 PM, as
> opposed to the time the statement is executed, which could be a few
> seconds
> off.)
> You should also consider putting your DELETE statement in a stored
> procedure, and calling the stored procedure from the job.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:O9n50NcGFHA.2280@.TK2MSFTNGP15.phx.gbl...
> 4
> 4
>
|||> So, creating a job thru menu "Tools" - "Job Scheduling" and thru
Management
> / SQL Server Agent / Jobs are the same, right ?
To be honest, I've never done the former, so I can't guarantee that they
produce identical results.
I think I prefer the latter because you can visually see which server is
creating the job.
A
|||Thanks.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OZ1AtTdGFHA.2356@.TK2MSFTNGP12.phx.gbl...
> Management
> To be honest, I've never done the former, so I can't guarantee that they
> produce identical results.
> I think I prefer the latter because you can visually see which server is
> creating the job.
> A
>
|||Aaron,
Just for my curriosity - What would be the adavantage of putting the DELETE
statement in a stored proc? I know that a Stored Proc often performs a bit
faster and it's good practice to create stored proc's for recurring scripts,
but is there any specific reason here that I'm missing?
Regards
Steen
Aaron [SQL Server MVP] wrote:[vbcol=seagreen]
> Have you looked at Management / SQL Server Agent / Jobs?
> Also, since other things can be running on the server, and your job
> won't always run at *precisely* 4:00, and if precision in the amount
> of data you delete is important, you may want to say:
> DECLARE @.yesterday400 SMALLDATETIME
> SET @.yesterday400 = DATEADD(HOUR, 16, DATEADD(DAY, -1, DATEDIFF(DAY,
> 0, GETDATE())))
> DELETE myTable WHERE myCol < @.yesterday400
> (This will make sure the cutoff is always yesterday at exactly 4:00
> PM, as opposed to the time the statement is executed, which could be
> a few seconds off.)
> You should also consider putting your DELETE statement in a stored
> procedure, and calling the stored procedure from the job.
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:O9n50NcGFHA.2280@.TK2MSFTNGP15.phx.gbl...