1. MSSQL is inactive dead state

problem: when starting mssql services or checking status,active -inactive (dead)  will shown in mssql

 

Solution:


You need configure 

sudo /opt/mssql/bin/mssql-conf setup
sudo /opt/mssql/bin/mssql-conf setup
    The license terms for this product can be downloaded from
    and found in /usr/share/doc/mssql-server/LICENSE.TXT.
    Do you accept the license terms? [Yes/No]:yes
      Setting up Microsoft SQL Server
    Enter the new SQL Server system administrator password--Enter strong password
    Confirm the new SQL Server system administrator password: --Enter strong password
     starting Microsoft SQL Server...
     Enabling Microsoft SQL Server to run at boot...
    Setup completed successfully.
after completion configuration we are able to see services are running state.

2. sqlcmd: command not found

problem:  

After mssql installation we trying access suing sqlcmd we getting following error.

-bash :sqlcmd command not found

Solution

you need check odbc drive installed and create symlink for sqldcmd.

curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
sudo yum remove mssql-tools unixODBC-utf16-devel

--modify your PATH in the ~/.bash_profile file 
sudo yum install mssql-tools unixODBC-devel
sudo yum check-update
sudo yum update mssql-tools
--modify your PATH in the ~/.bash_profile file 
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
---modify the PATH in the ~/.bashrc file 
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

sudo ls /opt/mssql-tools/bin/sqlcmd*

After you get the name of the tool you can create a symlink:

sudo ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd

3. Unable status sql services with normal user

Problem :Authentication is required to start 'mssql-server.service'

We have created new user

adduser sqlreader

We have set password by following command

passwd sqlreader




solution:

we have log using root user  and check status of sql services.
 su - root

We have check sql services status by root user.

systemctl status mssql-server

4. mssql is not starting below 2 GB ram

For this we are testing set 1 GB ram to server.



After increasing memory 3 Gb .We have started mssql services and sql services is started.


 

 Note
MSSQL require minimum 2 GB ram.



Suggested reading: