SQL Server Stop SQL Tracing

j2qf4p5b  于 11个月前  发布在  其他
关注(0)|答案(1)|浏览(74)

my MSSQL DB creates every second two SQL Server Profil - tace data file:

How can I stop that, because we don't want to tracing something and it files my memory?

My SELECT * FROM sys.traces is empty. If I execute SELECT * FROM sys.server_event_sessions , the result looks like the following Screenshot:

Additionally, I execute the following command:

SELECT s.name, CAST(st.target_data AS XML).value('(/EventFileTarget/File/@name)[1]', 'NVARCHAR(100)')
FROM sys.dm_xe_sessions s
  INNER JOIN sys.dm_xe_session_targets st ON s.address = st.event_session_address  
WHERE target_name = 'event_file

The result looks like this:

Next, I open the system_health-file and get this displayed:

The hkenginexesession-file is empty.

oknrviil

oknrviil1#

Do you have enough permission to see trace list?

The visibility of the metadata in catalog views is limited to securable that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration .

If the list is still empty with sysadmin premission then check if these files are created by Extended events:

USING SSMS:
Server > Management > Session

USING TSQL

SELECT s.name, CAST(st.target_data AS X`enter code here`ML).value('(/EventFileTarget/File/@name)[1]', 'NVARCHAR(100)')
FROM sys.dm_xe_sessions s
  INNER JOIN sys.dm_xe_session_targets st ON s.address = st.event_session_address  
WHERE target_name = 'event_file'

The above query return session name and filename of outputs.

相关问题