Open pbunluesin opened 7 years ago
I found this error when I added full-text search to my container.
How did you add the full-text feature to your container? I am using image "microsoft/mssql-server-windows-developer" and this feature is not installed out of the box. I am struggling now on how I can add this feature for an existing instance. I know via GUI this can be done. There might be also some ways to install a new instance from command line whith specific options. But I don't know a way to add features from command line to an existing instance (installation).
You would need to use the published Dockerfile and change the command line parameters to include the features you want and then build your own image. Dockerfile: https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows-developer/dockerfile Command line parameters (look for FEATURES parameter): https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Feature
@twright-msft I managed to successfully change the command line parameters to include FullText for the Developer version. However, this does not work for the SQL Server Express version. Example Docker file: https://github.com/robinho81/mssql-server-windows-express-fts
Any reason why this is? I had assumed that SQL Server Express supported Full Text search...
Glad to hear that you got FTS working in the Developer Edition. Sorry, Express Edition doesnt have FTS in it. https://docs.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2017
If anyone else ends up here, adding FTS to SQL Server on Linux seems a little easier as there's no need to edit and rebuild the Dockerfile
as you can base your work on microsoft/mssql-server-linux
. These are the key bits for installing FTS (taken from here):
apt install -y curl
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
apt update
apt install -y mssql-server-fts
I guess you can do the same and modify the previous installation on Windows with the downloaded SQL.exe
.
If you are trying to do this on Linux please use the full dockerfile example here: https://github.com/Microsoft/mssql-docker/blob/master/linux/preview/examples/mssql-agent-fts-ha-tools/Dockerfile
Express Edition doesnt have FTS in it
is this new for 2017? i'm pretty sure previous releases of express had fts.
EDIT: yeah, the above quote from the Microsoft SQL Server program manager is clearly wrong: SQL Server with Advanced Services does include FTS.
@twright-msft Would it be possible to tweak your Dockerfile with FTS to use SQL Server 2014 instead of 2017? I'm not sure what I should change!
EDIT : Oh well... If I understand properly, only >= 2017 is supported...
@electrotype - the Dockerfile you pointed to is only for SQL Server on Linux. SQL Server on Linux was first released in SQL Server 2017.
You could try to tweak this Dockerfile and get FTS running on Windows containers. https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows/dockerfile
You would need to change the URL for the .box and .exe in the ENV variables at the top of the Dockerfile to point to the SQL Server 2014 versions of those files.
I've revised the steps I posted above:
apt-get update
apt-get install --yes curl apt-transport-https
curl --fail --silent --show-error --location https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /usr/share/keyrings/microsoft-archive-keyring.gpg > /dev/null
curl --fail --silent --show-error --location https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | sed "s@arch=amd64@arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg@" | tee /etc/apt/sources.list.d/mssql-server.list > /dev/null
apt-get update
apt-get install --yes mssql-server-fts
The difference between this and the mssql-agent-fts-ha-tools
example is that as per Debian's guidelines, the third-party key is not loaded via apt-key add
.
Regarding the Linux image: Since Microsoft has changed how the Docker images are build, installing mssql-server-fts
does not work anymore (it'll warn about missing dependency of mssql-server
). However, you can just extract the .deb
and it should work:
wget https://packages.microsoft.com/ubuntu/16.04/mssql-server-preview/pool/main/m/mssql-server-fts/mssql-server-fts_15.0.1500.28-1_amd64.deb
dpkg --extract mssql-server-fts_15.0.1500.28-1_amd64.deb /
And then docker restart
the container.
root@c5b9f4b5b88c:/# /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P pa -Q "SELECT FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')"
-----------
1
(1 rows affected)
I've just added the full text search feature to the docker file install step, but then I had to follow these instructions: https://social.technet.microsoft.com/wiki/contents/articles/31786.sql-server-not-starting-after-fresh-installation.aspx
I created a fork a while ago. Maybe this helps you: https://github.com/pulla2908/docker-mssql-server-windows-developer-fti
@pulla2908, it is interesting that you don't add the additional steps noted by the article. I wonder if it has to do with your use of server 2019 instead of 2016.
@JesseKPhillips I immediately moved to 2019 because I wanted to have the latest version. Then I modified the setup to get full text index feature. Maybe this issue is connected to the windows server version but I have no further information about this.
I am having the same problem with RHEL 7 and SQL Server 2019. fts is installed yet SQL Server doesn't recognize it:
Full-Text Search is not installed, or a full-text component cannot be loaded.
1> select @@version 2> go
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)
Sep 24 2019 13:48:23
Copyright (C) 2019 Microsoft Corporation
Developer Edition (64-bit) on Linux (Red Hat Enterprise Linux Server 7.6 (Maipo))
(1 rows affected) 1>
@skinfrakkijm To check if FTS is installed execute:
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) print 'INSTALLED' else print 'NOT INSTALLED'
go
SQL version:~
Trying to deploy a WINDOWS based 2019 SQL Express docker container with FTS. https://github.com/raviumishra/windows-sql2019-express-fts/blob/main/Dockerfile
Post-installation:~
@raviumishra don't know why it is not working for you but in case SQL Server 2017 is also an option for you then you can use my docker definition which you can find here.
@pulla2908 Need to use SQL 2019 Is there a docker image available that configures: Express Edition with 'Advanced Services' . To use FTS we need to have 'Express Edition with Advanced Services' SELECT SERVERPROPERTY('Edition') shud return 'Express Edition with Advanced Services' instead of
@raviumishra About express edition I have no idea.
A while ago I was searching for box and env download URLs in order to move from SQL Server 2017 (Developer) to 2019 but I did not find them. If something can tell me how to get these URLs then I could update my docker definition. @raviumishra for you I don't know if e.g. Developer Edition is an option at all. However, I struggle with getting the URLs.
Here is my solution with docker compose and sql 2019 express. I'm using the official image from ms (mcr.microsoft.com/mssql/server:2019-latest) and install mssql-server-fts by the Dockerfile. Works perfectly.
docker-compose.yml: 'version: "3.3" services: mssql: container_name: mssql build: . # Dockerfile restart: always ports:
volumes: data:
networks: default: external: name: jobportal_network'
Dockerfile: ';# Source: https://hub.docker.com/r/johnfarnea/mssql-server-linux-fts ;# 20220408 modified by Christof Wiegand
FROM mcr.microsoft.com/mssql/server:2019-latest
USER root
;# Install curl since it is needed to get repo config ;# install gnupg2 (not installed in the image) ;# see also workaround curl with | tac | tac | : https://syntaxfix.com/question/16804/why-does-curl-return-error-23-failed-writing-body
RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get update --fix-missing && \ apt-get install -y gnupg2 && \ apt-get install -yq curl apt-transport-https && \ curl https://packages.microsoft.com/keys/microsoft.asc | tac | tac | apt-key add - && \ curl https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list | tac | tac | tee /etc/apt/sources.list.d/mssql-server.list && \ apt-get update
;# Install optional packages. Comment out the ones you don't need ;# RUN apt-get install -y mssql-server-agent ;# RUN apt-get install -y mssql-server-ha RUN apt-get install -y mssql-server-fts
;# Run SQL Server process CMD /opt/mssql/bin/sqlservr'
i cant believe this issue is 7 years old... 🤦
@haras-unicorn see my post
i dont care about random forks theres a bunch of those already on docker hub - id rather have my own dockerfile why cant we just have an official image with fts? like there are images with timescale for postgres
Hey Guy, I found this error when I added full-text search to my container. How can I solve it ??
Thank you in advance.