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
    Commented May 2, 2013 at 8:56
  • That could be an answer. Is there any way to disable this behaviour? Commented May 2, 2013 at 9:06
  • 1
    Sure, don't have parameters like @password. Commented May 2, 2013 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" ? Commented May 9, 2013 at 8:05

1 Answer 1

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. Commented Jan 7, 2014 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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