{"id":10782,"date":"2018-01-19T07:39:15","date_gmt":"2018-01-19T06:39:15","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/"},"modified":"2023-07-17T17:01:59","modified_gmt":"2023-07-17T15:01:59","slug":"sql-server-on-linux-and-logging","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/","title":{"rendered":"SQL Server on Linux and logging"},"content":{"rendered":"<p>On Windows world, SQL Server logs information both into the SQL Server error log and the Application log. Both automatically timestamp all recorded events. Unlike the SQL Server error log, the Windows application log provides an overall picture of events that occur globally on the Windows operating system. Thus,\u00a0regarding the encountered\u00a0issues taking a look at such event logs &#8211; by using either the Windows event viewer or the <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.management\/get-eventlog?view=powershell-5.1\" target=\"_blank\" rel=\"noopener noreferrer\">Get-EventLog<\/a> PowerShell cmdlet &#8211;\u00a0may\u00a0be very helpful\u00a0to figure out\u00a0they are\u00a0only SQL Server-scoped\u00a0or if you\u00a0have to\u00a0correlate with\u00a0to other operating system issues.<\/p>\n<p>But what about SQL Server on Linux? Obviously, we may use the same logging technologies. As Windows, SQL Server logs information both in the SQL Server error log located on <strong>\/var\/opt\/mssql\/log\/<\/strong> and in Linux logs. Because SQL Server is only supported on Linux distributions that all include <a href=\"https:\/\/en.wikipedia.org\/wiki\/Systemd\" target=\"_blank\" rel=\"noopener noreferrer\">systemd<\/a> ( RHEL 7.3+, SLES V12 SP2+ or Ubuntu 16.04+) we have to go through the <strong><em>journalctl<\/em><\/strong> command to browse the messages related to the SQL Server instance.<\/p>\n<p><a href=\"https:\/\/www.freedesktop.org\/software\/systemd\/man\/systemd-journald.service.html\" target=\"_blank\" rel=\"noopener noreferrer\">systemd-journald<\/a> is a system service that collects and stores logging data based on logging information that is received from a variety of sources &#8211; Kernel and user log messages. All can be viewed through the <strong>journalctl<\/strong> command.<\/p>\n<p>Let\u2019s say that the <strong><em>journalctl<\/em><\/strong> command is very powerful and I don\u2019t aim to cover all the possibilities. My intention is only to dig into some examples in the context of SQL Server. Conceptually this is not so different than we may usually do on Windows system for basic stuff.<\/p>\n<p>Firstly, let\u2019s say we may use a couple of options to filter records we want to display. Probably the first intuitive way to go through the <strong><em>journalctl<\/em><\/strong> command is to use time interval parameters as <strong>&#8211;since<\/strong> and <strong>&#8211;until<\/strong> as follows:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl --since \"2018-01-16 12:00:00\" --until \"2018-01-16 23:30:00\"<\/pre>\n<p>Here a sample of the corresponding output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20737\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg\" alt=\"blog 126 - 1 - journalctl with time interval filter\" width=\"800\" height=\"229\" \/><\/p>\n<p>All log messages are displayed including the kernel. But rather than using time interval filters we may prefer to use the <strong>-b<\/strong> parameter to show all log messages since the last system boot for instance:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl -b<\/pre>\n<p>The corresponding output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20738\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-2-journalctl-with-last-boot-filter-e1516343300213.jpg\" alt=\"blog 126 - 2 - journalctl with last boot filter\" width=\"800\" height=\"199\" \/><\/p>\n<p>You may use different commands to get the system reboot as uptime, who -b. I&#8217;m in favour of last reboot because it provides the last reboot date rather than the uptime of the system.<\/p>\n<p>Furthermore, one interesting point is that if you want to get log messages from older system boots (and not only the last one) you have to setup accordingly <strong>system-journald<\/strong> to enable log persistence. By default, it is volatile and logs are cleared after each system reboot. You may get this information directly from the <strong>system-journald<\/strong> configuration file (#Storage=auto by default):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] cat \/etc\/systemd\/journald.conf\n\u2026\n[Journal]\n#Storage=auto\n#Compress=yes\n#Seal=yes\n\u2026<\/pre>\n<p>I remembered a customer case where I had to diagnose a database check integrity job scheduled on each Sunday and that failed randomly. We finally figure out that the root cause was a system reboot after an automatic update. But the tricky part was that not all system reboots did not lead to fail the DBCC CHECKDB command and according to the information from the Windows log we understood it depended mostly on the DBCC CHECKDB command execution time which sometimes exceeded the time scheduled for system reboot. So, in this case going back to the previous reboots (before the last one) was helpful for us. Let\u2019s say that for some Linux distributions this is not the default option and my colleague <a href=\"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/\" target=\"_blank\" rel=\"noopener noreferrer\">Daniel Westermann<\/a> in the dbi services open source team explained it well\u00a0through his <a href=\"https:\/\/www.dbi-services.com\/blog\/no-journal-messages-available-before-the-last-reboot-of-your-centosrhel-system\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog post<\/a> and how to change the default behavior as well.<\/p>\n<p>So, after applying the correct setup, if you want to display log messages after a pre-defined boot time you may first identify the different system boot times logged into the journal as follows:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl --list-boots\n-1 576f0fb259f4433083c05329614d749e Tue 2018-01-16 15:41:15 CET\u2014Wed 2018-01-17 20:30:41 CET\n 0 ea3ec7019f8446959cfad0bba517a47e Wed 2018-01-17 20:33:30 CET\u2014Wed 2018-01-17 20:37:05 CET<\/pre>\n<p>Then you may rewind the journal until the corresponding offset:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl -b -1 \n-- Logs begin at Tue 2018-01-16 15:41:15 CET, end at Wed 2018-01-17 20:37:40 CET. --\nJan 16 15:41:15 localhost.localdomain systemd-journal[105]: Runtime journal is using 8.0M (max allowed 188.7M, trying to leave 283.1M free\n of 1.8G available \u2192 current limit 188.7M).\n\u2026.<\/pre>\n<p>Let\u2019s go ahead with filtering by unit (mssql-server unit). This is likely the most useful way for DBAs to display only SQL Server related records with a combination of the aforementioned options (time interval or last boot(s) parameters). In the following example, I want to display SQL Server related records since a system boot that occurred on 18 January 2018 20:39 (I may also deal with interval time filters)<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl -b -1 -u mssql-server.service \n-- Logs begin at Tue 2018-01-16 15:41:15 CET, end at Wed 2018-01-17 20:39:55 CET. --\nJan 16 15:41:17 sqllinux.dbi-services.test systemd[1]: [\/usr\/lib\/systemd\/system\/mssql-server.service:21] Unknown lvalue 'TasksMax' in sect\nion 'Service'\nJan 16 20:47:15 sqllinux.dbi-services.test systemd[1]: Started Microsoft SQL Server Database Engine.\nJan 16 20:47:15 sqllinux.dbi-services.test systemd[1]: Starting Microsoft SQL Server Database Engine\n...\nJan 16 20:47:22 sqllinux.dbi-services.test sqlservr[1119]: 2018-01-16 20:47:22.35 Server      Microsoft SQL Server 2017 (RTM-CU2) (KB40525\n74) - 14.0.3008.27 (X64)\n\u2026<\/pre>\n<p>You may also want to get only error concerned your SQL Server instance. If you already used <a href=\"http:\/\/www.linuxjournal.com\/article\/5476\" target=\"_blank\" rel=\"noopener noreferrer\">syslog<\/a> in the past you will still be comfortable with <strong>systemd-journal<\/strong> that implements the standard syslog message levels and message priorities. Indeed, each message has its own priority as shown below. The counterpart on Windows event log are event types (warning, error, critical etc &#8230;). On Linux priorities are identified by number &#8211; 6 corresponds to info messages and 3 to error messages.\u00a0Here an log message&#8217;s anatomy with the priority value.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl -b -1 -u mssql-server.service -n 1 -o verbose\n-- Logs begin at Tue 2018-01-16 15:41:15 CET, end at Wed 2018-01-17 20:48:36 CET. --\nWed 2018-01-17 20:30:38.937388 CET [s=5903eef6a5fd45e584ce03a4ae329ac3;i=88d;b=576f0fb259f4433083c05329614d749e;m=13e34d5fcf;t=562fde1d9a1\n    PRIORITY=6\n    _UID=0\n    _GID=0\n    _BOOT_ID=576f0fb259f4433083c05329614d749e\n    _MACHINE_ID=70f4e4633f754037916dfb35844b4b16\n    SYSLOG_FACILITY=3\n    SYSLOG_IDENTIFIER=systemd\n    CODE_FILE=src\/core\/job.c\n    CODE_FUNCTION=job_log_status_message\n    RESULT=done\n    _TRANSPORT=journal\n    _PID=1\n    _COMM=systemd\n    _EXE=\/usr\/lib\/systemd\/systemd\n    _CAP_EFFECTIVE=1fffffffff\n    _SYSTEMD_CGROUP=\/\n    CODE_LINE=784\n    MESSAGE_ID=9d1aaa27d60140bd96365438aad20286\n    _HOSTNAME=sqllinux.dbi-services.test\n    _CMDLINE=\/usr\/lib\/systemd\/systemd --switched-root --system --deserialize 21\n    _SELINUX_CONTEXT=system_u:system_r:init_t:s0\n    UNIT=mssql-server.service\n    MESSAGE=Stopped Microsoft SQL Server Database Engine.\n    _SOURCE_REALTIME_TIMESTAMP=1516217438937388<\/pre>\n<p>So, if you want to restrict more the output with only warning, error or critical messages (from a daemon point of view), you may have to add the <strong>-p<\/strong> option with a range of priorities from 2 (critical) and 4 (warning) as shown below:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl -p 2..4 -u mssql-server.service\n-- Logs begin at Tue 2018-01-16 15:41:15 CET, end at Wed 2018-01-17 21:44:04 CET. --\nJan 16 15:41:17 sqllinux.dbi-services.test systemd[1]: [\/usr\/lib\/systemd\/system\/mssql-server.service:21] Unknown lvalue 'TasksMax' in sect\n-- Reboot --\nJan 17 15:27:42 sqllinux.dbi-services.test systemd[1]: [\/usr\/lib\/systemd\/system\/mssql-server.service:21] Unknown lvalue 'TasksMax' in sect\nlines 1-4\/4 (END)<\/pre>\n<p>Ultimately, filtering by message will be probably the most natural way to find out log messages. Let\u2019s say in this case there is no built-in parameters or options provided by <strong><em>journalctl<\/em><\/strong> command and <strong><em>grep<\/em><\/strong> will be your friend for sure. In the following example,\u00a0a classic customer case where we\u00a0want\u00a0to count number of failed logins during a specific period. So, I will have to use a combination of <strong>journalctl<\/strong>, <strong>grep<\/strong> and <strong>wc<\/strong> commands:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl -u mssql-server.service --since \"2018-01-17 12:00:00\" --until \"2018-01-17 23:00:00\"  | grep \"Login failed\" | wc -l\n31<\/pre>\n<p>Finally, the <strong>journalctl<\/strong> command offers real-time\u00a0capabilities to follow log messages through the <strong>-f<\/strong> option.\u00a0For very specific cases\u00a0it might be useful. In the example below I can use it to\u00a0follow SQL Server related log messages:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] journalctl -u mssql-server.service -f\n-- Logs begin at Tue 2018-01-16 15:41:15 CET. --\nJan 17 21:52:57 sqllinux.dbi-services.test sqlservr[1121]: 2018-01-17 21:52:57.97 Logon       Error: 18456, Severity: 14, State: 8.\nJan 17 21:52:57 sqllinux.dbi-services.test sqlservr[1121]: 2018-01-17 21:52:57.97 Logon       Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.40.30]<\/pre>\n<p>Another topic I wanted to introduce is the centralized logging management. Nowadays, a plenty of third party tools like splunk\u00a0&#8211; or built-in Microsoft tools as SCOM &#8211; may address this need both on Windows and Linux world. I also remembered a special customer case where we went through built-in Windows <a href=\"https:\/\/blogs.technet.microsoft.com\/jepayne\/2015\/11\/23\/monitoring-what-matters-windows-event-forwarding-for-everyone-even-if-you-already-have-a-siem\/\" target=\"_blank\" rel=\"noopener noreferrer\">event forwarding<\/a> mechanism. On Linux world, you may benefit from a plenty of open source tools and\u00a0you may also rely on built-in Linux tools as <a href=\"https:\/\/www.freedesktop.org\/software\/systemd\/man\/systemd-journal-remote.html\" target=\"_blank\" rel=\"noopener noreferrer\">systemd-journal-remote<\/a>, <a href=\"https:\/\/www.freedesktop.org\/software\/systemd\/man\/systemd-journal-remote.html\" target=\"_blank\" rel=\"noopener noreferrer\">systemd-journal-upload<\/a> and <a href=\"https:\/\/www.freedesktop.org\/software\/systemd\/man\/systemd-journal-gatewayd.html\" target=\"_blank\" rel=\"noopener noreferrer\">systemd-journal-gateway<\/a> as well. I will probably go further into these tools in the future but this time let\u2019s use an older tool <a href=\"https:\/\/en.wikipedia.org\/wiki\/Rsyslog\" target=\"_blank\" rel=\"noopener noreferrer\">rsyslog<\/a>\u00a0that implements the basic <strong>syslog<\/strong> protocol and extends it with additional features. In this blog post I used a CentOS 7 distro that comes with <strong><em>rsyslog<\/em><\/strong>. The good news is that it also\u00a0includes by default the <strong><em>imjournal<\/em><\/strong> module (that provides access to the <strong><em>systemd<\/em><\/strong> journal). This module reads log from <strong><em>\/run\/log\/journal<\/em><\/strong> and then writes out <strong>\/var\/log\/messages<\/strong>, <strong>\/var\/log\/maillog<\/strong>, <strong>\/var\/log\/secure<\/strong> or others regarding the record type. Log records may be send over TCP or UDP protocols and securing capabilities are also provided (by using TLS and certificates for instance).<\/p>\n<p>Just out of curiosity, I decided to implement a very simple log message forwarding scenario to centralize only SQL Server log messages. Basically, I only had to setup some parameters in the <strong>\/etc\/rsyslog.conf<\/strong> on both sides (sender and receiver servers) as well as applying some firewall rules to allow the traffic on port 514. In addition,\u00a0I used TCP protocol because this is probably the simplest way to send log messages (because corresponding module are already loaded). Here an illustration of my scenario:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-20744 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-3-rsyslog-architecture-e1516346058216.jpg\" alt=\"blog 126 - 3 - rsyslog architecture\" width=\"400\" height=\"196\" \/><\/p>\n<p>Here the configuration settings of my log message sender. You may notice that I used expression-Based filters to\u00a0filter and to send only\u00a0my SQL Server instance related messages\u00a0:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux ~] cat \/etc\/rsyslog.conf\n#### MODULES ####\n\n# The imjournal module bellow is now used as a message source instead of imuxsock.\n$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)\n$ModLoad imjournal # provides access to the systemd journal\n#$ModLoad imklog # reads kernel messages (the same are read from journald)\n#$ModLoad immark  # provides --MARK-- message capability\n\u2026\n# remote host is: name\/ip:port, e.g. 192.168.0.1:514, port optional\n#*.* @@remote-host:514\nif $programname == 'sqlservr' then @@192.168.40.21:514 \n\u2026<\/pre>\n<p>On the receiver side\u00a0I configured <strong>rsyslog<\/strong> daemon to accept messages that come from TCP protocol\u00a0and port 514. Here a sample (only the interesting part)\u00a0of the configuration file:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux2 ~] cat \/etc\/rsyslog.conf\n\u2026\n# Provides TCP syslog reception\n$ModLoad imtcp\n$InputTCPServerRun 514\n<\/pre>\n<p>Finally, I ran a simple test to check if the log message forwarding process works correctly by using the following T-SQL command from my SQLLINUX instance &#8230;<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">RAISERROR('test syslog from SQLLINUX instance', 10, 1) WITH LOG\n<\/pre>\n<p>&#8230; and after jumping to the receiver side (SQLLINUX2) I used the <strong>tail<\/strong> command to check if my message was sent correctly:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@sqllinux2 ~] tail -f \/var\/log\/messages\n\u2026\nJan 18 21:50:40 sqllinux sqlservr: 2018-01-18 21:50:40.66 spid57      test syslog\nJan 18 21:51:03 sqllinux sqlservr: 2018-01-18 21:51:03.75 spid57      test syslog 1 2 3\nJan 18 21:52:08 sqllinux sqlservr: 2018-01-18 21:52:08.74 spid52      Using 'dbghelp.dll' version '4.0.5'\nJan 18 21:56:31 sqllinux sqlservr: 2018-01-18 21:56:31.13 spid57      test syslog from SQLLINUX instance\n<\/pre>\n<p>Well done!<br \/>\nIn this blog post we&#8217;ve surfaced how SQL Server deals with Linux logging system and how we may use the <strong>journalctl<\/strong> command to find out information for troubleshooting. Moving from Windows to Linux in this field remains straightforward with finally the same basics. Obviously, Linux is a command-line oriented operating system so you will not escape to use them \ud83d\ude42<\/p>\n<p><span style=\"float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none;\">By David Barbarin<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Windows world, SQL Server logs information both into the SQL Server error log and the Application log. Both automatically timestamp all recorded events. Unlike the SQL Server error log, the Windows application log provides an overall picture of events that occur globally on the Windows operating system. Thus,\u00a0regarding the encountered\u00a0issues taking a look at [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":10783,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[1271,73,1272,51,1273,1241],"type_dbi":[],"class_list":["post-10782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","tag-journalctl","tag-linux","tag-rsyslog","tag-sql-server","tag-syslog","tag-systemd"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server on Linux and logging<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server on Linux and logging\" \/>\n<meta property=\"og:description\" content=\"On Windows world, SQL Server logs information both into the SQL Server error log and the Application log. Both automatically timestamp all recorded events. Unlike the SQL Server error log, the Windows application log provides an overall picture of events that occur globally on the Windows operating system. Thus,\u00a0regarding the encountered\u00a0issues taking a look at [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-19T06:39:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-17T15:01:59+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"229\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Microsoft Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/\"},\"author\":{\"name\":\"Microsoft Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"headline\":\"SQL Server on Linux and logging\",\"datePublished\":\"2018-01-19T06:39:15+00:00\",\"dateModified\":\"2023-07-17T15:01:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/\"},\"wordCount\":1406,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg\",\"keywords\":[\"journalctl\",\"Linux\",\"rsyslog\",\"SQL Server\",\"syslog\",\"systemd\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/\",\"name\":\"SQL Server on Linux and logging\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg\",\"datePublished\":\"2018-01-19T06:39:15+00:00\",\"dateModified\":\"2023-07-17T15:01:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg\",\"width\":800,\"height\":229},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server on Linux and logging\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\",\"name\":\"Microsoft Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"caption\":\"Microsoft Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server on Linux and logging","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server on Linux and logging","og_description":"On Windows world, SQL Server logs information both into the SQL Server error log and the Application log. Both automatically timestamp all recorded events. Unlike the SQL Server error log, the Windows application log provides an overall picture of events that occur globally on the Windows operating system. Thus,\u00a0regarding the encountered\u00a0issues taking a look at [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/","og_site_name":"dbi Blog","article_published_time":"2018-01-19T06:39:15+00:00","article_modified_time":"2023-07-17T15:01:59+00:00","og_image":[{"width":800,"height":229,"url":"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg","type":"image\/jpeg"}],"author":"Microsoft Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Microsoft Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/"},"author":{"name":"Microsoft Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"headline":"SQL Server on Linux and logging","datePublished":"2018-01-19T06:39:15+00:00","dateModified":"2023-07-17T15:01:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/"},"wordCount":1406,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg","keywords":["journalctl","Linux","rsyslog","SQL Server","syslog","systemd"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/","name":"SQL Server on Linux and logging","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg","datePublished":"2018-01-19T06:39:15+00:00","dateModified":"2023-07-17T15:01:59+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-126-1-journalctl-with-time-interval-filter-e1516343154792.jpg","width":800,"height":229},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-on-linux-and-logging\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server on Linux and logging"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4","name":"Microsoft Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","caption":"Microsoft Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=10782"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10782\/revisions"}],"predecessor-version":[{"id":26789,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10782\/revisions\/26789"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/10783"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=10782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=10782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=10782"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=10782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}