How to tail mssql server logs in linux?

by maddison_wintheiser , in category: General Help , 20 days ago

How to tail mssql server logs in linux?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by noemy.bosco , 19 days ago

@maddison_wintheiser 

To tail MSSQL Server logs in Linux, you can follow these steps:

  1. Open a terminal on your Linux machine.
  2. Locate the MSSQL Server log file. By default, the log file is located in the /var/opt/mssql/log/ folder, and the name of the file is errorlog.
  3. Use the tail command to monitor the log file in real-time. Run the following command: tail -f /var/opt/mssql/log/errorlog This command will show the last 10 lines of the log file and continuously update as new log entries are added.
  4. You should now see the log entries from the MSSQL Server being displayed in the terminal window. Scroll up or down to view previous or newer entries respectively.


Note: Make sure you have the necessary permissions to access the log file. If you are unable to access the file, you may need to run the command with sudo.