[ @eventid=] event_id
Is the ID of the event to turn on. event_id is int, with no default. The ID must be one of the event numbers from 82 through 91, which represent user-defined events as set with sp_trace_setevent.

[ @userinfo= ] 'user_info'
Is the optional user-defined string identifying the reason for the event. user_info is nvarchar(128), with a default of NULL.

[ @userdata= ] user_data
Is the optional user-specified data for the event. user_data is varbinary(8000), with a default of NULL.

sp_trace_generateevent performs many of the actions previously executed by the xp_trace_* extended stored procedures. Use sp_trace_generateevent instead of xp_trace_generate_event.

Only ID numbers of user-defined events may be used with sp_trace_generateevent. SQL Server will raise an error if other event ID numbers are used.

Parameters of all SQL Trace stored procedures (sp_trace_xx) are strictly typed. If these parameters are not called with the correct input parameter data types, as specified in the argument description, the stored procedure will return an error.

--Create a sample table.
CREATE TABLE user_config_test(col1 int, col2 char(10));
--DROP the trigger if it already exists.
IF EXISTS
(SELECT * FROM sysobjects WHERE name = 'userconfig_trg')
DROP TRIGGER userconfig_trg;
--Create an ON INSERT trigger on the sample table.
CREATE TRIGGER userconfig_trg
ON user_config_test FOR INSERT;
AS
EXEC master..sp_trace_generateevent
@event_class = 82, @userinfo = N'Inserted row into user_config_test';
--When an insert action happens, the user-configurable event fires. If
you were capturing the event id=82, you will see it in the Profiler output.
INSERT INTO user_config_test VALUES(1, 'abc');