SQL Homework – December 2017 – View the log

3

December 4, 2017 by Kenneth Fisher

homework-clipart-homework-alert-free-images-at-vector-clip-art-onlineLast homework of the year. Last month was to create a view. This month it’s time to take a look in the log! No, not the transaction log. The SQL Server Log. Where error events, backup events, startup events etc, etc get stored. If something goes wrong on your instance, or someone is having a hard time connecting to it this is one of the first places you should be looking at. Given the importance of the subject, for the first time, I’m putting two sets of work. One for Jr/Mid level individuals and one for more Sr. level individuals.

Jr & Mid level people

  • Open the log in the GUI. 50 points
  • Find the last time your instance was restarted and review the entries. 15 points
  • See what other types of entries there are. 10 points
  • Figure out how to change the settings to write both successful and unsuccessful logins to the log, just one or the other, or neither. 15 points
  • Figure out how to modify the number of log files kept. 10 points

 

Sr level people

  • View the log files using a text editor. (Not in the SQL GUI.) 10 points
  • Find or write a script that will search the error log programmatically. 40 points
  • Figure out how to turn off the backup entries. 20 points
  • Figure out how to write to the log. 10 points
  • Do you have a way to automatically check your log for issues? Should you? If you don’t, develop a plan to do so. 20 points and you are less likely to have a resume generating event.

3 thoughts on “SQL Homework – December 2017 – View the log

  1. […] did a homework assignment a few months back to read the log. I’m going to assume that you either have done your homework or already know what was […]

  2. […] a temp table. I did one version here but it was pretty specific to I/O errors. I also gave some homework to find/build a script like it. So if you didn’t do the homework here is a nice little (more […]

  3. […] and easy post today. Hopefully you’ve opened the error log on a SQL instance. However, what happens if you don’t have the log viewer in SSMS? In fact, the instance […]

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 6,758 other subscribers

Follow me on Twitter

Archives

ToadWorld Pro of the Month November 2013