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.

Opening Log File Viewer

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

  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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

Permissions

Requires membership in the securityadmin fixed server role.

See Also

Other Resources

Change History

Updated content

Added information about how to open Log File Viewer.