Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Friday, March 30, 2012

scheduling ssis package

Hi there!!

I have created a ssis package and now i want to schedule it on SQL Server Agent.

How do we create new job for SSIS package?

Rahul Kumar

hi

gotta answer at:

http://msdn2.microsoft.com/en-us/library/ms139805.aspx

thanks and regards

Rahul Kumar

sql

Scheduling SSIS Package

Hi

I am trying to scheduling package using "Executing Sql Server Agent Task" before that I create new job,But there is error in STEP "Command Line Parameter are Invalid"

Anybody help me for configure jobs for Scheduling

I am new to SQL Server

Thanks in Advance

Now I want to save package in MSDB database but its gives en error as follows

"Login timeout expired
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Named Pipes Provider: Could not open a connection to SQL Server [2]. "

Can anybody helpout for this error

Note : Whats modification in SQL Server Setting so did not get this error

Actually here i am trying to save a package in MSDB database for run package through Sql Server job

thnaks in advance for your help

|||

Hi,

I am new to SSIS but have worked on other ETL tools. I was trying to schedule and run a SSIS package using SQL Server Agent. I created the job but when i tried to make a step of the Job, it asks for a type of step in a drop down. I cant see the step type required for running the SSIS packages as mentioned in the help files.

Please help me on this.

Regards,

Samaksh

|||

Doesn't matter. Execute your packages from the cmdexec subsystem using dtexec. You will get more useful error messages as explained here: http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html

-Jamie

|||Don't you see the type "SQL Server Integration Services Package" as one option in the dropdown? If you choose that, you can select where your package is.|||

Yes, the help file says to look at the "SQL Server Integration Services Package" as the option in the drop down, but i am unable to see it as an option. I tried various ways to check if the i can get to it, but each time "SQL Server Integration Services Package" is not there as an option.

Can this be the issue with the licence of the product or something similar. Because this is bizarre that the option is not coming in the list.

Regards,

Samaksh

Scheduling SSIS Package

Hi

I am trying to scheduling package using "Executing Sql Server Agent Task" before that I create new job,But there is error in STEP "Command Line Parameter are Invalid"

Anybody help me for configure jobs for Scheduling

I am new to SQL Server

Thanks in Advance

Now I want to save package in MSDB database but its gives en error as follows

"Login timeout expired
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Named Pipes Provider: Could not open a connection to SQL Server [2]. "

Can anybody helpout for this error

Note : Whats modification in SQL Server Setting so did not get this error

Actually here i am trying to save a package in MSDB database for run package through Sql Server job

thnaks in advance for your help

|||

Hi,

I am new to SSIS but have worked on other ETL tools. I was trying to schedule and run a SSIS package using SQL Server Agent. I created the job but when i tried to make a step of the Job, it asks for a type of step in a drop down. I cant see the step type required for running the SSIS packages as mentioned in the help files.

Please help me on this.

Regards,

Samaksh

|||

Doesn't matter. Execute your packages from the cmdexec subsystem using dtexec. You will get more useful error messages as explained here: http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html

-Jamie

|||Don't you see the type "SQL Server Integration Services Package" as one option in the dropdown? If you choose that, you can select where your package is.|||

Yes, the help file says to look at the "SQL Server Integration Services Package" as the option in the drop down, but i am unable to see it as an option. I tried various ways to check if the i can get to it, but each time "SQL Server Integration Services Package" is not there as an option.

Can this be the issue with the licence of the product or something similar. Because this is bizarre that the option is not coming in the list.

Regards,

Samaksh

scheduling question for SQL Server agent job for 1/1,4/1,7/1,10,1

