Use below query to get the sql text of a particular sid.

When the below script asks for input, enter the SID.