Export (0) Print
Expand All

Log File Viewer

You can use Log File Viewer in SQL Server Management Studio to access information about errors and events that are captured in the following logs:

  • Data Collection

  • Database Mail

  • SQL Server

  • SQL Server Agent

  • Job History

  • Windows events (These events can also be accessed from Windows Event Viewer.)

Also, beginning in SQL Server 2008, Log File Viewer can access audit logs. For more information about how to set up audits, see Understanding SQL Server Audit.

You can open Log File Viewer from several points in Management Studio, depending on the information that you want to view.

To view logs that are related to general SQL Server activity

  1. In Object Explorer, expand Management.

  2. Select one of the following options:

    • Right-click SQL Server Logs, click View, and then click either SQL Server Log or SQL Server and Windows Log.

    • Expand SQL Server Logs, right-click any log file, and then click View SQL Server Log. You can also double-click any log file.

    Includes logs for Database Mail, SQL Server, SQL Server Agent, and Windows NT events.

To view logs that are related to jobs

  • In Object Explorer, expand SQL Server Agent, right-click Jobs, and then click View History.

    Includes logs for Database Mail, Job History, and SQL Server Agent.

To view logs that are related to maintenance plans

  • In Object Explorer, expand Management, right-click Maintenance Plans, and then click View History.

    Includes logs for Database Mail, Job History, Maintenance Plans, Remote Maintenance Plans, and SQL Server Agent.

To view logs that are related to Data Collection

  • In Object Explorer, expand Management, right-click Data Collection, and then click View Logs.

    Includes logs for Data Collection, Job History, and SQL Server Agent.

To view logs that are related to Database Mail

  • In Object Explorer, expand Management, right-click Database Mail, and then click View Database Mail Log.

    Includes logs for Database Mail, Job History, Maintenance Plans, Remote Maintenance Plans, SQL Server, SQL Server Agent, and Windows NT events.

To view logs that are related to audits collections

  • In Object Explorer, expand Security, expand Audits, right-click an audit, and then click View Audit Logs.

    Includes logs for Audit Collection and Windows NT events.

Requires membership in the securityadmin fixed server role.

Updated content

Added information about how to open Log File Viewer.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft