all groups > sql server notification services > october 2005 >
You're in the

sql server notification services

group:

SQL NS Walkthrough


SQL NS Walkthrough vekri
10/26/2005 5:30:05 PM
sql server notification services: Hello,

I've just started using SQL NS and currently working through the Stock
walkthrough example.

I'm stuck at step # 7, Configuring the content formatter in the View the
Unformatted Notifications portion. I don't see any notification information
in the result set.

Upon investigating, I noticed a couple of tables that were created, were
similar in structure - NSStockEventsEventBatches and
NSCurrentStockEventsEventBatches,
NSStockEventsEvents and NSCurrentStockEventsEvents. The sample script
inserts events into NSStockEventsEvents. The Eventrule uses a view
StockEvents that references the NSCurrentStockEventsEvents table, which has
no data.

I've 2 questions
1. How does data get into the NSCurrentStockEventsEvents table?
2. Is there a some document that details the tables created for this sample
and their usage.

RE: SQL NS Walkthrough vekri
10/27/2005 2:07:06 PM
I was able to figure out why the notifications were not being generated. The
Generator was not enabled. I modified the NSHOST environment variable to use
my local machine instead of the sql server, rebuilt the application and
reran the
steps. The notification is now getting generated.

I would still appreciate insight into the questions I have below.

[quoted text, click to view]
Re: SQL NS Walkthrough Joe Webb
10/27/2005 5:25:04 PM
Hi Vekri -

Glad you got your issue resolved. Thanks for posting the resolution!

As for you two questions:
[quoted text, click to view]
Event collection is the process by SQLNS is made aware of activities
outside its realm that may be of interest to subscribers. This happen
through event providers. You can think of event providers as conduits
through which events enter the system.

As events enter the application, they are stored in the 'events'
table. There isn't actually a table called 'events'; rather that's a
generic name used for discussion. The events table is defined in the
EventClass of the ADF. We can also define other tables, called
Chronicles tables, to help keep track of event data as it's being
processed.

For the 2 standard event providers in v2.0, the event provider defines
how the events arrive in the events table. For the SQL Server event
provider, we use T-SQL statements to describe how new events are to be
recognized in a remote database. That's done with the EventsQuery
argrument.

We can also create our own custom event providers using some SQLNS
stored procedures to create batches and events within those batches.
Or we can use the managed API interface.

When you create subscription rules, you should always use the events
view, rather than the the underlying table directly.

[quoted text, click to view]
BOL is always the best place to start. You're definitely on the right
track going through the walkthrough. Shyam Pather's book is very good.
I also have a book out there on it.



I'm assuming you're using SQL Server 2000, rather than 2005, since you
didn't specify. The same concepts apply to both, however there are a
few enhancements in 2005 - such as a new Analysis Services Event
Provider.

HTH...


--
Joe Webb
SQL Server MVP
http://www.sqlns.com


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)




On Thu, 27 Oct 2005 14:07:06 -0700, "vekri"
[quoted text, click to view]
AddThis Social Bookmark Button