本文主要是介绍MSSQL Server 2017 for Linux 安装测试,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
MSSQL Server 2017 for Linux 安装测试
安装
#sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
#sudo yum install -y mssql-server
#sudo /opt/mssql/bin/mssql-conf setup
#systemctl status mssql-server
#sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
#sudo firewall-cmd --reload
#sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
#sudo yum remove unixODBC-utf16 unixODBC-utf16-devel
#sudo yum install -y mssql-tools unixODBC-devel
#echo ‘export PATH=“KaTeX parse error: Expected 'EOF', got '#' at position 48: …/.bash_profile #̲echo 'export PA…PATH:/opt/mssql-tools/bin”’ >> ~/.bashrc
#source ~/.bashrc
#source ~/.bash_profile
测试
#sqlcmd -S 127.0.0.1 -U SA -P ‘ABCDabcd123@#¥’
CREATE DATABASE TestDB
GO
SELECT Name from sys.Databases
GO
USE TestDB
GO
CREATE TABLE Inventory (id INT, name NVARCHAR(50), quantity INT)
GO
INSERT INTO Inventory VALUES (1, ‘banana’, 150); INSERT INTO Inventory VALUES (2, ‘orange’, 154);
GO
SELECT * FROM Inventory WHERE quantity > 152;
GO
QUIT
这篇关于MSSQL Server 2017 for Linux 安装测试的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!