Default Error Logs

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 716540

    Comments posted to this topic are about the item Default Error Logs

  • Stewart "Arturius" Campbell

    SSC Guru

    Points: 71480

    Nice question to start the week on, thanks Steve

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • ildjarn.is.dead

    Right there with Babe

    Points: 717

    The default is 6, which is the number of previous backup logs SQL Server retains before recycling them.

    This says there are 6 previous logs retained, so there are 7 logs in total. Just checked with my out-of-the-box install: ERRORLOG and ERRORLOG.1-6.

  • Thom A

    SSC Guru

    Points: 98445

    Interestingly, that documentation doesn't appear to be correct for the Linux release at all. You cannot Configure the Logs on the Linux version (see below which is Linux vs Windows):

    Also, it appears that Linux doesn't have an upper limit.

    thom@qebui:~$ thom@qebui:~$ ls /var/opt/mssql/log/errorlo* -l -t
    -rw-rw---- 1 mssql mssql 12538 Sep 2 18:56 /var/opt/mssql/log/errorlog.6
    -rw-rw---- 1 mssql mssql 8774 Aug 16 07:50 /var/opt/mssql/log/errorlog.7
    -rw-rw---- 1 mssql mssql 8774 Aug 15 12:02 /var/opt/mssql/log/errorlog.8
    -rw-rw---- 1 mssql mssql 8189 Aug 4 12:25 /var/opt/mssql/log/errorlog.9
    -rw-rw---- 1 mssql mssql 229131 Aug 4 12:20 /var/opt/mssql/log/errorlog.10
    -rw-rw---- 1 mssql mssql 8778 Aug 4 12:14 /var/opt/mssql/log/errorlog.11
    -rw-rw---- 1 mssql mssql 8778 Jul 30 09:54 /var/opt/mssql/log/errorlog.12
    -rw-rw---- 1 mssql mssql 9059 Jul 30 09:29 /var/opt/mssql/log/errorlog.13
    -rw-rw---- 1 mssql mssql 11126 Jul 25 13:24 /var/opt/mssql/log/errorlog.14
    -rw-rw---- 1 mssql mssql 9618 Jul 20 15:37 /var/opt/mssql/log/errorlog.15
    -rw-rw---- 1 mssql mssql 8257 Jul 15 15:20 /var/opt/mssql/log/errorlog.16
    -rw-rw---- 1 mssql mssql 9474 Jul 13 16:48 /var/opt/mssql/log/errorlog.17
    -rw-rw---- 1 mssql mssql 7614 Jul 13 14:38 /var/opt/mssql/log/errorlog.18
    -rw-rw---- 1 mssql mssql 7986 Jul 13 14:29 /var/opt/mssql/log/errorlog.19
    -rw-r----- 1 mssql mssql 10344 Jul 13 14:27 /var/opt/mssql/log/errorlog.20
    -rw-r----- 1 mssql mssql 0 Jul 13 14:27 /var/opt/mssql/log/errorlog.21
    thom@qebui:~$ sudo service mssql-server restart
    thom@qebui:~$ ls /var/opt/mssql/log/errorlo* -l -t
    -rw-rw---- 1 mssql mssql 8009 Sep 30 10:12 /var/opt/mssql/log/errorlog
    -rw-rw---- 1 mssql mssql 8866 Sep 30 10:12 /var/opt/mssql/log/errorlog.1
    -rw-rw---- 1 mssql mssql 9957 Sep 30 10:10 /var/opt/mssql/log/errorlog.2
    -rw-rw---- 1 mssql mssql 10801 Sep 20 18:52 /var/opt/mssql/log/errorlog.3
    -rw-rw---- 1 mssql mssql 8905 Sep 18 08:24 /var/opt/mssql/log/errorlog.4
    -rw-rw---- 1 mssql mssql 13282 Sep 18 08:13 /var/opt/mssql/log/errorlog.5
    -rw-rw---- 1 mssql mssql 8614 Sep 3 19:22 /var/opt/mssql/log/errorlog.6
    -rw-rw---- 1 mssql mssql 12538 Sep 2 18:56 /var/opt/mssql/log/errorlog.7
    -rw-rw---- 1 mssql mssql 8774 Aug 16 07:50 /var/opt/mssql/log/errorlog.8
    -rw-rw---- 1 mssql mssql 8774 Aug 15 12:02 /var/opt/mssql/log/errorlog.9
    -rw-rw---- 1 mssql mssql 8189 Aug 4 12:25 /var/opt/mssql/log/errorlog.10
    -rw-rw---- 1 mssql mssql 229131 Aug 4 12:20 /var/opt/mssql/log/errorlog.11
    -rw-rw---- 1 mssql mssql 8778 Aug 4 12:14 /var/opt/mssql/log/errorlog.12
    -rw-rw---- 1 mssql mssql 8778 Jul 30 09:54 /var/opt/mssql/log/errorlog.13
    -rw-rw---- 1 mssql mssql 9059 Jul 30 09:29 /var/opt/mssql/log/errorlog.14
    -rw-rw---- 1 mssql mssql 11126 Jul 25 13:24 /var/opt/mssql/log/errorlog.15
    -rw-rw---- 1 mssql mssql 9618 Jul 20 15:37 /var/opt/mssql/log/errorlog.16
    -rw-rw---- 1 mssql mssql 8257 Jul 15 15:20 /var/opt/mssql/log/errorlog.17
    -rw-rw---- 1 mssql mssql 9474 Jul 13 16:48 /var/opt/mssql/log/errorlog.18
    -rw-rw---- 1 mssql mssql 7614 Jul 13 14:38 /var/opt/mssql/log/errorlog.19
    -rw-rw---- 1 mssql mssql 7986 Jul 13 14:29 /var/opt/mssql/log/errorlog.20
    -rw-r----- 1 mssql mssql 10344 Jul 13 14:27 /var/opt/mssql/log/errorlog.21
    -rw-r----- 1 mssql mssql 0 Jul 13 14:27 /var/opt/mssql/log/errorlog.22

    Notice that for the first ls there are 21 archive files (plus the Live), and then after the service is restarted there are 22 Archive files. Might have to think about building a "cleaning" operation in the future.

    On a different note, I got this wrong, I remembered 5 were archived, but forgot to count the current file. >_<

     

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 716540

    ildjarn.is.dead wrote:

    The default is 6, which is the number of previous backup logs SQL Server retains before recycling them.

    This says there are 6 previous logs retained, so there are 7 logs in total. Just checked with my out-of-the-box install: ERRORLOG and ERRORLOG.1-6.

    This is mis-worded. The default is 6. This is total logs. A note sent to MS to fix the wording.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply