Sunday, April 2, 2023
spot_img
HomeTips & TricksTop 10 Linux Commands for SQL Server DBA’s

Top 10 Linux Commands for SQL Server DBA’s

-

Using SQL Server on Linux machines has gained enough acceptance from the dev community compared to the usage of SQL Server on Windows machines. In order to access important information about the performance or process utilization, one can use Task Manager within a Windows machine. All of the information is made available in the form of a GUI where accessing the information is made easy. 

Accessing information on a Linux machine is different from that of a windows machine, so in this article, we will concentrate on the top 10 Linux commands which are frequently used by DBA’s, and these commands are also covered in the SQL server DBA training and Linux training programs

All of the information is obtained by executing these commands via a command-line prompt. 

Here are the Top 10 Linux Commands for SQL Server DBA’s

man :

Man command stands for Manual. 

As the name suggests, it is a manual where all the required information is well documented. To access the information one has to use this command – “man command_name”.

Example for this command:

$ man print f

Vi:

Vi is not a command, it is a tool or application that can be used to get the required information. This tool is available and can be useful to obtain relevant information. However, a learning curve is essential to master this tool and its usage. It is designed to be used via a command-line prompt.

Ssh:

Ssh stands for Secure Shell 

The ssh command is generally used to establish a secure remote connection between two Linux machines. The use of ssh commands plays an important role as it encrypts the traffic between the two systems and makes it more secure.

Syntax for this command :

Ssh user_name@host (IP/Domain_name)

Cat:

Cat stands for Concatenate. 

Using the “Cat”command, various text files can be connected and sent across as an input file. This command is really useful to aggregate data for various sources. However, viewing the information using this command is tricky as all of the information is displayed at once and looks clumsy and difficult to read. 

Syntax for this command :

$cat filename

Example for this command:

To view multiple files – $ cat file1 file 2

To view a single file – $ cat file1

Tail:

Using this command, the entire file is not scanned and explicitly looks at the end of the file. 

This is used to monitor the files where the data is written. 

Syntax for this command:

Tail [Option] [file]

Example for Tail Command:

Using the below syntax, all the country-related information will be displayed from the different files that are available within the repository.

$ tail country.text]

Resource Utilization:

As the name suggests, “Resource Utilization” is useful to understand the processing power that is in use vs available. This can be looked into by using the command “Ps”.

The use of the “Ps” command displays information about the users and the system processes that are currently in the execution model.

Here is the list of attributes/information that is displayed with the use of this command. These are the default values.

  • CPU Usage percentage
  • Memory usage percentage
  • Process ID
  • The process initiated by the user

Based on the options that are selected more information can be displayed. 

With the help of this information, one can determine whether the job/process that is running is taking its optimal time or exceeding its limits. 

Top:

The “Top” command is generally used for monitoring real-time information. This works in the same lines as the “Ps” command but “Top” has more capabilities to show information. 

There are various sub commands that can be executed with the use of the top command. 

The syntax for this command:

Top

Example for this command:

Top -u process

Once this command is executed one can see the user-specific processes are displayed.

Mpstat:

“Mpstat” is used to check the output of each and every processor. It is a very useful tool that has a lot of options to generate reports, one of such default reports is a “simple utilization report”.

The information displayed within these reports is usually enough to understand the utilization of different processes.

Df :

Df stands for Disk File system.

This command is used to check the disk space that is currently in use and helps to understand how space is distributed across. 

Syntax for Df:

df [Option] [file]

Example for Df:

Df -h

Provides all the information in human-readable format

grep

The “grep” command is really useful to filter our specific information from the entire dataset. It is classified as a filter command which helps to filter out information according to the patterns. Using this command, the data will be filtered out based on the similar patterns that are available within the datasets. 

Syntax for this command :

greg [options] files [patterns]

Example for this command:

Greg ‘word filename 

Du:

Du stands for Disk usage.

Using this command, one can understand the amount of space that a file or a directory is occupying within a drive. This is a standard command that is in use within Linux and Unix environments. 

Example of a Du command :

du/ home/ John/ text

Ifconfig:

Ifconfig stands for Interface configuration.

This command is mainly used for configuration purposes. Usually, the configuration happens at the boot time and interfaces are set up accordingly. These interfaces are widely used at the time of debugging or while tuning the system. 

This is widely used to check if there are any network issues.

Syntax for Ifconfig is as follows:

Ifconfig [… Options] [Interfaces]

These are a few commands that are widely used by DBA’s to monitor/evaluate/observe information from time to time. There are a lot of possibilities that are available to venture out but it purely depends upon the necessity.

Author Bio:

I’m Srija Kalavala, a fascinated Technical Content writer currently working at Mindmajix. Interested to know about technology updates. I Can write an article on the following technologies: Database Management, Cloud Computing, Business Intelligence and Analytics, Cyber Security and SIEM Tools, etc. Get connected with me on Linkedin.

TechRecur

We don’t spam! Read our privacy policy for more info.

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!

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

- Place Your AD Here -spot_img
- Place Your AD Here -spot_img