Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
Is there a better way to schedule that outside of a maintenance plan ?I prefer to use a SQL Agent Job. Using DTS isn't really necessary (and is
the wrong tool) in 'most' cases.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>|||Hello,
Why do you need DTS for this. All you have to do is:-
1. Open Enterprise Manager
2. Connect to SQL Server
3. Expand Management, Select Jobs and create new job.
4. In the job step give sp_updatestats and choose database
5. Provide a schedule to execute
6. Save the job
Based on the schedule.. SQL Server agent will trigger this job
Thanks
Hari
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>|||Hari Prasad wrote:[vbcol=seagreen]
> Hello,
> Why do you need DTS for this. All you have to do is:-
> 1. Open Enterprise Manager
> 2. Connect to SQL Server
> 3. Expand Management, Select Jobs and create new job.
> 4. In the job step give sp_updatestats and choose database
> 5. Provide a schedule to execute
> 6. Save the job
> Based on the schedule.. SQL Server agent will trigger this job
> Thanks
> Hari
> "J1C" <just1coder@.yahoo.ca> wrote in message
> news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
Thanks - that is what I ended up doing rather than DTS.
Showing posts with label outside. Show all posts
Showing posts with label outside. Show all posts
Friday, March 30, 2012
Scheduling sp_updatestats
Labels:
basisis,
database,
dts,
execute,
maintenance,
microsoft,
mysql,
oracle,
outside,
plan,
schedule,
scheduling,
server,
sp_updatestats,
sql
Scheduling sp_updatestats
Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
Is there a better way to schedule that outside of a maintenance plan ?I prefer to use a SQL Agent Job. Using DTS isn't really necessary (and is
the wrong tool) in 'most' cases.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>|||Hello,
Why do you need DTS for this. All you have to do is:-
1. Open Enterprise Manager
2. Connect to SQL Server
3. Expand Management, Select Jobs and create new job.
4. In the job step give sp_updatestats and choose database
5. Provide a schedule to execute
6. Save the job
Based on the schedule.. SQL Server agent will trigger this job
Thanks
Hari
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>|||Hari Prasad wrote:
> Hello,
> Why do you need DTS for this. All you have to do is:-
> 1. Open Enterprise Manager
> 2. Connect to SQL Server
> 3. Expand Management, Select Jobs and create new job.
> 4. In the job step give sp_updatestats and choose database
> 5. Provide a schedule to execute
> 6. Save the job
> Based on the schedule.. SQL Server agent will trigger this job
> Thanks
> Hari
> "J1C" <just1coder@.yahoo.ca> wrote in message
> news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> > Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> > Is there a better way to schedule that outside of a maintenance plan ?
> >
Thanks - that is what I ended up doing rather than DTS.
Is there a better way to schedule that outside of a maintenance plan ?I prefer to use a SQL Agent Job. Using DTS isn't really necessary (and is
the wrong tool) in 'most' cases.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>|||Hello,
Why do you need DTS for this. All you have to do is:-
1. Open Enterprise Manager
2. Connect to SQL Server
3. Expand Management, Select Jobs and create new job.
4. In the job step give sp_updatestats and choose database
5. Provide a schedule to execute
6. Save the job
Based on the schedule.. SQL Server agent will trigger this job
Thanks
Hari
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>|||Hari Prasad wrote:
> Hello,
> Why do you need DTS for this. All you have to do is:-
> 1. Open Enterprise Manager
> 2. Connect to SQL Server
> 3. Expand Management, Select Jobs and create new job.
> 4. In the job step give sp_updatestats and choose database
> 5. Provide a schedule to execute
> 6. Save the job
> Based on the schedule.. SQL Server agent will trigger this job
> Thanks
> Hari
> "J1C" <just1coder@.yahoo.ca> wrote in message
> news:1164670349.026026.226980@.l39g2000cwd.googlegroups.com...
> > Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> > Is there a better way to schedule that outside of a maintenance plan ?
> >
Thanks - that is what I ended up doing rather than DTS.
Labels:
basis,
database,
dts,
execute,
maintenance,
microsoft,
mysql,
oracle,
outside,
plan,
schedule,
scheduling,
server,
sp_updatestats,
sql
Scheduling sp_updatestats
Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
Is there a better way to schedule that outside of a maintenance plan ?
I prefer to use a SQL Agent Job. Using DTS isn't really necessary (and is
the wrong tool) in 'most' cases.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegr oups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>
|||Hello,
Why do you need DTS for this. All you have to do is:-
1. Open Enterprise Manager
2. Connect to SQL Server
3. Expand Management, Select Jobs and create new job.
4. In the job step give sp_updatestats and choose database
5. Provide a schedule to execute
6. Save the job
Based on the schedule.. SQL Server agent will trigger this job
Thanks
Hari
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegr oups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>
|||Hari Prasad wrote:[vbcol=seagreen]
> Hello,
> Why do you need DTS for this. All you have to do is:-
> 1. Open Enterprise Manager
> 2. Connect to SQL Server
> 3. Expand Management, Select Jobs and create new job.
> 4. In the job step give sp_updatestats and choose database
> 5. Provide a schedule to execute
> 6. Save the job
> Based on the schedule.. SQL Server agent will trigger this job
> Thanks
> Hari
> "J1C" <just1coder@.yahoo.ca> wrote in message
> news:1164670349.026026.226980@.l39g2000cwd.googlegr oups.com...
Thanks - that is what I ended up doing rather than DTS.
Is there a better way to schedule that outside of a maintenance plan ?
I prefer to use a SQL Agent Job. Using DTS isn't really necessary (and is
the wrong tool) in 'most' cases.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegr oups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>
|||Hello,
Why do you need DTS for this. All you have to do is:-
1. Open Enterprise Manager
2. Connect to SQL Server
3. Expand Management, Select Jobs and create new job.
4. In the job step give sp_updatestats and choose database
5. Provide a schedule to execute
6. Save the job
Based on the schedule.. SQL Server agent will trigger this job
Thanks
Hari
"J1C" <just1coder@.yahoo.ca> wrote in message
news:1164670349.026026.226980@.l39g2000cwd.googlegr oups.com...
> Any reason NOT to use DTS to execute sp_updatestats on a daily basis?
> Is there a better way to schedule that outside of a maintenance plan ?
>
|||Hari Prasad wrote:[vbcol=seagreen]
> Hello,
> Why do you need DTS for this. All you have to do is:-
> 1. Open Enterprise Manager
> 2. Connect to SQL Server
> 3. Expand Management, Select Jobs and create new job.
> 4. In the job step give sp_updatestats and choose database
> 5. Provide a schedule to execute
> 6. Save the job
> Based on the schedule.. SQL Server agent will trigger this job
> Thanks
> Hari
> "J1C" <just1coder@.yahoo.ca> wrote in message
> news:1164670349.026026.226980@.l39g2000cwd.googlegr oups.com...
Thanks - that is what I ended up doing rather than DTS.
Labels:
basisis,
database,
dts,
execute,
maintenance,
microsoft,
mysql,
oracle,
outside,
plan,
schedule,
scheduling,
server,
sp_updatestats,
sql
Wednesday, March 28, 2012
Scheduling outside SRS
Hello All!
I have a requirement to set a schedule to run a report on the Tuesday
following the last Saturday of the month. It appears that this is not
possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
and to make it more complex, if the Tuesday in in the new month, quarter, or
year then the parameter should select the previous month, quarter, or year
not the default of current month, current quarter, or current year. I think
the last part can easily be handled by getting the parameter values from the
date of the last saturday of the month, which would always give you the
correct month for month end reporting no matter if the next Tues is in the
next month or not.
what I need is the syntax for defining the parameters and rendering the
report. I would also like to specify a network drive where it can be
archived, email a link to an audience, and save a snapshot in history.
Can someone please help me with this? If not all then parts would be
appreciated!!!
AnthonyI am in the same situation. Were you able to resolve this?
--
---
Yes, I searched first :)
"anthonysjo" wrote:
> Hello All!
> I have a requirement to set a schedule to run a report on the Tuesday
> following the last Saturday of the month. It appears that this is not
> possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
> and to make it more complex, if the Tuesday in in the new month, quarter, or
> year then the parameter should select the previous month, quarter, or year
> not the default of current month, current quarter, or current year. I think
> the last part can easily be handled by getting the parameter values from the
> date of the last saturday of the month, which would always give you the
> correct month for month end reporting no matter if the next Tues is in the
> next month or not.
> what I need is the syntax for defining the parameters and rendering the
> report. I would also like to specify a network drive where it can be
> archived, email a link to an audience, and save a snapshot in history.
> Can someone please help me with this? If not all then parts would be
> appreciated!!!
> Anthony
>|||Yes. Here is what you do. Create a subscription or a shared schedule but
set it to run only once and make it in the past. This will create a Schedule
ID in the database that you can reference later. Then open the Report Server
Database and return all rows for either the Schedules or Subcriptions table
depending on what you created. Copy the Schdule ID out of the table and make
note of the Event Type.
Now that you have this you can use the following code to fire the report
manually:
exec ReportServer.dbo.AddEvent
@.EventType='SharedSchedule', --Enter the event type here from the schedule
table in ReportServer Database
@.EventData='29C3FF88-D0D4-4B8A-A5D3-55DCBA8C215D' --Enter the subscription
ID here from the schedule table in ReportServer Database
I put this code inside the following stored procedure that is executed every
tuesday by a SQL job. If the @.myoutput date = Getdate then it executes the
code above otherwise it does nothing.
CREATE PROC dbo.MONTH_END_SCHEDULE as
--Declare variables
declare @.myoutputdate datetime
declare @.mydate datetime
declare @.minus int
declare @.TuesdayFound char(1)
declare @.subject varchar (255)
--set variables
set @.TuesdayFound='N'
--seed the date with the last day of the month
set
@.mydate=dateadd(dd,-1,convert(datetime,convert(varchar(2),datepart(mm,dateadd(mm,1,getdate())))+'/1/'+
convert(varchar(4),datepart(yy,dateadd(mm,1,getdate())))))
--a variable to backwards through the days of the month
set @.minus=0
WHILE @.TuesdayFound = 'N'
BEGIN
if datepart(dw,dateadd(dd,(@.minus*-1),@.mydate))=7 -- Find Last Saturday
BEGIN
set @.myoutputdate=dateadd(dd, 3,(dateadd(dd,(@.minus*-1),@.mydate))) --This
will add 3 days to the last Saturday
set @.TuesdayFound = 'Y'
END
set @.minus=@.minus+1
END
print @.myoutputdate
if datepart(dy,(getdate()))=datepart(dy,(@.myoutputdate))
BEGIN
exec ReportServer.dbo.AddEvent
@.EventType='SharedSchedule', --Enter the event type here from the schedule
table in ReportServer Database
@.EventData='29C3FF88-D0D4-4B8A-A5D3-55DCBA8C215D' --Enter the subscription
ID here from the schedule table in ReportServer Database
PRINT datename(mm, @.mydate)+ ' ' + datename(yyyy, @.mydate)+ ' Reports Fired '
SET @.subject = datename(mm, @.mydate)+ ' ' + datename(yyyy, @.mydate)+ ' Month
End reports are ready for viewing '
Exec master..xp_sendmail
@.recipients = 'someone@.somewhere.com',
@.copy_recipients = 'someone@.somewhere.com',
@.subject = @.subject,
@.message = 'Month End reports are now available via reporting services.
You can click on the link below and you will be taken directly to the
Month-End reports folder where you may choose to view the most recient
reports or view the history for archived reports.
http://localhost/Reports
If you have any questions please send an email to
someone@.somewhere.com'
END
GO
"Kmistic" wrote:
> I am in the same situation. Were you able to resolve this?
> --
> ---
> Yes, I searched first :)
>
> "anthonysjo" wrote:
> > Hello All!
> >
> > I have a requirement to set a schedule to run a report on the Tuesday
> > following the last Saturday of the month. It appears that this is not
> > possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
> > and to make it more complex, if the Tuesday in in the new month, quarter, or
> > year then the parameter should select the previous month, quarter, or year
> > not the default of current month, current quarter, or current year. I think
> > the last part can easily be handled by getting the parameter values from the
> > date of the last saturday of the month, which would always give you the
> > correct month for month end reporting no matter if the next Tues is in the
> > next month or not.
> >
> > what I need is the syntax for defining the parameters and rendering the
> > report. I would also like to specify a network drive where it can be
> > archived, email a link to an audience, and save a snapshot in history.
> >
> > Can someone please help me with this? If not all then parts would be
> > appreciated!!!
> >
> > Anthony
> >
I have a requirement to set a schedule to run a report on the Tuesday
following the last Saturday of the month. It appears that this is not
possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
and to make it more complex, if the Tuesday in in the new month, quarter, or
year then the parameter should select the previous month, quarter, or year
not the default of current month, current quarter, or current year. I think
the last part can easily be handled by getting the parameter values from the
date of the last saturday of the month, which would always give you the
correct month for month end reporting no matter if the next Tues is in the
next month or not.
what I need is the syntax for defining the parameters and rendering the
report. I would also like to specify a network drive where it can be
archived, email a link to an audience, and save a snapshot in history.
Can someone please help me with this? If not all then parts would be
appreciated!!!
AnthonyI am in the same situation. Were you able to resolve this?
--
---
Yes, I searched first :)
"anthonysjo" wrote:
> Hello All!
> I have a requirement to set a schedule to run a report on the Tuesday
> following the last Saturday of the month. It appears that this is not
> possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
> and to make it more complex, if the Tuesday in in the new month, quarter, or
> year then the parameter should select the previous month, quarter, or year
> not the default of current month, current quarter, or current year. I think
> the last part can easily be handled by getting the parameter values from the
> date of the last saturday of the month, which would always give you the
> correct month for month end reporting no matter if the next Tues is in the
> next month or not.
> what I need is the syntax for defining the parameters and rendering the
> report. I would also like to specify a network drive where it can be
> archived, email a link to an audience, and save a snapshot in history.
> Can someone please help me with this? If not all then parts would be
> appreciated!!!
> Anthony
>|||Yes. Here is what you do. Create a subscription or a shared schedule but
set it to run only once and make it in the past. This will create a Schedule
ID in the database that you can reference later. Then open the Report Server
Database and return all rows for either the Schedules or Subcriptions table
depending on what you created. Copy the Schdule ID out of the table and make
note of the Event Type.
Now that you have this you can use the following code to fire the report
manually:
exec ReportServer.dbo.AddEvent
@.EventType='SharedSchedule', --Enter the event type here from the schedule
table in ReportServer Database
@.EventData='29C3FF88-D0D4-4B8A-A5D3-55DCBA8C215D' --Enter the subscription
ID here from the schedule table in ReportServer Database
I put this code inside the following stored procedure that is executed every
tuesday by a SQL job. If the @.myoutput date = Getdate then it executes the
code above otherwise it does nothing.
CREATE PROC dbo.MONTH_END_SCHEDULE as
--Declare variables
declare @.myoutputdate datetime
declare @.mydate datetime
declare @.minus int
declare @.TuesdayFound char(1)
declare @.subject varchar (255)
--set variables
set @.TuesdayFound='N'
--seed the date with the last day of the month
set
@.mydate=dateadd(dd,-1,convert(datetime,convert(varchar(2),datepart(mm,dateadd(mm,1,getdate())))+'/1/'+
convert(varchar(4),datepart(yy,dateadd(mm,1,getdate())))))
--a variable to backwards through the days of the month
set @.minus=0
WHILE @.TuesdayFound = 'N'
BEGIN
if datepart(dw,dateadd(dd,(@.minus*-1),@.mydate))=7 -- Find Last Saturday
BEGIN
set @.myoutputdate=dateadd(dd, 3,(dateadd(dd,(@.minus*-1),@.mydate))) --This
will add 3 days to the last Saturday
set @.TuesdayFound = 'Y'
END
set @.minus=@.minus+1
END
print @.myoutputdate
if datepart(dy,(getdate()))=datepart(dy,(@.myoutputdate))
BEGIN
exec ReportServer.dbo.AddEvent
@.EventType='SharedSchedule', --Enter the event type here from the schedule
table in ReportServer Database
@.EventData='29C3FF88-D0D4-4B8A-A5D3-55DCBA8C215D' --Enter the subscription
ID here from the schedule table in ReportServer Database
PRINT datename(mm, @.mydate)+ ' ' + datename(yyyy, @.mydate)+ ' Reports Fired '
SET @.subject = datename(mm, @.mydate)+ ' ' + datename(yyyy, @.mydate)+ ' Month
End reports are ready for viewing '
Exec master..xp_sendmail
@.recipients = 'someone@.somewhere.com',
@.copy_recipients = 'someone@.somewhere.com',
@.subject = @.subject,
@.message = 'Month End reports are now available via reporting services.
You can click on the link below and you will be taken directly to the
Month-End reports folder where you may choose to view the most recient
reports or view the history for archived reports.
http://localhost/Reports
If you have any questions please send an email to
someone@.somewhere.com'
END
GO
"Kmistic" wrote:
> I am in the same situation. Were you able to resolve this?
> --
> ---
> Yes, I searched first :)
>
> "anthonysjo" wrote:
> > Hello All!
> >
> > I have a requirement to set a schedule to run a report on the Tuesday
> > following the last Saturday of the month. It appears that this is not
> > possible via the Web UI so I hear I need to schedule it outside SRS. Oh yeah
> > and to make it more complex, if the Tuesday in in the new month, quarter, or
> > year then the parameter should select the previous month, quarter, or year
> > not the default of current month, current quarter, or current year. I think
> > the last part can easily be handled by getting the parameter values from the
> > date of the last saturday of the month, which would always give you the
> > correct month for month end reporting no matter if the next Tues is in the
> > next month or not.
> >
> > what I need is the syntax for defining the parameters and rendering the
> > report. I would also like to specify a network drive where it can be
> > archived, email a link to an audience, and save a snapshot in history.
> >
> > Can someone please help me with this? If not all then parts would be
> > appreciated!!!
> >
> > Anthony
> >
Friday, March 23, 2012
Scheduling
Hi there
I have uploaded some reports to our reporting services server, however I
want to be able to have them emailed to clients outside the network at the
end of each week,
Can you explain how to do this?
Regards
TimYou can set up a subscription via the subscription tab in Report Manager.
If you are using the Enterprise edition of Report Server you will want to
take a look into Data Driven Subscriptions.
You can find more information here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPORTAL/HTM/rs_gts_portal_3vqd.asp
Here is information of Data Driven Subscriptions:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSUIREF/htm/f1_rsc_manager_v1_9syq.asp
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"catalyst" <catalyst@.discussions.microsoft.com> wrote in message
news:E5DFB9D6-5DD1-4F51-9A2A-E405BD343D84@.microsoft.com...
> Hi there
> I have uploaded some reports to our reporting services server, however I
> want to be able to have them emailed to clients outside the network at the
> end of each week,
> Can you explain how to do this?
> Regards
> Tim
I have uploaded some reports to our reporting services server, however I
want to be able to have them emailed to clients outside the network at the
end of each week,
Can you explain how to do this?
Regards
TimYou can set up a subscription via the subscription tab in Report Manager.
If you are using the Enterprise edition of Report Server you will want to
take a look into Data Driven Subscriptions.
You can find more information here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPORTAL/HTM/rs_gts_portal_3vqd.asp
Here is information of Data Driven Subscriptions:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSUIREF/htm/f1_rsc_manager_v1_9syq.asp
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"catalyst" <catalyst@.discussions.microsoft.com> wrote in message
news:E5DFB9D6-5DD1-4F51-9A2A-E405BD343D84@.microsoft.com...
> Hi there
> I have uploaded some reports to our reporting services server, however I
> want to be able to have them emailed to clients outside the network at the
> end of each week,
> Can you explain how to do this?
> Regards
> Tim
Subscribe to:
Posts (Atom)