Why am I getting the error 1084 'RPC_Starting' is an invalid enent type.
here is my code:
USE TankTracker
ALTER DATABASE TankTracker SET ENABLE_BROKER;
CREATE MASTER KEY
ENCRYPTION BY PASSWORD = 'Pa$$w0rd'
GO
-- create a queue
create QUEUE LogSQLQueue with activation(procedure_name =
dbo.usp_ProcessSQLEventNotifications,
max_queue_readers = 3, execute as self)
GO
-- create a service on the queue that references
-- the event notifications contract
create SERVICE LogSQLService
ON QUEUE LogSQLQueue
(
[http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]
)
GO
-- create a route on the service to define the address to
-- which Service Broker sends messages for the service
create ROUTE NotifyRoute
WITH SERVICE_NAME = 'LogSQLService',
ADDRESS = 'LOCAL'
GO
-- create the database event notification RESULTS IN ERROR
create EVENT NOTIFICATION LogSQLNotice ON Server
FOR RPC_Starting
TO SERVICE 'LogSQLService', 'current database'
Hello Rich,
> Why am I getting the error 1084 'RPC_Starting' is an invalid enent
> type.
My understanding is that in order to be used with an event notification,
the event has to be listed in sys.event_notification_event_types. I don't
see RPC:Starting there, but I do, for example, see SP_Compile thre and that
does work as a notification source.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
Rich Belanger - 09 Apr 2006 12:09 GMT
Thanks for your response. I looked in BOL for help to design this event
notification and found the topic:
Trace Events for Use with Event Notifications
which lists RPC_Completed. Other events listed here also don't work. Maybe
this is an old page in BOL?? I also just found:
Trace Event Groups for Use with Event Notifications
which corresponds to your post.
Rich
> Hello Rich,
>
[quoted text clipped - 10 lines]
> DevelopMentor
> http://staff.develop.com/ktegels/
Rich Belanger - 28 Apr 2006 10:19 GMT
The latest BOL (Apr 14 2006) corrects the list of events that can be used in
event notifications.
Rich