How to: Open Log File Viewer
Log File Viewer in SQL Server Management Studio is used to access information about error and events that are captured in the following logs:
- Data Collection
- Database Mail
- SQL Server
- SQL Server Agent
- Job history
- Windows events (accessed from Windows Event Viewer)
Also, beginning in SQL Server 2008, you can use Log File Viewer to access audit logs. For more information about how to set up audits, see Understanding SQL Server Audit.
You can open Log File Viewer in several ways, depending on the information that you want to view.
To view logs related to general SQL Server activity
In Object Explorer, expand Management.
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 Management.
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 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.
- 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 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.
- 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 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.
- 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 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.
- 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.
- 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.
Security
Requires membership in the securityadmin fixed server role.