/opt/mssql/bin/sqlservr: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /opt/mssql/bin/sqlservr) /opt/mssql/bin/sqlservr: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /opt/mssql/bin/../lib/libc++abi.so.1) Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
[root@server01 ~]# /opt/mssql/bin/mssql-conf setup Choose an edition of SQL Server: 1) Evaluation (free, no production use rights, 180-day limit) 2) Developer (free, no production use rights) 3) Express (free) 4) Web (PAID) 5) Standard (PAID) 6) Enterprise (PAID) 7) Enterprise Core (PAID) 8) I bought a license through a retail sales channel and have a product key to enter.
Details about editions can be found at https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x409
Use of PAID editions of this software requires separate licensing through a Microsoft Volume Licensing program. By choosing a PAID edition, you are verifying that you have the appropriate number of licenses in place to install and run this software.
Enter your edition(1-8): 2 The license terms for this product can be found in /usr/share/doc/mssql-server or downloaded from: https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x409
The privacy statement can be viewed at: https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409
Enter the SQL Server system administrator password: Confirm the SQL Server system administrator password: Configuring SQL Server...
ForceFlush is enabled for this instance. ForceFlush feature is enabled forlog durability. Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service. Setup has completed successfully. SQL Server is now starting.
[root@server01~]# sqlcmd -S 127.0.0.1-U sa -P 123456 [root@server01~]# sqlcmd -s localhost -U SA -p Password: 1>select name from sys.databases 2> go
name -------------------------------------------------------------------------------------------------------------------------------- master tempdb model msdb testdb
(5rows affected)
4>select name from sysdatabases 5> go name -------------------------------------------------------------------------------------------------------------------------------- master tempdb model msdb testdb
(5rows affected)
7> use testdb 8> go Changed database context to'testdb'.
十一、sqlcmd命令
1 2 3 4 5 6 7 8 9 10 11 12
(1)查看数据库列表 select name from sys.databases select name from sysdatabases
(2)查看当前数据库表 select name from sysobjects where xtype='u'
(2)查看数据库下面所有的表 select TABLE_NAME FROM INFORMATION_SCHEMA.TABLES Where TABLE_TYPE='BASE TABLE' (3)查看表的数据 select top 10*from HXXXile