Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Generate RPC:Completed Event

I was doing a research on SQL trace regarding RPC:Completed event. So I need to generate a RPC:Completed event first for test, but it seems I cannot(or I do not know how to) do it within SSMS quickly.

So I create a quick VBScript to do this for me:

dim oCnn, oCmd
set oCnn = createobject("ADODB.Connection")
set oCmd = CreateObject("ADOdb.Command")
oCnn.Open "Provider='sqloledb';Data Source='myServer'; Integrated Security='SSPI';Initial Catalog='TestDB';"
oCmd.ActiveConnection = oCnn
oCmd.CommandText = "sp_who"
oCmd.CommandType = 4 'adCmdStoredProc
oCmd.execute

Save this as a RPC.vbs file, and in command window, I just run

cscript RPC.vbs

and in SQL Profiler, I can see the RPC:Completed event

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.