Working with the Event Logs

Page 1 of 5

Working with the Event Logs Event logs provide historical information that can help you track down problems with SQL Server. SQL Server writes events to the SQL Server event logs, the SQL Server Agent event logs, and the Windows application log. You can use all three logs to track messages related to SQL Server. However, there are some things you should know about these logs: z Only the application log provides additional information on all applications running on the server, and only the application log provides features for filtering events based on type. For example, you can filter events so that only error and warning messages are displayed. z If you start the MSSQLServer or MSSQL$ instancename service from the command prompt, events are logged to the SQL Server event log and to standard output. No events are recorded in the Windows application log. z Windows has additional logs that can be helpful when tracking issues. If you are tracking security issues, start with the SQL Server event logs and also examine the Windows security log. If you are having trouble finding the source of a problem that is preventing proper operation of SQL Server, start with the SQL Server logs and also examine the Windows application and system logs.

SQL Server error messages can be cryptic and difficult to read if you do not understand the formatting. Error messages logged by SQL Server can have the following information: z An error number that uniquely identifies the error message System error numbers have one to five digits. System errors are numbered from 1 to 50,000. User-defined errors start at 50,001. z A severity level that indicates how critical the message is Severity levels range from 1 to 25. Messages with a severity level of 0 to 10 are informational messages. Severity levels from 11 to 16 are generated by users and users can correct them. Severity levels from 17 to 25 indicate software or hardware errors that you should examine. z An error state number that indicates the source of the error Error state numbers have one to three digits and a maximum value of 127. Normally, error state numbers indicate the line number in the SQL Server code that generated the message. z A message that provides a brief description of the error Read the message to get more information about the error, which will help you in troubleshooting problems.

You might see ODBC (Open Database Connectivity) and OLEDB (object linking and embedding database) return errors from SQL Server that contain similar information as well. The sys.messages catalog view in the master database contains a list of error messages and descriptions that can be returned by SQL Server. To see all error messages that can be returned by SQL Server, you can execute the following T-SQL statement: USE master GO SELECT * FROM sys.messages GO

Examining the Application Log The application log contains entries for all database server instances running on the computer, as well as entries for other business applications. You access the application log by completing the following steps: 1.

Click Start, click All Programs, click Administrative Tools, and then choose Event Viewer. This starts Event Viewer.

2.

Event Viewer displays logs for the local computer by default. If you want to view logs on a remote computer, right-click the Event Viewer node in the console tree (left pane), and then select Connect To Another Computer to display the Select Computer dialog box. In the dialog box, enter the name of the

mk:@MSITStore:I:\Free%20E-books\DATABASE\MS%20SQL%202008...

2/21/2010

Working with the Event Logs

Page 2 of 5

computer you want to access, and then click OK. 3.

In the console tree (left pane), expand the Windows Logs node and then click Application. You should see an application log similar to the one shown in Figure 14-3. Use the information in the Source column to determine which service or database server instance logged a particular event. Figure 14-3. A Windows application log.

Note Windows Server 2003 and Windows Server 2008 have different versions of Event Viewer. On Windows Server 2003, Event Viewer doesn't have additional nodes and you can access the application log directly from the console tree.

The entries in the main window of Event Viewer provide a quick overview of when, where, and how an event occurred. To obtain detailed information on an event, review the details provided on the General tab in the lower portion of the main window. The event level or keyword precedes the date and time of the event. Event levels include z Information An informational event that is generally related to a successful action. z Audit Success An event related to the successful execution of an action. z Audit Failure An event related to the failed execution of an action. z Warning A noncritical error that provides a warning. Details for warnings are often useful in preventing future system problems. z Error An error, such as the failure of a service to start.

mk:@MSITStore:I:\Free%20E-books\DATABASE\MS%20SQL%202008...

2/21/2010

Working with the Event Logs

Page 3 of 5

In addition to the date, time, and event type indicator, the summary and detailed event entries provide the following information: z Source The application, service, or component that logged the event z Event ID An identifier for the specific event z Task Category The category of the event, which is sometimes used to further describe the related action z User The user account that was logged on when the event occurred, if applicable z Computer The computer name on which the event occurred z Description A text description of the event, provided in detailed entries z Data Any data or error code output by the event, provided in detailed entries

Warnings and errors are the two main types of events that you want to examine closely. Whenever one of these types of events occurs and you are unsure of the cause, review the detailed event description. If you want to see only warnings and errors, you can filter the log. To filter a selected log on Windows Server 2003, complete the following steps: 1.

From the View menu, choose the Filter option.

2.

Clear the following check boxes: Information, Success Audit, and Failure Audit.

3.

Select the Warning and Error check boxes if they are not already selected.

4.

Click OK. You should now see a list of warning and error messages only. Remember that these messages are for all applications running on the server and not just for SQL Server.

To filter a selected log on Windows Server 2008, complete the following steps: 1.

In the actions pane or on the Action menu, click Filter Current Log.

