Showing posts with label sql-ns. Show all posts
Showing posts with label sql-ns. Show all posts

Monday, March 26, 2012

New SQL-NS 2005 Book

Folks,

I want to let everyone know that the 2005 update to my Notification Services book is now available for order. You can get it from http://www.amazon.com/gp/product/0672327791/.

This book has been completely updated for the 2005 release:

- All source code examples are now designed to work with the 2005 programming model and tools

- New chapters have been added to cover the new 2005 features (such as the NMO API, Hostable Execution Engine, and User-Defined Matching Logic)

I hope you find this useful. As always, I appreciate receiving any feedback you may have.

Thanks

-shyam

Hi Shyam,

I bought your book, and it's really good book which can tell me more detail.

Right now I met a problem when I was testing SMTP delivery channel in chapter 10. with local smtp service, the musicStore worked as expected, but if I changed to use another computer in the same domain, nothing happened. Checking the application event view, it said:

Notification Class Name: NewSong

Notification Status Info: The e-mail address or SMTP server value is not valid.

SMTP Server: 192.168.1.128

Message Recipients: emily@.work.com

I have tried other setting for SMTPServer in InstanceConfiguration.xml, like "\\myServer", "myServer.myDomain" and "myServer.myDomain.local", but all got the same result. I have checked online book and some forum, but nothing helpful. Could you help it out? Thanks in advance.

Regards,

Chris

|||

HI shyam,

Just got the book this week and im finding it very useful and helpful. The std MSDN examples are very short on documentation. I dont seem to have one issue though, Im currently going through chapter 6 and am finding that the scheduled subscriptions for the Music Store sample are not working.

Working through the database i can see that my NewSongByGenreSubscriptionProcessingTimes table is not being filled in. I looked a little deeper into the SQl statements and ran this

SELECT subscriptions.SubscriptionId, subscriptions.Created
FROM [SongAlerts].[NewSongByGenre] subscriptions

This unfortunately returns nothing, which looks to be the problem as my chronicle always stays empty. I've used your tool to add the scheduled subscriptions and unfortunately that does seem to work, its adding subscriptions, so i cant understand why the query above doesnt fire.

A little deeper and i see the two tables NSCurrentNewSongByGenreSubscriptions and NSFiringNewSongByGenreInterval are empty? dont really know what they do.

Dont suppose you can test and confirm that Chapter 6 does work correctly. I've been over it 3 times and am about to get a work mate to try on their machine, but so far no luck.

Aside from that little niggle, its an excellent book, the chapter on Custom Delivery Channels was worth it alone. :)

|||

For those who consider buying this book to prepare for their new project on SQL Server Notification Services, here's what I have to say:

1. I bought the author's previous book (on SQL NS 2.0 - for SQL Server 2000). Before I got it, I had only a very dim idea about what NS is and what it can do.

2. Two weeks later, I had a fully functional prototype of my application. It had only a subset of the real huge project's functionality (the project is truly HUGE!..), including a custom content formatter and a custom event provider. But it worked, and we are now just extending it. I mean, no need to refactor the code or start from scratch. Well, to tell you the truth, in those 2 weeks I worked quite a bit more than 8 hours a day, but it was worth it. My boss is still trying to throw some tricky questions on me (like, "What happens with our application IF..."), and there have been no questions so far that I was unable to answer. The book is just great!

3. My advice to you: work through all the samples (at least, in the first half of the book, or until you get a clear idea on how all the pieces of NS fit together). It's not nearly as bad as it sounds: the explanations and step-by-step instructions on how to do every little thing are so good that even a complete moron would be able to get it (and none of us are morons... I think... ;-)

4. I usually buy technical books only when I need to get up to speed with a particular technology as fast as possible. Shyam Pather's book exceeded all my expectations. The book reads as easily as my favorite science fiction books (and way easier than "The Lord of the Rings"). And almost as interesting as they are.

New SQL-NS 2005 Book

Folks,

I want to let everyone know that the 2005 update to my Notification Services book is now available for order. You can get it from http://www.amazon.com/gp/product/0672327791/.

This book has been completely updated for the 2005 release:

- All source code examples are now designed to work with the 2005 programming model and tools

- New chapters have been added to cover the new 2005 features (such as the NMO API, Hostable Execution Engine, and User-Defined Matching Logic)

