For reading audit files for reporting Failed login attempts .
Need to read the audit log files already configured . Requirement is store the connection event info including event time ,instance_name, database_name, client IP etc, and store result in table . as the audit logs are going to be recycled
Currently tried two approaches
a. fn_get_audit_file
b. xp_readerrorlog
Both are giving different number of rows in result.
Which is preferred. Have SQL Server 2008 R2 and SQL Server 2012
DBA's need your help on this