Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
1  
You should mark your answer as the answer. –  Thomas Stringer Jan 7 at 16:55
    
Ok, thanks, didn't know –  carlo.borreo Jan 7 at 22:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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