- #Is it possible to run microsoft sql server on mac install
- #Is it possible to run microsoft sql server on mac windows
Status_of_proc "$daemon_NAME" "$DAEMON" "system-wide $daemon_NAME" & exit 0 || exit $?Įcho "Usage: /etc/init.d/$daemon_NAME " Start-stop-daemon -name $daemon_NAME -stop -retry 5 -quiet -name $daemon_NAME -oknodo Log_daemon_msg "Stopping system $daemon_NAME Daemon" Start-stop-daemon -background -name $daemon_NAME -start -quiet -chuid $DAEMONUSER -exec $DAEMON -umask 007 - $DAEMON_OPTS -oknodo Log_daemon_msg "Starting system $daemon_NAME Daemon" Log_failure_msg "$DAEMON not present or not executable" # Short-Description: Manages SQL Server instance on LinuxĮxport PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/var/opt/mssql
The script file is located to /etc/init.d and named mssql-server. LSB provides default set of functions which is in /lib/lsb/init-functions and we can make use of those functions in our Init scripts. –Ět least start, stop, restart, force-reload, and status But thinking about it … we are still using the famous init daemon (PID1) on WSL2 and it works for regular services.Ī good alternative could be to rely on init scripts and start-stop-daemon wrapped into LSB-compliant init scripts with: At this stage, I would say you can use your new fresh installed SQL Server instance, but it requires to manually start / stop it because there are no systemctl commands to handle it. Well, we found a reasonable explanation of the previous error message at least. My suspicion was those files content references of systemctl commands and yes, there were in preinst/prerm/postins/prerm files: rw-r-r- 1 root root 74 Jun 16 20:01 /var/lib/dpkg/info/iggers rw-r-r- 1 root root 305 Jun 16 20:00 /var/lib/dpkg/info/mssql-server.templates rw-r-r- 1 root root 72 Jun 16 20:01 /var/lib/dpkg/info/mssql-server.shlibs rwxr-xr-x 1 root root 365 Jun 16 20:01 /var/lib/dpkg/info/mssql-server.prerm rwxr-xr-x 1 root root 1353 Jun 16 20:01 /var/lib/dpkg/info/mssql-server.preinst rwxr-xr-x 1 root root 289 Jun 16 20:01 /var/lib/dpkg/info/mssql-server.postrm rwxr-xr-x 1 root root 1436 Jun 16 20:01 /var/lib/dpkg/info/mssql-server.postinst rw-r-r- 1 root root 8579 Jul 26 00:31 /var/lib/dpkg/info/mssql-server.list rwxr-xr-x 1 root root 108 Jun 16 20:01 /var/lib/dpkg/info/nfig $ sudo ls -l /var/lib/dpkg/info/mssql-server* But let’s dig further on the installation process … Referring to how a deb package is made, there exist preinst, postinst, prerm, postrm scripts for mssqlserver deb package located in /var/lib/dpkg/info/:
In fact, if you think about it, this message is expected because systemd is not running on WSL2 and the configuration process attempts to initialize the mssql-server service based on systemd. The installation was done correctly but after running the setup, an error message raised quickly in the last step related to service initialization: I did my test with the Ubuntu-18.04 distro in WSL v2.įirst step consisted in installing SQL Server in an usual way as per the Microsoft BOL. But before starting my holidays in August, it was something very fun and a good reminder of some Linux concepts …
#Is it possible to run microsoft sql server on mac install
Having interesting discussions with some of my colleagues, we wanted to know if we were able to install directly SQL Server on WSL2 and the good news is we finally managed to do it but at the cost of some (dirty) tricks required to make SQL Server starting / stopping correctly.īefore continuing, let’s precise we did it in a pure experimental and academic way and this is definitely not supported by Microsoft. The option seems to be available for a few months as shown below:īut this is not the main topic of this blog post.
#Is it possible to run microsoft sql server on mac windows
The interesting point is that some people prefer to use Docker directly on WSL2 whereas other ones prefer to use Docker Desktop for Windows with the integration of WSL2 based engine. Podman may be also an alternative but it seems to remain an experimental stuff so far. If you intend to use directly SQL Server on WSL2, you need to read this carefully, because installation and management relies precisely on systemd!įirst, let’s say if you want to run SQL Server on WSL2 in a supported way, docker containers remain probably the better fit.
Indeed, although it does exist in the file system, systemd is not running. For whom already installed it on Windows 10, version 2004, you are already aware it doesn’t come with the support of systemd. This is a blog post I intended to write sometime ago … about using SQL Server on Linux on WSL2. Choisissez la catégorie, puis la rubrique :