I hope you find this useful. As always, I appreciate receiving any feedback you may have.

Thanks

-shyam

Hi Shyam,

I bought your book, and it's really good book which can tell me more detail.

Right now I met a problem when I was testing SMTP delivery channel in chapter 10. with local smtp service, the musicStore worked as expected, but if I changed to use another computer in the same domain, nothing happened. Checking the application event view, it said:

Notification Class Name: NewSong

Notification Status Info: The e-mail address or SMTP server value is not valid.

SMTP Server: 192.168.1.128

Message Recipients: emily@.work.com

I have tried other setting for SMTPServer in InstanceConfiguration.xml, like "\\myServer", "myServer.myDomain" and "myServer.myDomain.local", but all got the same result. I have checked online book and some forum, but nothing helpful. Could you help it out? Thanks in advance.

Regards,

Chris

|||

HI shyam,

Just got the book this week and im finding it very useful and helpful. The std MSDN examples are very short on documentation. I dont seem to have one issue though, Im currently going through chapter 6 and am finding that the scheduled subscriptions for the Music Store sample are not working.

Working through the database i can see that my NewSongByGenreSubscriptionProcessingTimes table is not being filled in. I looked a little deeper into the SQl statements and ran this

SELECT subscriptions.SubscriptionId, subscriptions.Created
FROM [SongAlerts].[NewSongByGenre] subscriptions

This unfortunately returns nothing, which looks to be the problem as my chronicle always stays empty. I've used your tool to add the scheduled subscriptions and unfortunately that does seem to work, its adding subscriptions, so i cant understand why the query above doesnt fire.

A little deeper and i see the two tables NSCurrentNewSongByGenreSubscriptions and NSFiringNewSongByGenreInterval are empty? dont really know what they do.

Dont suppose you can test and confirm that Chapter 6 does work correctly. I've been over it 3 times and am about to get a work mate to try on their machine, but so far no luck.

Aside from that little niggle, its an excellent book, the chapter on Custom Delivery Channels was worth it alone. :)

|||

For those who consider buying this book to prepare for their new project on SQL Server Notification Services, here's what I have to say:

1. I bought the author's previous book (on SQL NS 2.0 - for SQL Server 2000). Before I got it, I had only a very dim idea about what NS is and what it can do.

2. Two weeks later, I had a fully functional prototype of my application. It had only a subset of the real huge project's functionality (the project is truly HUGE!..), including a custom content formatter and a custom event provider. But it worked, and we are now just extending it. I mean, no need to refactor the code or start from scratch. Well, to tell you the truth, in those 2 weeks I worked quite a bit more than 8 hours a day, but it was worth it. My boss is still trying to throw some tricky questions on me (like, "What happens with our application IF..."), and there have been no questions so far that I was unable to answer. The book is just great!

3. My advice to you: work through all the samples (at least, in the first half of the book, or until you get a clear idea on how all the pieces of NS fit together). It's not nearly as bad as it sounds: the explanations and step-by-step instructions on how to do every little thing are so good that even a complete moron would be able to get it (and none of us are morons... I think... ;-)

4. I usually buy technical books only when I need to get up to speed with a particular technology as fast as possible. Shyam Pather's book exceeded all my expectations. The book reads as easily as my favorite science fiction books (and way easier than "The Lord of the Rings"). And almost as interesting as they are.

New SQL-NS 2005 Book

Folks,

I want to let everyone know that the 2005 update to my Notification Services book is now available for order. You can get it from http://www.amazon.com/gp/product/0672327791/.

This book has been completely updated for the 2005 release:

- All source code examples are now designed to work with the 2005 programming model and tools

- New chapters have been added to cover the new 2005 features (such as the NMO API, Hostable Execution Engine, and User-Defined Matching Logic)

I hope you find this useful. As always, I appreciate receiving any feedback you may have.

Thanks

-shyam

Hi Shyam,

I bought your book, and it's really good book which can tell me more detail.

Right now I met a problem when I was testing SMTP delivery channel in chapter 10. with local smtp service, the musicStore worked as expected, but if I changed to use another computer in the same domain, nothing happened. Checking the application event view, it said:

Notification Class Name: NewSong

Notification Status Info: The e-mail address or SMTP server value is not valid.