HI I am executing a stored procedure from a job using the server agent but
can not create the correct run times. I only want it to run 4 times a year,
the morning of 1/1,4/1,7/1 and 10/1 for each year. Anyhow just wondering if
anyone has any ideas?
Thanks.
--
Paul G
Software engineer.I've never used that scheduler but I got curious. Assuming you are
using SQL Server 2000, it appears that if you choose Occurs Monthly,
then Day [1] of every [3] months, with a start date of 110/1/2006, it
would do what you ask.
But that is not the voice of experience, just the way it looks.
Roy Harvey
Beacon Falls, CT
On Thu, 7 Sep 2006 15:53:02 -0700, Paul
<Paul@.discussions.microsoft.com> wrote:
>HI I am executing a stored procedure from a job using the server agent but
>can not create the correct run times. I only want it to run 4 times a year,
>the morning of 1/1,4/1,7/1 and 10/1 for each year. Anyhow just wondering if
>anyone has any ideas?
>Thanks.|||What's that start date Roy?
I think that perhaps Roy meant a start date of 10/1/2006...
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:bub1g2tvcgqffb148lblutfmm1f519338p@.4ax.com...
> I've never used that scheduler but I got curious. Assuming you are
> using SQL Server 2000, it appears that if you choose Occurs Monthly,
> then Day [1] of every [3] months, with a start date of 110/1/2006, it
> would do what you ask.
> But that is not the voice of experience, just the way it looks.
> Roy Harvey
> Beacon Falls, CT
>
> On Thu, 7 Sep 2006 15:53:02 -0700, Paul
> <Paul@.discussions.microsoft.com> wrote:
>>HI I am executing a stored procedure from a job using the server agent but
>>can not create the correct run times. I only want it to run 4 times a
>>year,
>>the morning of 1/1,4/1,7/1 and 10/1 for each year. Anyhow just wondering
>>if
>>anyone has any ideas?
>>Thanks.|||On Thu, 7 Sep 2006 21:35:20 -0700, "Arnie Rowland" <arnie@.1568.com>
wrote:
>What's that start date Roy?
>I think that perhaps Roy meant a start date of 10/1/2006...
What? You mean your calendar does not have month 110?
Thanks for catching that, Arnie.
Roy|||yep seems to work thanks.
--
Paul G
Software engineer.
"Roy Harvey" wrote:
> On Thu, 7 Sep 2006 21:35:20 -0700, "Arnie Rowland" <arnie@.1568.com>
> wrote:
> >What's that start date Roy?
> >
> >I think that perhaps Roy meant a start date of 10/1/2006...
> What? You mean your calendar does not have month 110?
> Thanks for catching that, Arnie.
> Roy
>

scheduling question for SQL Server agent job for 1/1,4/1,7/1,10,1

HI I am executing a stored procedure from a job using the server agent but
can not create the correct run times. I only want it to run 4 times a year
,
the morning of 1/1,4/1,7/1 and 10/1 for each year. Anyhow just wondering if
anyone has any ideas?
Thanks.
--
Paul G
Software engineer.I've never used that scheduler but I got curious. Assuming you are
using SQL Server 2000, it appears that if you choose Occurs Monthly,
then Day [1] of every [3] months, with a start date of 110/1/2006, i
t
would do what you ask.
But that is not the voice of experience, just the way it looks.
Roy Harvey
Beacon Falls, CT
On Thu, 7 Sep 2006 15:53:02 -0700, Paul
<Paul@.discussions.microsoft.com> wrote:

>HI I am executing a stored procedure from a job using the server agent but
>can not create the correct run times. I only want it to run 4 times a yea
r,
>the morning of 1/1,4/1,7/1 and 10/1 for each year. Anyhow just wondering i
f
>anyone has any ideas?
>Thanks.|||What's that start date Roy?
I think that perhaps Roy meant a start date of 10/1/2006...
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:bub1g2tvcgqffb148lblutfmm1f519338p@.
4ax.com...[vbcol=seagreen]
> I've never used that scheduler but I got curious. Assuming you are
> using SQL Server 2000, it appears that if you choose Occurs Monthly,
> then Day [1] of every [3] months, with a start date of 110/1/2006,
it
> would do what you ask.
> But that is not the voice of experience, just the way it looks.
> Roy Harvey
> Beacon Falls, CT
>
> On Thu, 7 Sep 2006 15:53:02 -0700, Paul
> <Paul@.discussions.microsoft.com> wrote:
>|||On Thu, 7 Sep 2006 21:35:20 -0700, "Arnie Rowland" <arnie@.1568.com>
wrote:

>What's that start date Roy?
>I think that perhaps Roy meant a start date of 10/1/2006...
What? You mean your calendar does not have month 110?
Thanks for catching that, Arnie.
Roy

Wednesday, March 28, 2012

scheduling package - Urgent

