Grant Fritchey wrote:
It would be easier to give a complete answer with the Profiler events and filter. However, on a guess, the process id changed? They're not always the same. If a connection drops & reconnects, you can have a different ID. Or, you're trying to capture say, rpc_completed, but the procedure hasn't completed, so you won't see anything. Also, since we're talking 2012, Extended Events are a radically more efficient way to capture behaviors.
Dear Grant Fritchey, thanks for your kind help!
After double checked, there is a application server ( that is the middleware ) for this system, when I run the function of c/s client, it calls the application server to execute the function and return the result to c/s client, so the SQL Script should be performed the middleware system, so SQL Server profile couldn't capture the sql scripts when I filtered using clientprocessID, I guess this is the reason, thanks!