Showing posts with label samples. Show all posts
Showing posts with label samples. Show all posts

Friday, March 23, 2012

External Activation and Notification Services

I have been going over the samples from PDC 2005 and trying to run the External Activator program in section 2 'CLR Services'. After sending a message to the Inventory Queue, I see that 'dm_broker_queue_monitors' table has a row in the table, with the state column shown as 'NOTIFIED', but the ExternalActivator program never gets notified of the event and therefore never launches the 'InventoryServer' program.

Querying the [ExternalActivatorQueue] shows no rows.

Querying the [Inventory Queue] shows messages are waiting to be received.

Executing the 'activator' command in the ExternalActviator program shows

Notification service 'ExternalActivator' on SQL Server 'DBSERVER\' and Database 'In
ventory' is connected to the database and working.

Any Ideas?

Thanks,

-KuoAfter some browsing through code in the samples, I figured out the problem. The queue thats suppose to contain all the notification messages for the ExternalActivator program was checking the correct queue for messages, however no messages were being created in the [ExternalActivatorQueue] whenever a new message was sent to the [Inventory Queue].
So I, dDropped the event, 'en', and reran the create event notifcation:

drop event notification en on queue [Inventory Queue]

create event notification en
on queue [Inventory Queue]
for queue_activation
to service 'ExternalActivator', 'current database';

sent a few more messages and the ExternalActivatorQueue started getting messages in the queue whenever a new message was sent to the [Inventory Queue].

This is really strange. I know I must of ran the create event notification command a few times. Oh well, it works now.

-Mr.Kuo

Wednesday, March 21, 2012

extended stored procedure question

Hi,
Is there possible to write extended stored procedure (i.e. Delphi DLL) which
do insert (or other DML operation)? I saw some samples - but I didnt find
such kind.
Thanks and nice dayYes, it is possible to write extended stored procedures with Visual C++. SQ
L
Books Online provides information in the article "Creating Extended Stored
Procedures"
"Petez" wrote:

> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL) whi
ch
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>

extended stored procedure question

Hi,
Is there possible to write extended stored procedure (i.e. Delphi DLL) which
do insert (or other DML operation)? I saw some samples - but I didnt find
such kind.
Thanks and nice dayonly in C
"PeterZ" wrote:

> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL) whi
ch
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>|||Yes, see http://www.berenddeboer.net/article/1293/1293.html
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"PeterZ" <PeterZ@.discussions.microsoft.com> wrote in message
news:B59D6BDC-B73B-45B9-97B0-DD701953B3D8@.microsoft.com...
> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL)
> which
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>|||Finally, it is nice to see you here :)
Salesql

Monday, March 12, 2012

extended procedures

I'm finding lots of code samples for writing extended procs, but *all* of
them
do nothing with SQL. Hello or calculating free disk space are common
examples.
I'm writing a sp because I want to work with SQL data. How do I do
that from an xp?
Do I have to go back around through ADO?
I would think that ODS would have a method in the API to interact with
the data, but you can't tell that from the sample code I've found so far.
Thanks,
Brad.Normally an XP will perform functions that aren't available (or aren't fast
enough) via standard T-SQL. If all you want to do is execute standard T-SQL
statements against your database, you probably want to write a regular SP.
"Brad White" <bwhite at inebraska . com> wrote in message
news:%23v1TOVwYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> I'm finding lots of code samples for writing extended procs, but *all* of
> them
> do nothing with SQL. Hello or calculating free disk space are common
> examples.
> I'm writing a sp because I want to work with SQL data. How do I do
> that from an xp?
> Do I have to go back around through ADO?
> I would think that ODS would have a method in the API to interact with
> the data, but you can't tell that from the sample code I've found so far.
> --
> Thanks,
> Brad.
>
>