SMTP Server: 192.168.1.128

Message Recipients: emily@.work.com

I have tried other setting for SMTPServer in InstanceConfiguration.xml, like "\\myServer", "myServer.myDomain" and "myServer.myDomain.local", but all got the same result. I have checked online book and some forum, but nothing helpful. Could you help it out? Thanks in advance.

Regards,

Chris

|||

HI shyam,

Just got the book this week and im finding it very useful and helpful. The std MSDN examples are very short on documentation. I dont seem to have one issue though, Im currently going through chapter 6 and am finding that the scheduled subscriptions for the Music Store sample are not working.

Working through the database i can see that my NewSongByGenreSubscriptionProcessingTimes table is not being filled in. I looked a little deeper into the SQl statements and ran this

SELECT subscriptions.SubscriptionId, subscriptions.Created
FROM [SongAlerts].[NewSongByGenre] subscriptions

This unfortunately returns nothing, which looks to be the problem as my chronicle always stays empty. I've used your tool to add the scheduled subscriptions and unfortunately that does seem to work, its adding subscriptions, so i cant understand why the query above doesnt fire.

A little deeper and i see the two tables NSCurrentNewSongByGenreSubscriptions and NSFiringNewSongByGenreInterval are empty? dont really know what they do.

Dont suppose you can test and confirm that Chapter 6 does work correctly. I've been over it 3 times and am about to get a work mate to try on their machine, but so far no luck.

Aside from that little niggle, its an excellent book, the chapter on Custom Delivery Channels was worth it alone. :)

|||

For those who consider buying this book to prepare for their new project on SQL Server Notification Services, here's what I have to say:

1. I bought the author's previous book (on SQL NS 2.0 - for SQL Server 2000). Before I got it, I had only a very dim idea about what NS is and what it can do.

2. Two weeks later, I had a fully functional prototype of my application. It had only a subset of the real huge project's functionality (the project is truly HUGE!..), including a custom content formatter and a custom event provider. But it worked, and we are now just extending it. I mean, no need to refactor the code or start from scratch. Well, to tell you the truth, in those 2 weeks I worked quite a bit more than 8 hours a day, but it was worth it. My boss is still trying to throw some tricky questions on me (like, "What happens with our application IF..."), and there have been no questions so far that I was unable to answer. The book is just great!

3. My advice to you: work through all the samples (at least, in the first half of the book, or until you get a clear idea on how all the pieces of NS fit together). It's not nearly as bad as it sounds: the explanations and step-by-step instructions on how to do every little thing are so good that even a complete moron would be able to get it (and none of us are morons... I think... ;-)

4. I usually buy technical books only when I need to get up to speed with a particular technology as fast as possible. Shyam Pather's book exceeded all my expectations. The book reads as easily as my favorite science fiction books (and way easier than "The Lord of the Rings"). And almost as interesting as they are.

New SQL-NS 2005 Book

Folks,

I want to let everyone know that the 2005 update to my Notification Services book is now available for order. You can get it from http://www.amazon.com/gp/product/0672327791/.

This book has been completely updated for the 2005 release:

- All source code examples are now designed to work with the 2005 programming model and tools

- New chapters have been added to cover the new 2005 features (such as the NMO API, Hostable Execution Engine, and User-Defined Matching Logic)

I hope you find this useful. As always, I appreciate receiving any feedback you may have.

Thanks

-shyam

Hi Shyam,

I bought your book, and it's really good book which can tell me more detail.

Right now I met a problem when I was testing SMTP delivery channel in chapter 10. with local smtp service, the musicStore worked as expected, but if I changed to use another computer in the same domain, nothing happened. Checking the application event view, it said:

Notification Class Name: NewSong

Notification Status Info: The e-mail address or SMTP server value is not valid.

SMTP Server: 192.168.1.128

Message Recipients: emily@.work.com

I have tried other setting for SMTPServer in InstanceConfiguration.xml, like "\\myServer", "myServer.myDomain" and "myServer.myDomain.local", but all got the same result. I have checked online book and some forum, but nothing helpful. Could you help it out? Thanks in advance.

Regards,

Chris

|||

HI shyam,

Just got the book this week and im finding it very useful and helpful. The std MSDN examples are very short on documentation. I dont seem to have one issue though, Im currently going through chapter 6 and am finding that the scheduled subscriptions for the Music Store sample are not working.

