Inside a stored procedure, how do I get the calling command line? So if my stored procedure was called like:
exec UPD_ProjectChecklistField @ProjectRecID = N'19',
@FieldName = N'chkProjectTags',
@Value = 1,
@UserID = N'jnelson'
Inside the proc I want to get that string so I can add it to some auditing. I know I could assemble it by hand but that would need to be customized in every single proc. Is there anything I can call (view, etc.) that would give me that? Kind of like an arguments list in most programming language functions like @args. I can get the proc name using OBJECT_NAME(@@PROCID) but need the whole call with parameters and values.
Any insight?