Hi all gurus
If I create a package and schedule it for jobs and then if i delete the
package and create a new package with same name. Then my job for old package
will run on new package which has name of old deleted package?
In my case my old job runs new package.
will it make any problem?
Thanks
AMHuh?
"AM" <anonymous@.codecomments.com> wrote in message
news:Or0wyERRFHA.3544@.TK2MSFTNGP12.phx.gbl...
> Hi all gurus
> If I create a package and schedule it for jobs and then if i delete the
> package and create a new package with same name. Then my job for old
> package
> will run on new package which has name of old deleted package?
> In my case my old job runs new package.
> will it make any problem?
> Thanks
> AM
>
>|||AM,
If you create a DTS package, then schedule it, then delete the package, and
create a new one with the EXACT same name, your scheduled job will still wor
k.
Hope that answers your question.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602_.html
"AM" wrote:

> Hi all gurus
> If I create a package and schedule it for jobs and then if i delete the
> package and create a new package with same name. Then my job for old packa
ge
> will run on new package which has name of old deleted package?
> In my case my old job runs new package.
> will it make any problem?
> Thanks
> AM
>
>sql

scheduling package - Urgent

Hi all gurus
If I create a package and schedule it for jobs and then if i delete the
package and create a new package with same name. Then my job for old package
will run on new package which has name of old deleted package?
In my case my old job runs new package.
will it make any problem?
Thanks
AMHuh?
"AM" <anonymous@.developersdex.com> wrote in message
news:Or0wyERRFHA.3544@.TK2MSFTNGP12.phx.gbl...
> Hi all gurus
> If I create a package and schedule it for jobs and then if i delete the
> package and create a new package with same name. Then my job for old
> package
> will run on new package which has name of old deleted package?
> In my case my old job runs new package.
> will it make any problem?
> Thanks
> AM
>
>|||AM,
If you create a DTS package, then schedule it, then delete the package, and
create a new one with the EXACT same name, your scheduled job will still work.
Hope that answers your question.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602­.html
"AM" wrote:
> Hi all gurus
> If I create a package and schedule it for jobs and then if i delete the
> package and create a new package with same name. Then my job for old package
> will run on new package which has name of old deleted package?
> In my case my old job runs new package.
> will it make any problem?
> Thanks
> AM
>
>

scheduling package- Urgent

Hi all gurus
If I create a package and schedule it for jobs and then if i delete the
package and create a new package with same name. Then my job for old package
will run on new package which has name of old deleted package?
In my case my old job runs new package.
will it make any problem?
Thanks
AM
Huh?
"AM" <anonymous@.codecomments.com> wrote in message
news:Or0wyERRFHA.3544@.TK2MSFTNGP12.phx.gbl...
> Hi all gurus
> If I create a package and schedule it for jobs and then if i delete the
> package and create a new package with same name. Then my job for old
> package
> will run on new package which has name of old deleted package?
> In my case my old job runs new package.
> will it make any problem?
> Thanks
> AM
>
>
|||AM,
If you create a DTS package, then schedule it, then delete the package, and
create a new one with the EXACT same name, your scheduled job will still work.
Hope that answers your question.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602X.html
"AM" wrote:

> Hi all gurus
> If I create a package and schedule it for jobs and then if i delete the
> package and create a new package with same name. Then my job for old package
> will run on new package which has name of old deleted package?
> In my case my old job runs new package.
> will it make any problem?
> Thanks
> AM
>
>

Monday, March 26, 2012

Scheduling bug?

Hi!

I'm trying to create a subsciption for my report. In first creation I can do scheduling just fine, but when I try to edit my schedule, it's totally different. It shows value 1.1.0001 and when I try to change it, it's gives me first message:

value of '1.1.0001 0:00:00' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'. Parameter name: Value (System.Windows.Forms)

and after that when pushing OK it gives me message: "The required field StartDateTime is missing from the input structure. (rsMissingElement)".

Do you think it's a bug or is there something which I'm doing wrong?

Tero Kruth

I guess you're talking about creating subscription using SQL Management Studio. If yes, then it's a known bug.|||I was talking about that. Thanks for the answer. Now I don't waste my time anymore.

Scheduling a Report