Working through the database i can see that my NewSongByGenreSubscriptionProcessingTimes table is not being filled in. I looked a little deeper into the SQl statements and ran this

SELECT subscriptions.SubscriptionId, subscriptions.Created
FROM [SongAlerts].[NewSongByGenre] subscriptions

This unfortunately returns nothing, which looks to be the problem as my chronicle always stays empty. I've used your tool to add the scheduled subscriptions and unfortunately that does seem to work, its adding subscriptions, so i cant understand why the query above doesnt fire.

A little deeper and i see the two tables NSCurrentNewSongByGenreSubscriptions and NSFiringNewSongByGenreInterval are empty? dont really know what they do.

Dont suppose you can test and confirm that Chapter 6 does work correctly. I've been over it 3 times and am about to get a work mate to try on their machine, but so far no luck.

Aside from that little niggle, its an excellent book, the chapter on Custom Delivery Channels was worth it alone. :)

|||

For those who consider buying this book to prepare for their new project on SQL Server Notification Services, here's what I have to say:

1. I bought the author's previous book (on SQL NS 2.0 - for SQL Server 2000). Before I got it, I had only a very dim idea about what NS is and what it can do.

2. Two weeks later, I had a fully functional prototype of my application. It had only a subset of the real huge project's functionality (the project is truly HUGE!..), including a custom content formatter and a custom event provider. But it worked, and we are now just extending it. I mean, no need to refactor the code or start from scratch. Well, to tell you the truth, in those 2 weeks I worked quite a bit more than 8 hours a day, but it was worth it. My boss is still trying to throw some tricky questions on me (like, "What happens with our application IF..."), and there have been no questions so far that I was unable to answer. The book is just great!

3. My advice to you: work through all the samples (at least, in the first half of the book, or until you get a clear idea on how all the pieces of NS fit together). It's not nearly as bad as it sounds: the explanations and step-by-step instructions on how to do every little thing are so good that even a complete moron would be able to get it (and none of us are morons... I think... ;-)

4. I usually buy technical books only when I need to get up to speed with a particular technology as fast as possible. Shyam Pather's book exceeded all my expectations. The book reads as easily as my favorite science fiction books (and way easier than "The Lord of the Rings"). And almost as interesting as they are.

sql

Wednesday, March 7, 2012

New in SQL-NS 2005 ...plz help me

hi everyone...

Iam new in sql-ns 2005 & I've been trying the last couple of days to get my first running program...but still Iam facing a problem..

I tried to run this sample which I got from one the websites...

using System;

using Microsoft.SqlServer.Management.Smo;

using Microsoft.SqlServer.Management.Nmo;

using ns = Microsoft.SqlServer.NotificationServices;

namespace My_Nc