2.

Use the Logged list to select the included time frame for logged events. You can choose to include events from the Last Hour, Last 12 Hours, Last 24 Hours, Last 7 Days, or Last 30 Days.

3.

Use the Event Level check boxes to specify the level of events to include. Select Verbose to get additional detail.

4.

Use the Event Source list to select event sources to include. If you select specific event sources, all other event sources are excluded.

5.

Optionally, use the User and Computer(s) boxes to specify users and computers that should be included. If you do not specify the users and computers to be included, events generated by all users and computers are included.

6.

Click OK. You should now see a filtered list of events. Review these events carefully, and take steps to correct any problems that exist. To clear the filter and see all events for the log, click Clear Filter in the actions pane or on the Action menu.

Examining the SQL Server Event Logs The SQL Server logs record information, warnings, errors, and auditing messages pertaining to SQL Server activity. New logs are created when you start the SQL Server service or when you run the sp_cycle_errorlog stored procedure. When a new log is created, the current log is cycled to the archive. SQL Server maintains up to five archived logs (by default).

mk:@MSITStore:I:\Free%20E-books\DATABASE\MS%20SQL%202008...

2/21/2010

Working with the Event Logs

Page 4 of 5

You can view the SQL Server event logs in SQL Server Management Studio or through a text editor. In SQL Server Management Studio, you access the event logs by completing the following steps: 1.

Start SQL Server Management Studio. In the Object Explorer view, connect to the database server of your choice, and then work your way down to the Management folder.

2.

Expand the Management folder, and then double-click the SQL Server Logs entry. The current log is shown with the label Current. Archived logs are shown with descriptive labels such as Archive #1.

3.

Double-click the log you want to view to open it in Log File Viewer.

4.

With Log File Viewer open, you can add other logs to the log file summary by selecting their check boxes, as shown in Figure 14-4.

Figure 14-4. Log File Viewer.

To access the event logs in a text editor, complete the following steps: 1.

Start a text editor, such as WordPad, and then use its Open dialog box to access the SQL Server Log folder, normally located in MSSQL10.MSSQLSERVER\MSSQL\LOG or MSSQL10.InstanceName\MSSQL\LOG.

2.

Open the log you want to examine. The current log file is named ERRORLOG with no file extension. The most recent log backup has the extension .1, the second most recent has the extension .2, and so on.

mk:@MSITStore:I:\Free%20E-books\DATABASE\MS%20SQL%202008...

2/21/2010

Working with the Event Logs

Page 5 of 5

To change the number of logs that SQL Server maintains, right-click the SQL Server Logs entry in the Object Explorer view and select Configure. In the Configure SQL Server Error Logs dialog box, select Limit The Number Of Error Log Files and then set the maximum number of error log files to retain using the Maximum Number Of Error Log Files combo box. The default number of log files maintained is six: one current log and five archive logs. You can change the number of logs maintained to any value from 6 through 99.

Examining the SQL Server Agent Event Logs The SQL Server Agent logs record information, warnings, and errors pertaining to SQL Server Agent activity. New logs are created only when you start the SQL Server Agent service. When a new log is created, the current log is cycled to the archive. SQL Server maintains up to five archived agent logs (by default). In SQL Server Management Studio, you access the current SQL Server Agent log by completing the following steps: 1.

Start SQL Server Management Studio. In the Object Explorer view, connect to the database server of your choice, and then work your way down to the SQL Server Agent node.

2.

Expand the SQL Server Agent node, and then double-click the Error Logs entry. The current log is shown with the label Current. Archived logs are labeled Archive # 1 and so on.

3.

Double-click the log you want to view to open it in Log File Viewer.

4.

With Log File Viewer open, you can add other logs to the log file summary by selecting their check boxes.

To access archived SQL Server Agent event logs in a text editor, complete the following steps: 1.

Start the text editor, and then use its Open dialog box to access the SQL Server Log folder, which is normally located in MSSQL10.MSSQLSERVER\MSSQL\LOG or MSSQL10.InstanceName\MSSQL\LOG.

2.

Open the log you want to examine. The current log file is named SQLAGENT.OUT. The most recent log backup has the extension .1, the second most recent has the extension .2, and so on.

You can manage the SQL Server Agent logs in several ways. You can force the SQL Server Agent to recycle the current log by right-clicking the SQL Server Agent\Error Logs node in the Object Explorer view, selecting Recycle, and then clicking OK. When you do this, SQL Server closes out the current agent log, moves it to an archive log, and starts a new agent log. You can control the level of logging and set the log file location as well. To do this, complete the following steps: 1.

Right-click the SQL Server Agent\Error Logs node in the Object Explorer view, and then select Configure.

2.

Use the Error Log File box to set the folder path and file name of the agent log. The default path is MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLAGENT.OUT or MSSQL10.InstanceName\MSSQL\LOG\SQLAGENT.OUT. New archive files will also be created in the folder specified as part of the path.

3.