Hello,
I am trying to create a schedule to add snapshots of a certain report to
report history.
So in Report Manager, I go to History and create a schedule to to this. In
my understanding, i need to create a job to execute this shedule. So i go to
Enterprise Manager to create a job. But after this i am lost, basically. How
can i reference this schedule when i go to "New Job". Is there any code that
needs to be put in the "New Job" Wizard so that this schedule can be run?
Thanks
SanjeevYou do not go to Enterprise Manager to do this. Do it all from within Report
Manager.
First create your schedule using Site Settings, Manage shared schedules. Do
this if you want to re-use the schedule with other reports.
Next, navigate to the report's folder and bring up its Properties window.
With the Properties window displayed, there is a History link on the left
side of the screen. Check the option to "Use the following schedule to add
snapshots to report history", then specify the schedule underneath.
HTH
Charles Kangai, MCT, MCDBA
"Sanjeev" wrote:
> Hello,
> I am trying to create a schedule to add snapshots of a certain report to
> report history.
> So in Report Manager, I go to History and create a schedule to to this. In
> my understanding, i need to create a job to execute this shedule. So i go to
> Enterprise Manager to create a job. But after this i am lost, basically. How
> can i reference this schedule when i go to "New Job". Is there any code that
> needs to be put in the "New Job" Wizard so that this schedule can be run?
> Thanks
> Sanjeev
>
>|||Thanks Charles. That worked
"Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in message
news:3D77E5E5-BAE9-484B-A87C-714EAD5350FC@.microsoft.com...
> You do not go to Enterprise Manager to do this. Do it all from within
> Report
> Manager.
> First create your schedule using Site Settings, Manage shared schedules.
> Do
> this if you want to re-use the schedule with other reports.
> Next, navigate to the report's folder and bring up its Properties window.
> With the Properties window displayed, there is a History link on the left
> side of the screen. Check the option to "Use the following schedule to add
> snapshots to report history", then specify the schedule underneath.
> HTH
> Charles Kangai, MCT, MCDBA
> "Sanjeev" wrote:
>> Hello,
>> I am trying to create a schedule to add snapshots of a certain report to
>> report history.
>> So in Report Manager, I go to History and create a schedule to to this.
>> In
>> my understanding, i need to create a job to execute this shedule. So i go
>> to
>> Enterprise Manager to create a job. But after this i am lost, basically.
>> How
>> can i reference this schedule when i go to "New Job". Is there any code
>> that
>> needs to be put in the "New Job" Wizard so that this schedule can be run?
>> Thanks
>> Sanjeev
>>

Scheduling a job using a stored procedure through a Stored Procedure

I currently new to SQL server and have been assigned a project to develop an auction site as part of my course. I would like to create a stored procedure which schedules a job to modify the 'auction state' field in a table to 'active' once the auction start time is reached and also run a scheduled job to close the auction at the end time.

I was thinking about using a stored procedure which calls on the sp_add_job but you have to use the msdb for this and you cannot use the 'USE' keyword inside a stored produre to call this. Am I going the wrong way about this or is it possible?EXECUTE msdb.dbo.sp_add_job-PatP|||The code snippet below has completed successfully, but i there seems to be a problem with it, can you use a local variable as a value for job name like below?

exec msdb.dbo.sp_add_job @.job_name = @.AuctionID
exec msdb.dbo.sp_add_jobstep @.job_name = @.AuctionID,
@.stepname = 'Step1',
@.command = 'Update Auction
SET AuctionState = ''closed''
WHERE AuctionID = @.AuctionID'

thanks for the earlier response.|||Can anyone see a problem with the code below, STEP1 doesn't get included when the job is scheduled. Suspected errors highlighted in red. The errors haven't been added cos they are confusing.
_______________________________________________
INSERT INTO Auction
(...

)

VALUES
(
...)

SELECT
@.AuctionID = @.@.Identity
declare @.Aid varchar
set @.Aid = convert(varchar,@.auctionID,15)
Declare @.sqlcommand varchar(255)
Set @.sqlcommand = 'UPDATE Auction SET AuctionState = ''closed'' WHERE AuctionID = ' + @.AID

exec msdb.dbo.sp_add_job @.job_name = @.AUCTIONID
exec msdb.dbo.sp_add_jobstep @.job_name = '@.AUCTIONID',
@.step_name = 'Step1',
@.command = @.sqlcommand,
@.database_name = 'Auction',
@.server = 'XX'
exec msdb.dbo.sp_add_jobschedule @.job_name = @.AuctionID,
@.name = 'AuctionsScheduled',
@.freq_type = 1,
@.active_start_time ='120000',
@.active_start_date = '20040703',
@.freq_recurrence_factor = 1
exec msdb.dbo.sp_add_jobserver @.job_name = @.auctionID,
@.server_name = 'XX'

_____________________________________________

Friday, March 23, 2012

schedules web page problem

hi all,