{

class Program

{

private static Instance nsi;

private static Application a;

private const string baseDirectoryPath =

@."D:\Documents and Settings\falmalik\My Documents\Visual Studio 2005\Projects\My_Nc";

private const string nsServer = //

private const string serviceUserName = //

private const string servicePassword = //

static void Main(string[] args)

{

Server server = new Server("(local)");

// create a new instance

NotificationServices ns = server.NotificationServices;

nsi = new Instance(ns, "StockWatch");

CreateDeliveryChannel();

a = new Application(nsi, "StockWatchApp");

a.BaseDirectoryPath = baseDirectoryPath;

CreateEventClass();

CreateSubscriptionClass();

CreateNotificationClass();

CreateHostedEventProvider();

CreateGenerator();

CreateDistributor();

CreateVacuumSchedule();

a.QuantumDuration = new TimeSpan(0, 0, 15);

a.PerformanceQueryInterval = new TimeSpan(0, 0, 5);

a.SubscriptionQuantumLimit = 1;

a.ChronicleQuantumLimit = 1;

a.VacuumRetentionAge = new TimeSpan(0, 0, 1);

nsi.Applications.Add(a);

Console.WriteLine("Added application.");

nsi.Create();

nsi.RegisterLocal(serviceUserName, servicePassword);

nsi.Enable();

Console.WriteLine("Application enabled." +

Environment.NewLine);

CreateSubscriber();

CreateSubscription();

Console.WriteLine(Environment.NewLine +

"Press any key to continue.");

Console.ReadKey();

}

the problem I get when I run it is with nsi.Create(); it gives me the following message :The Notification Services operation performed is invalid.

I don't know if the problem is with the nsServer,serviceUserName,servicePassword or not?

because i tried to change them alot of times but still ...it even some times gives me the problem with nsi.RegisterLocal(serviceUserName, servicePassword);

so what are the valid values of them?

I didn't really understand :serviceUserName is the account the NS$StockWatch Windows Service will run under

so could anyone please tell me what the problem is? or even could give me or direct me to a simple sample (even without the use of SMTP) ...I even tried the MSDN samples but still

another question is that i read more than once about the eventdata file ...& that I should copy it to the event subfolder to watch it....so do I have to do this everytime I run the application or what?

forgive me for my questions which may seem silly...but this is my first time

thank you..

First of all, the best way to learn SQL NS is by reading a good book and following examples in it. Of course, it might seem that it would take much more time than learning by an example on MSDN, but... it's not true. SQL NS, while being a relatively easy-to-learn technology, is not "a piece of cake".
The best 2 books that I know (and I used one of them to learn NS) are:
http://www.amazon.com/Microsoft-Server-Notification-Services-Windows/dp/0672326647/ref=sr_1_2/103-3024305-8379809?ie=UTF8&s=books&qid=1185276090&sr=1-2
and
http://www.amazon.com/Rational-Server-Notification-Services-Guides/dp/0972688811/ref=pd_bbs_sr_2/103-3024305-8379809?ie=UTF8&s=books&qid=1185276061&sr=8-2
There are also other books (specifically on NS for SQL Server 2005), but the differences between 2000 and 2005 are negligible.
The fact is, there's a lot to know if you are the only developer for your NS project, and you can't learn it fast enough without a good book.

You are using C# classes to create all of your NS objects. Although this approach is quite valid, the SQL NS is known for its declarative programming model. That is, it is much easier to create the entire NS application using XML files (application definition file, etc.). At the same time, you can use C# for creating your custom objects, such as a custom event provider, custom content formatter, etc., if you need customization.

When you install NS on your machine, it comes with a help file. In the help, there is a tutorial. It gives you step-by-step instructions on how to build an NS application. This tutorial is also available online at
http://msdn2.microsoft.com/en-us/library/ms170337.aspx (NS for SQL Server 2005)
or http://msdn2.microsoft.com/en-us/library/aa238959(SQL.80).aspx (if you are using SQL Server 2000).

Event data file:
This is one way of submitting "raw" data to your SQL NS app. Yes, you need to copy the new file (with new raw data) into the specified directory every time you have collected new data and want it processed.
There is another way of submitting raw data to your NS app: using a built-in SQL Event Provider. Basically, it means inserting data into a SQL Server table, and then SQL NS takes care of the rest: processing the new data, matching it against subscriptions, etc.
Also, you can create your own custom event provider, but this task should come only after you have no problems with the "basic" stuff...

So, briefly, I would recommend that you start with the tutorial, and get a good book.

|||

Sorry, I put it a wrong way: of course, the differences between NS 2.0 (for SQL Server 2000) and NS for SQL Server 2005 are NOT negligible.

What I was trying to say is: if you know NS for SQL Server 2000, it will take you only a couple of hours to learn what's new in NS 2005.

On the other hand, if you don't care about SQL Server 2000 and need NS 2005, get Shyam Pather's book (on NS 2005).

...and let's hope that Joe Webb will write another edition of his excellent book, this time for SQL Server 2005 (or, 2008).

|||

thanks for your post...

but I got 2 questions:

first : what should really be the values of nsServer,serviceUserName,servicePassword ?

because to be honest I've put for nsServer(the name of the server in SQL Managment studio)

& for serviceUserName,servicePassword ( the username & password that I login with it to windows)

Iam sure there is a problem here cause everyime I try to start the Ns from managment studio I get an error?

second: what I understood from your post is that the way I am using the C# classes does not let me or don't let me need the XML files ....but the sample Iam trying to follow infact uses it

http://en.csharp-online.net/Notification_Services%E2%80%94Creating_a_Notification_Services_Application_and_Service_2

so Iam kind of confuessd ....can you please clear this point to me?