SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


application_name is not available in audit logs in SQL Server 2017


application_name is not available in audit logs in SQL Server 2017

Author
Message
ajeet.s.chouhan
ajeet.s.chouhan
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 8
I am looking for a way to fetch client application name in audit logs in SQL Server. As per the MSDN page, it should be available from SQL Server 2017 on-wards.

https://docs.microsoft.com/en-us/sql/relational-databases/system-functions/sys-fn-get-audit-file-transact-sql

I have created a database level audit specification for select and insert and I want to determine which application is executing those queries.

Any help around this topic is appreciated.
Sue_H
Sue_H
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59439 Visits: 12859
ajeet.s.chouhan - Tuesday, December 5, 2017 11:47 PM
I am looking for a way to fetch client application name in audit logs in SQL Server. As per the MSDN page, it should be available from SQL Server 2017 on-wards.

https://docs.microsoft.com/en-us/sql/relational-databases/system-functions/sys-fn-get-audit-file-transact-sql

I have created a database level audit specification for select and insert and I want to determine which application is executing those queries.

Any help around this topic is appreciated.


Are you querying the log using sys.fn_get_audit_file or are you trying to do the View Audit Logs in SSMS?
Use the query - using SSMS has different issues and can be problematic.

Sue



ajeet.s.chouhan
ajeet.s.chouhan
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 8
Hello Sue

Yes, I was trying to view it in SSMS. The query works fine and it returns the correct data.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (842K reputation)SSC Guru (842K reputation)SSC Guru (842K reputation)SSC Guru (842K reputation)SSC Guru (842K reputation)SSC Guru (842K reputation)SSC Guru (842K reputation)SSC Guru (842K reputation)

Group: General Forum Members
Points: 842646 Visits: 48504
Keep in mind that application name can be pretty easily spoofed. It's set by the connecting application.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search