I have a stored procedure that retrieves sensitive information from an SQL Server 2008 database. I would like to modify the procedure so that any time it is called, it records information about who called it in a separate table.

I thought something like the following would work:

```
declare @account varchar(255);
set @account = (SELECT SYSTEM_USER);

INSERT into AUDIT_LOG(ACCOUNT, TSTAMP)
VALUES(@account, getdate())
;

--Now fetch data
SELECT x,y,z from sensitive_info;

```

My issue is that the client application can issue a call to this stored procedure and get the sensitive information, but *not* commit the connection and the INSERT never occurs!

Is there some way to force the INSERT to happen before the SELECT?

I am using SQL Server 2008.

Thanks,
Carl