I don't mean to give a blow-by-blow of my testing, but working out these issues might help others.
I was able to use /opt/mssql-tools/bin/sqlcmd to do command-line queries, but first I had to download and install linuxODBC from SlackBuilds. That gave me the error:
Code:
# /opt/mssql-tools/bin/sqlcmd -U sa -P password -Q "select name from sys.databases"
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Can't open lib 'ODBC Driver 13 for SQL Server' : file not found.
https://stackoverflow.com/questions/...-linking-issue had the answer to that:
Code:
# odbcinst -j
unixODBC 2.3.4
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
# find / -mount -name odbcinst.ini -exec ls -l {} \;
-rw-r--r-- 1 root root 147 Jan 3 2018 /opt/microsoft/msodbcsql/etc/odbcinst.ini
-rw-r--r-- 1 root root 0 Aug 25 16:25 /etc/odbcinst.ini
# rm /etc/odbcinst.ini /etc/odbc.ini
# ln -s /opt/microsoft/msodbcsql/etc/odbcinst.ini /etc/odbcinst.ini
That was the only symlink I needed, no odbc.ini was created in the /opt/microsoft directory. I could then run:
Code:
# /opt/mssql-tools/bin/sqlcmd -U sa -P password -Q "select name from sys.databases" # get a list of databases
name
-------------------------------------
master
tempdb
model
msdb
# /opt/mssql-tools/bin/sqlcmd -U sa -P password -Q "use master; SELECT table_name FROM Information_schema.tables" # get list of tables
Changed database context to 'master'.
table_name
-----------------------------------------
spt_fallback_db
spt_fallback_dev
spt_fallback_usg
spt_values
spt_monitor
MSreplication_options
And of course I can do queries on individual tables.
Still not able to connect via SQL Operations Studio in KDE, but I suppose that's another issue entirely. As to my OP on getting SQL Server running with Slackware, I think I've got it! Again, thanks to Sławomir Dworaczek for doing the work on getting SQL Server to Slackware and to Didier Spaier for finding Sławomir's website.