4

I use extended events to store database errors, like this:

CREATE EVENT SESSION [ErrorCapture] 
ON SERVER 
ADD EVENT sqlserver.error_reported
(
    ACTION
    (
        sqlserver.client_hostname,
        sqlserver.database_id,
        sqlserver.sql_text,
        sqlserver.username
    )
    WHERE 
    (
        [severity] >= (11)
    )
) 
ADD TARGET package0.asynchronous_file_target
(
    SET filename='J:\ServerXmlOutput\ErrorCapture.xel'
)
WITH 
(
    MAX_MEMORY=4096 KB,
    EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,
    MAX_DISPATCH_LATENCY=10 SECONDS,
    MAX_EVENT_SIZE=0 KB,
    MEMORY_PARTITION_MODE=NONE,
    TRACK_CAUSALITY=OFF,
    STARTUP_STATE=ON
);

This works great. Sometimes, the SQL statement (sql_text) that is logged contains only the following:

*password------------------------------------------------------------------------------------------------------------------------------------------

What is the reason, and how do I find out which statement is causing this?

4
  • The same issue happens also for SQL Trace, when some procedure has a parameter called [@password]. The events are cleared out for obfuscation purposes (even if the pwd value is encrypted) so Profiler (or XE) isn't used for unintended purposes. Not very familiar with XE so don't know how to advise you further. Maybe check if you have a procedure with parameter [@password] and change it (for tests only) to a different name? Or a table with a column Password? – Marian May 2 '13 at 8:56
  • That could be an answer. Is there any way to disable this behaviour? – carlo.borreo May 2 '13 at 9:06
  • 1
    Sure, don't have parameters like @password. – Aaron Bertrand May 2 '13 at 9:21
  • I now don't have any procedure with parameter @password, still the errors like that keep coming. May this also be caused by a database column named "password" or "abc_password" ? – carlo.borreo May 9 '13 at 8:05
1

It is confirmed that this is caused by a column called password or an argument @password.

A column called abc_password does not cause this behaviour.

1
  • 1
    You should mark your answer as the answer. – Thomas Stringer Jan 7 '14 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.