Use the Agent Log Level check boxes to control the level of logging for the SQL Server Agent. By default, only error and warning messages are logged. If you want to view informational messages in the logs, select the Information check box as well.

4.

Click OK.

mk:@MSITStore:I:\Free%20E-books\DATABASE\MS%20SQL%202008...

2/21/2010

Page 1 of 5 Working with the Event Logs 2/21/2010 ... -

Select the Warning and Error check boxes if they are not already selected. 4. Click OK. You should now see a list of warning and error messages only. Remember that these messages are for all applications running on the server and not just for SQL Server. 1. In the actions pane or on the Action menu, click Filter Current ...

194KB Sizes 0 Downloads 125 Views

Recommend Documents

Page 1 of 1
Page 1 of 1. REVISTA CIENTÍFICA ELETRÔNICA DE MEDICINA VETERINÁRIA - ISSN 1679-7353. PUBLICAÇÃO CI ENTÍFICA DA FACULDADE DE MEDICINA VETERINÁRIA E ZOOTECNIA DE GARÇA/FAMED. ANO IV, NÚMERO, 08, JANEIRO DE 2007. PERIODICIDADE: SEMESTRAL ...

Transforming Nations Page 1 of 5
all three countries -- along with Croatia, Georgia, Taiwan, Vietnam, and many others -- have joined the World Trade. Organization (WTO) in the past few years. .... Higher education and health services, for which the public sector had been unable to p

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
8.33 - Alykhiyil risk - (3E)-n)3 systiss's co-sés iss-syss was live 3: 56 lu) is pi 19. (Jessio 1932) r x, Psy-sys - Sssy). -\ss-ny's to oreyss-sys) 3) Sys) -st; it S-P is 3) syst a yook fog \ is 33 sk y) { res's p R&g, ſtyles is is toys - systs S.

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
Professional Growth (20%). 1. Education (10%). > Doctoral Degree – 10 pts. > Complete Academic requirement for Doctoral Degree – 7 pts. > Master's Degree ...

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
content may not be copied or emailed to multiple sites or posted to a listserv without the copyright holder's express written permission. However, users may print,.

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 ...
Page 1. Page 2. Page 3. Page 4. Page 5. Page 6. Page 7. Page 8. Page 9. Page 10. Page 11. Page 12. Page 13. Page 14. Page 15. Page 16. Page 17. Page 18 ...

Page 1 / 2 Loading… Page 1 Page 2 of 2 ...
Sign in. Page. 1. /. 2. Loading… Page 1. Page 2 of 2. Eacb1567b148a94cb2dd5d612c7b769256279ca60_Q8633_R329927_D1856546.pdf. Eacb1567b148a94cb2dd5d612c7b769256279ca60_Q8633_R329927_D1856546.pdf. Open. Extract. Open with. Sign In. Main menu. Displayi

Page 1 1. Contract Number Page of Pages AMENDMENT OF ...
Oct 27, 2010 - Wºmeston Number (4) | Upon Contracting Funding Certification Audit 529 ... contact Peter R. Regis, President ... phone: 202-296-7107 office.

5 3 5 5 5 5 5 1 1 1 7 3 3 35 1 1 1 2 6 5 6 5 5 1 23 4 ... -
Then. Faith. 54351 1. 5 5321. 1 1671 all on truth hearts is our o'er all with the strength ev - girt love vic - be. 'ry a - a - to -. 1 1653 gainst faith, vat - on - is the they tion's ward the foe like hel - from glor- in a met the ious. 3 3 32 3. 5

Page 1 Page 2
Page 1. Page 2.

Page 5 of 11
Jun 13, 2016 - ... ELEMENTAL VANTAGE. Page 5 of 11. Tablas_Certificados_Oficiales_Aceptados_Acreditación_Lenguas_Extranjeras.pdf.

Electrical Logs
rocks. 19.3 Typical Responses of an Electrical Tool. Figure 19.1 shows the typical response of an electrical tool in a sand/shale sequence. Note the lower resistivity in shales, which is due to the presence of bound water in clays that undergo surfac

Page 1 of 7 - Karmasandhan
Jun 6, 2017 - They should be capable of identifying well control situation and overall management of the well site .... engineer and waste disposal management (drill cuttings and mud) involved in fluid operation at the rig. ... Reviews and monitors c

Page 1 of 7 - Karmasandhan
Jun 6, 2017 - For the post of Drilling Engineer on contract - The candidates should be able to operate. AC/SCR, drilling ... They should be capable of identifying well control situation and overall management of the well site crew. ..... Any dispute

Page 1 FOREIGN SERVICE OF THE REPUBLIC OF THE ...
AND ATTEST that the attached document is a true and faithful copy of a letter addressed to "TOWHOM ITMAY CONCERN" dated 20 January 2014 issued by.

Working with acs.R
Beyond these, there are dozens of additional good guides. (For a small sampling, see ...... to review the complete documentation at (http://cran.r-project.org/web/.