Saturday, June 10, 2017

SQL Server 2017 Installation on Linux steps


SQL Server 2017  Installation on Linux and follow below steps

SQL download and install
*************************
$ curl https://packages.microsoft.com/config/rhel/7/mssql-server.repo > /etc/yum.repos.d/mssql-server.repo

sudo yum install -y mssql-server
sudo /opt/mssql/bin/mssql-conf setup

$ sudo systemctl enable mssql-server
$ sudo systemctl start mssql-server


$ sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
$ sudo firewall-cmd --reload

$ rpm -qa | grep mssql


--Use the following command to view the status of the SQL Server service.
$ sudo systemctl status mssql-server -l


*******************************
SQLCMD/BCP install

$ sudo su
# curl https://packages.microsoft.com/config/rhel/7/prod.repo >
/etc/yum.repos.d/prod.repo
# exit

$ sudo yum -y install mssql-tools

*************************
sqlcmd Connection

$export PATH=$PATH:/opt/microsoft/bin
$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/microsoft/lib64
$/opt/mssql-tools/bin/sqlcmd -H -U -P