first of all i'm sorry for my bad english, i hope someone understand me.

i have a problem with schedules in reporting services.
i create a new one and i had no problem doing it.
the creation of the schedules make a new job in the sql server.
the job in the sql server works right.
instead the schedule's informartion in the reporting services web page doesn't refresh.
the schedule web page always reports the column "last execution" = never and the "next execution" = the first value.
any subscriptions set on the schedule doesn't work.

above some information about the installation:

- sql\report server is in another intranet. I manage the site from a different intranet.
- i restore on the main server the ReportServer and the ReportServerTempDB from the deployment server. i read the microsoft msdn to restore the db.

hope someone could help me
thanks
nicola

The microsoft article to restore reportserver db is very incomplete.. I do the following:
in ReportServer - Database

EXEC dbo.sp_AlterOwnerOfAgentJob @.username='ASPNET'
GO
EXEC dbo.sp_AlterOwnerOfSubscriptions 'ITEMOwner'
GO

where ASPNET is the assount of iis / application pool and ITEMOwner is a user from your domain. (usually this name has to be fullqualified domain\username)

The stored procedures are:
USE [ReportServer]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[sp_AlterOwnerOfSubscriptions] ( @.username nvarchar(128))
AS
BEGIN
/* ?ndert den Besitzer der Abonnements, da sonst die Fehlermeldung:
"Benutzer XY wurde nicht gefunden"
Beim nachtr?glichen ?ndern eines Abos auftreten kann
*/

SET NOCOUNT ON;
declare @.UserID uniqueidentifier
/* ID aus Benutzertabelle holen */
select top 1 @.UserID=userid from users where username=@.username
if @.UserID is null
begin
print '======================================================='
print 'ERROR: The given user was not found'
print 'Check if''' + @.username + ''' is correct!'
print '======================================================='
end
else
begin
print 'Changing subscription user to: ' + @.username
update dbo.Subscriptions set OwnerID=@.UserID,ModifiedByID=@.UserID,ModifiedDate=getDate();
update dbo.Schedule set CreatedById=@.UserID;
end
END

GO

/* =========================================================================== */

CREATE PROCEDURE [dbo].[sp_AlterOwnerOfAgentJob] ( @.username nvarchar(128))
AS
BEGIN
/*
Diese SP ?ndert den Besitzer der SQL-Server Agent-Jobs, diese werden
f?lschlicherweise auf SYSTEM gesetzt, sollten aber ASPNET sein!
*/
SET NOCOUNT ON;
declare @.jobname nvarchar(128),@.servername nvarchar(128),@.UserID uniqueidentifier
/* Cursor zum auslesen der aktuellen Jobs */
DECLARE job_cursor CURSOR FOR select name from msdb.dbo.sysjobs
OPEN job_cursor

/* Resultset durchgehen und Besitzer jedes Jobs setzen */
FETCH NEXT FROM job_cursor INTO @.jobname
WHILE @.@.FETCH_STATUS = 0
BEGIN
PRINT 'Changing owner to: ''' + @.username + ''' for job ' + @.jobname
EXEC msdb.dbo.sp_update_job @.job_name=@.jobname,
@.owner_login_name=@.username
FETCH NEXT FROM job_cursor INTO @.jobname
END
/* Resultset / Cursor wieder schlie?en und Freigeben */
CLOSE job_cursor
DEALLOCATE job_cursor
END

GO

/* =========================================================================== */

Usually it works after that.. If not rebooting is a good choice ;) I was trying for 2hours to get the subscriptions work, after rebooting all went fine ;)

Scheduled weekly reports

I am trying to create a Job that will run a stored procedure i have scripted
and the email the the results to certain managers in my company for analysis
purposes. The procedure is fine i was just wondering how i would get the
results formatted and into an email. Do i use the SQL Mail?hi
did u see xp_sendmail
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"A.B." wrote:

> I am trying to create a Job that will run a stored procedure i have script
ed
> and the email the the results to certain managers in my company for analys
is
> purposes. The procedure is fine i was just wondering how i would get the
> results formatted and into an email. Do i use the SQL Mail?|||"A.B." <AB@.discussions.microsoft.com> wrote in message
news:4C34B83A-C86E-4031-ACEF-05B4F02B0326@.microsoft.com...
>I am trying to create a Job that will run a stored procedure i have
>scripted
> and the email the the results to certain managers in my company for
> analysis
> purposes. The procedure is fine i was just wondering how i would get the
> results formatted and into an email. Do i use the SQL Mail?
No, you use reporting services.|||Do both: use SQL Mail to send a message that the report is ready, but use SQ
L
Reporting Services for the actual report.
Why would you need to send a large amount of data through e-mail? Don't they
get enough spam anyway? ;)
ML|||"ML" <ML@.discussions.microsoft.com> wrote in message
news:7303024C-CB3B-4273-9D76-24D9C962D9BC@.microsoft.com...
> Do both: use SQL Mail to send a message that the report is ready, but use
> SQL
> Reporting Services for the actual report.
Or you could use Reporting Services to both render and send notification via
email.

Scheduled subscriptions don't work (but Event-driven ones do) for NS Newsletter sample

Hello,

I am using the Newsletter sample bundled with Notification Services (using SQL 2005 SP1)

When I create Scheduled subscriptions using the 'SubscriptionManagementWeb' app that ships with the sample, then copy an Events.xml file to the watch folder, I never get an alert (i.e. I set the time to now + 5 minutes, wait, never receive).

When I create an Event-driven subscription, on the other hand, and copy an Events.xml file to the watch folder, I do successfully get a notification.

I also created my own separate NS application, and it has the same problem as the sample. Event-driven subscriptions work, but Scheduled ones do not.

Any ideas?

TIA,

Alex

Hi I don't know if you have checked this in the books online but it has somethig to do with schedulled subscriptions:

Time Zone-Specific Scheduled Subscriptions

Notification Services supports scheduled subscriptions. Because a notification application can support subscribers in any time zone, it is important that Notification Services store information about the time zone for timely notification delivery.

To make multiple time zone support easier, Notification Services stores date and time information using Coordinated Universal Time (UTC) notation.

When a subscriber creates a scheduled subscription, the subscriber enters the time zone (or the time zone is obtained from other sources, such as a database or operating system setting) and the desired delivery time. When Notification Services stores the delivery time, it uses the time zone to compute the UTC time for delivery and then stores the UTC time. When the UTC time arrives, Notification Services generates notifications from any current events and then formats and distributes the notifications.

|||

Interesting. Well I am UTC - 8 hrs (same as GMT - 8 hrs except for rare circumstances). I launched the "SubscriptionManagementWeb" web application that comes with the Newsletter sample in debug mode, and saw that it was saving a subscription with:

Schedule start: "TZID=4:20070131T025500"

Schedule recurrence: "FREQ=WEEKLY;BYDAY=WE"

Even if the time zone were off, it should be triggered on a weekly basis. I've submitted test newsletters that match the scheduled subscription over a span of two weeks, never received a notification.

To test the UTC theory out, I set the schedule start to Now + 9 hours (since UTC is 8 hours ahead of my time zone). This way, I should expect to get the event in Now + 1 hour.

Result: didn't get the event, when I copied the event.xml file to the drop location. So I don't think it's time zone based.

Any other suggestions? Don't see any errors in the event log; don't see anything useful from running the Diagnostics sp's that it generated.

|||Hi Alex -

When working with scheduled subscriptions, I usually find that the problems can generally be found in one of four areas.

1) A scheduled subscription either does not exist or is incorrectly configured. You'd be surprised at how often this is the problem.

2) The scheduled subscription doesn't actually match an event that is coming in.

3) There is a problem in the matching rule so no rows are ever produced.

4) Notifications are created in the notifications table, but cannot be delivered due to a problem in the delivery protocol (incorrect permissions, etc).

You may want to look into the underlying tables and views to see if you can gain some more insight into why you're not seeing the final notification. Also change the logging level to verbose and check the Application event log.

HTH...

Joe

Wednesday, March 21, 2012

Scheduled subscriptions don't work (but Event-driven ones do) for NS Newsletter sample

Hello,

I am using the Newsletter sample bundled with Notification Services (using SQL 2005 SP1)

When I create Scheduled subscriptions using the 'SubscriptionManagementWeb' app that ships with the sample, then copy an Events.xml file to the watch folder, I never get an alert (i.e. I set the time to now + 5 minutes, wait, never receive).

When I create an Event-driven subscription, on the other hand, and copy an Events.xml file to the watch folder, I do successfully get a notification.

I also created my own separate NS application, and it has the same problem as the sample. Event-driven subscriptions work, but Scheduled ones do not.

Any ideas?

TIA,

Alex

Hi I don't know if you have checked this in the books online but it has somethig to do with schedulled subscriptions:

Time Zone-Specific Scheduled Subscriptions

Notification Services supports scheduled subscriptions. Because a notification application can support subscribers in any time zone, it is important that Notification Services store information about the time zone for timely notification delivery.

To make multiple time zone support easier, Notification Services stores date and time information using Coordinated Universal Time (UTC) notation.

When a subscriber creates a scheduled subscription, the subscriber enters the time zone (or the time zone is obtained from other sources, such as a database or operating system setting) and the desired delivery time. When Notification Services stores the delivery time, it uses the time zone to compute the UTC time for delivery and then stores the UTC time. When the UTC time arrives, Notification Services generates notifications from any current events and then formats and distributes the notifications.

|||

Interesting. Well I am UTC - 8 hrs (same as GMT - 8 hrs except for rare circumstances). I launched the "SubscriptionManagementWeb" web application that comes with the Newsletter sample in debug mode, and saw that it was saving a subscription with:

Schedule start: "TZID=4:20070131T025500"

Schedule recurrence: "FREQ=WEEKLY;BYDAY=WE"

Even if the time zone were off, it should be triggered on a weekly basis. I've submitted test newsletters that match the scheduled subscription over a span of two weeks, never received a notification.

To test the UTC theory out, I set the schedule start to Now + 9 hours (since UTC is 8 hours ahead of my time zone). This way, I should expect to get the event in Now + 1 hour.

Result: didn't get the event, when I copied the event.xml file to the drop location. So I don't think it's time zone based.

Any other suggestions? Don't see any errors in the event log; don't see anything useful from running the Diagnostics sp's that it generated.

|||Hi Alex -

When working with scheduled subscriptions, I usually find that the problems can generally be found in one of four areas.

1) A scheduled subscription either does not exist or is incorrectly configured. You'd be surprised at how often this is the problem.

2) The scheduled subscription doesn't actually match an event that is coming in.

3) There is a problem in the matching rule so no rows are ever produced.

4) Notifications are created in the notifications table, but cannot be delivered due to a problem in the delivery protocol (incorrect permissions, etc).

You may want to look into the underlying tables and views to see if you can gain some more insight into why you're not seeing the final notification. Also change the logging level to verbose and check the Application event log.

HTH...

Joe

Scheduled Subscription recurrence

I've read the blogs on setting up a scheduled subscription that fires more than once a day.

It blows my mind that you actually have to create a separate subscription for each time you want the schedule to fire in one day.

Forget duplicate notifications, how do you handle the resulting duplicate subscriptions (except for the start time) from a subscription management standpoint?

If we created a scheduled subscription for a user that fired once per hour in our Subscription Management interface, when the user returned to maintain that subscription they would see 24 copies of virtually the same subscription (?)

The only solution I see to this is to create a "dummy" subscriber (with the same E-mail address etc...) that corresponds to each actual subscriber. The initial subscription would be assigned the actual user id while the duplicates would get the "dummy" user name. We would have to modify our delete and change subscription logic to delete/re-create all the copies.

Does anyone see a better way?

I think I've come up with a "better" workaround.

I am going to create my own table to track multiple subscription entries that differ only by the time they fire.

There will be a "master" id for the real subscription and related sub id's for the additional subscriptions generated. This will allow multiple different subscriptions in the same class, each with multiple firings per day. There is no longer a need for a separate subscriber id in this scenario.

When the user calls up the edit subscription interface, only the master record will be shown. I still need to manage my table on subscription create/edit/delete. The other trick is instance update, which may wipe out the NS subscription table - if so, I have to delete from my tracking table also.

If there is a better way or patch from Microsoft please let me know...

|||Depending on the volume of notifications and subscribers, you could use Chronicles tables to keep track of the datetime that each subscriber was notified.

HTH...

Joe

Scheduled report for database names and sizes

Does anyone has a script which gives all databases names and there
allocated, used sizes in SQLserver2k. I want to schedule this to create a
daily report.

Thanks,
Nasir"Nasir" <nmajeed@.prosrm.com> wrote in message
news:40056fa6$0$43848$39cecf19@.news.twtelecom.net. ..
> Does anyone has a script which gives all databases names and there
> allocated, used sizes in SQLserver2k. I want to schedule this to create a
> daily report.
> Thanks,
> Nasir

Depending on what you need, this may be good enough:

exec sp_MSforeachdb 'exec sp_helpdb ?'
and/or
exec sp_MSforeachdb 'exec ?..sp_spaceused'

Note that this will return multiple result sets, which are awkward to
process within SQL Server itself, although it should be straightforward in a
client script. sp_MSforeachdb is not documented, but you can use your own
cursor instead for production.

Simonsql

Monday, March 12, 2012

Scheduled DTS Does Not Work Across Servers

Hi,
I was able to successfully create a scheduled DTS job transferring
objects between two databases that Are On The Same Server.
But was unable to have a scheduled DTS job (transferring objects between
different servers)run automatically.
If I execute it manually, it works ok; but not if it's scheduled.
The agent on all servers is started up.
Would very much appreciate your help.
Thank you very much
Mike
*** Sent via Developersdex http://www.codecomments.com ***
We may need more security information on this one but looks like this is a
permissions problem.
Supposing that you are using Windows authentication, when you execute the
package you most likely have access to both servers. But when you schedule
it, the user running the job maybe does not have access to the other server.
Hope this helps,
Benjamin Nevarez
Database Administrator
"mike" wrote:

> Hi,
> I was able to successfully create a scheduled DTS job transferring
> objects between two databases that Are On The Same Server.
> But was unable to have a scheduled DTS job (transferring objects between
> different servers)run automatically.
> If I execute it manually, it works ok; but not if it's scheduled.
> The agent on all servers is started up.
> Would very much appreciate your help.
> Thank you very much
>
> Mike
> *** Sent via Developersdex http://www.codecomments.com ***
>
|||Purrfect! It worked!
Thank you very much
Mike
*** Sent via Developersdex http://www.codecomments.com ***

Scheduled DTS Does Not Work Across Servers

Hi,
I was able to successfully create a scheduled DTS job transferring
objects between two databases that Are On The Same Server.
But was unable to have a scheduled DTS job (transferring objects between
different servers)run automatically.
If I execute it manually, it works ok; but not if it's scheduled.
The agent on all servers is started up.
Would very much appreciate your help.
Thank you very much
Mike
*** Sent via Developersdex http://www.codecomments.com ***We may need more security information on this one but looks like this is a
permissions problem.
Supposing that you are using Windows authentication, when you execute the
package you most likely have access to both servers. But when you schedule
it, the user running the job maybe does not have access to the other server.
Hope this helps,
Benjamin Nevarez
Database Administrator
"mike" wrote:

> Hi,
> I was able to successfully create a scheduled DTS job transferring
> objects between two databases that Are On The Same Server.
> But was unable to have a scheduled DTS job (transferring objects between
> different servers)run automatically.
> If I execute it manually, it works ok; but not if it's scheduled.
> The agent on all servers is started up.
> Would very much appreciate your help.
> Thank you very much
>
> Mike
> *** Sent via Developersdex http://www.codecomments.com ***
>|||Purrfect! It worked!
Thank you very much
Mike
*** Sent via Developersdex http://www.codecomments.com ***

Scheduled DTS Does Not Work Across Servers

Hi,
I was able to successfully create a scheduled DTS job transferring
objects between two databases that Are On The Same Server.
But was unable to have a scheduled DTS job (transferring objects between
different servers)run automatically.
If I execute it manually, it works ok; but not if it's scheduled.
The agent on all servers is started up.
Would very much appreciate your help.
Thank you very much
Mike
*** Sent via Developersdex http://www.developersdex.com ***We may need more security information on this one but looks like this is a
permissions problem.
Supposing that you are using Windows authentication, when you execute the
package you most likely have access to both servers. But when you schedule
it, the user running the job maybe does not have access to the other server.
Hope this helps,
Benjamin Nevarez
Database Administrator
"mike" wrote:
> Hi,
> I was able to successfully create a scheduled DTS job transferring
> objects between two databases that Are On The Same Server.
> But was unable to have a scheduled DTS job (transferring objects between
> different servers)run automatically.
> If I execute it manually, it works ok; but not if it's scheduled.
> The agent on all servers is started up.
> Would very much appreciate your help.
> Thank you very much
>
> Mike
> *** Sent via Developersdex http://www.developersdex.com ***
>|||Purrfect! It worked!
Thank you very much
Mike
*** Sent via Developersdex http://www.developersdex.com ***