• rochesterd (5/29/2013)


    Thanks for pointing out I had these events sorted by type of event instead of event start time. I sorted them by event start time, so they make a little more sense... but still have some questions...

    Event Class = Trace Start

    ---------------------------------------------------------------------------------------

    What does this do?

    Event Class = RPC: Completed

    TextData = exec sp_unprepare 26

    ---------------------------------------------------------------------------------------

    This removes the prepared sql statement from the SQL Server. You should see one of these for every sp_prepexec or sp_prepare/sp_execute combination, unless you end the trace before a prepared sql statement is no longer needed.

    Does select @p1 actually execute the SQL statement or does it get the returned value of the sql statement?

    Event Class = RPC: Completed

    TextData = declare @p1 int

    set @p1=26

    exec sp_prepexec @p1 output,NULL,N'SELECT in_update FROM ngn_ids WHERE id_name = ''Histories_MedSurg'' AND id_value = ''557D78F4-F830-47C6-BE87-23F567F2FC3C'''

    select @p1

    ---------------------------------------------

    Select @p1 is just returning the value to the application so the application can re-use it with another sp_execute or with sp_unprepare

    I don't understand the select @p1, @p3, @p4

    It has executed the SQL, so @p1 stores the result of the SQL, right?

    is select @p1, @p3, @p4 actually a select statement? if not what is it doing in that select line?

    Event Class = RPC: Completed

    TextData = declare @p1 int

    set @p1=28

    declare @p3 int

    set @p3=0

    declare @p4 varchar(max)

    set @p4='ng_update_person: (Success), Person "Deano TestRochester" {557D78F4-F830-47C6-BE87-23F567F2FC3C} Added.'

    exec sp_prepexecrpc @p1 output,N'ng_update_person',@po_result_code=@p3 output,@po_result_message=@p4 output,@pi_person_id='557D78F4-F830-47C6-BE87-23F567F2FC3C',@pi_user_id=154

    select @p1, @p3, @p4

    ---------------------------------------------

    @p1 is the handle for the sql statement, @p3 and @p4 are output parameters for the call and are returned so the application can use them if needed.

    What does this do?

    Runs a select statement, but what for?

    What does it do with the data selected?

    Event Class = SQL: BatchCompleted

    TextData = SELECT pe.enterprise_id, pe.practice_id, pe.person_id, pe.other_id_number, pe.first_name, pe.last_name, pe.middle_name, pa.person_id ,pa.med_rec_nbr, pe.date_of_birth, pe.sex, pe.nickname FROM { oj person pe LEFT OUTER JOIN patient pa ON pe.person_id = pa.person_id AND pa.practice_id = '0001' } WHERE pe.person_id = '557D78F4-F830-47C6-BE87-23F567F2FC3C'

    _____________________________________

    This is a select statement being run by an application so that a user can get data about the person specified in the where clause. What the application/user does with the data isn't something anyone on the forum can know because we don't have the application. If you want to know what the application does with the data you need to get a copy of the application, use it, and see what happens in the application when this select is run, work with a person who uses the application regularly to find out what is done with the data, or talk to the vendor/app devs.