I want to install mssql with 2008/2012.Please suggest proper doc or steps to install.I have try to instaall from https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ubuntu but it give me follwoing error -
/opt/mssql/bin/sqlservr: /usr/lib/x86_64-linux-gnu/libsss_nss_idmap.so.0: no version information available (required by /opt/mssql/bin/sqlservr)
Starting Microsoft SQL Server...
sudo: systemctl: command not found
Error starting Microsoft SQL Server.
while run command -
sudo /opt/mssql/bin/mssql-conf setup
you can't install mssql in ubuntu 14.04..Docs clearly state supported versions
SQL Server vNext CTP 2.0 is supported on the following platforms:
Just to add ,I thought installing docker would support versions less than 16,but from docker file we could see below
Base OS layer: Latest Ubuntu LTS.
FROM ubuntu:16.04
which means it needs ubuntu:16.04 versions to be present
For a workaround, you can use run a Docker container (microsoft/mssql-server-linux), e.g.
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrongPassword!" -p 1433:1433 microsoft/mssql-server-linux
Then connect to localhost:1433 with your SQL client.
It is not possible to instal sql server 2008 or 2012 on any non window platform.
This feature came with 2016 or 2017.
https://www.microsoft.com/en-us/sql-server/sql-server-2017
You can't because You must have 16.04+ Ubuntu version to install MSSQL according to documentation.
Related
I am using macOS Monterey with Apple M1 chipset and trying to install MS SQL via Docker while following this article: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash
once I am trying to run the server then getting this issue
â–¶ docker run -d --name example_sql_server -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=test#123' -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
fcb5825617f24ab22a9e7c7b4707f7084ab3945e541c2c12a2e03285fa2baaae
While going through Microsoft mcr documentation then I am not able to find any 'linux/arm64/v8' compatible version, can someone please help me here to install SQL server on my machine.
I have a new M1 pro macbook and I'm trying to install pyodbc and relevant drivers on my machine.
So far I have installed unixodbc via homebrew and ODBC drivers according to the instructions found here: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos?view=sql-server-ver15https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos?view=sql-server-ver15
I then pip installed pyodbc but when I try to run pyodbc.connect() within a test script, python just aborts with the following message, regardless which connection string I use:
[1] 2086 abort python test.py
After investigating a bit more I find that pyodbc doesn't have any drivers. When I run pyodbc.drivers() I get an empty list. So it seems like pyodbc cannot find the drivers I installed earlier.
Here is the output when I run odbcinst -j:
unixODBC 2.3.9
DRIVERS............: /opt/homebrew/etc/odbcinst.ini
SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.ini
FILE DATA SOURCES..: /opt/homebrew/etc/ODBCDataSources
USER DATA SOURCES..: /Users/kdot/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
and the odbcinst.ini file contains:
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/homebrew/lib/libmsodbcsql.17.dylib
UsageCount=3
I've also tried to explicitly give the driver file path to pyodbc in the connection string but then pyodbc.connect() just hangs instead of aborting right away.
I am running all of this within a virtual environment with the following versions:
python: 3.8.10
pyodbc: 4.0.32
Does anyone know how to make pyodbc see and use the relevant drivers?
First, install the ODBC driver as instructed by Microsoft here.
Further, Microsoft recommends creating symbolic links as follows:
sudo ln -s /usr/local/etc/odbcinst.ini /etc/odbcinst.ini
sudo ln -s /usr/local/etc/odbc.ini /etc/odbc.ini
However, the location of those files on M1 macs might be different, depending on the the default homebrew directory. In my case, the following paths worked:
sudo ln -s /opt/homebrew/etc/odbcinst.ini /etc/odbcinst.ini
sudo ln -s /opt/homebrew/etc/odbc.ini /etc/odbc.ini
This is what worked for me on a m2 macbook (from the official ms documentation).
Make sure you have homebrew installed.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
HOMEBREW_ACCEPT_EULA=Y brew install msodbcsql17 mssql-tools
sudo ln -s /opt/homebrew/etc/odbcinst.ini /etc/odbcinst.ini
sudo ln -s /opt/homebrew/etc/odbc.ini /etc/odbc.ini
The problem here is that "several critical CLI tools like nvm and brew do not have native versions built for the new M1 architecture." Source.
Luckily Apple Silicon comes with a translation layer named Rosetta 2, which is basically a CLI interface through which you have to install tools like brew in order for them to install correctly.
In this Medium post you can read how to use Rosetta 2. We got pyodbc working by installing Python 3.9, pip, wheel, openssl, unixodbc, freetds, the correct drivers and finally pyodbc (in this order) all with Rosetta 2.
Found the following link helpful to install pyodbc on MacBook M1 Chip.
We happen to get sql.h file missing error and if we try to install the wheel directly from the site it throws platform not supported error.
Follow the below document and then add the export commands into your zrc or bash file and you should be good to go.
https://whodeenie.medium.com/installing-pyodbc-and-unixodbc-for-apple-silicon-8e238ed7f216
Need more reading about the bug and how people tried to learn it.
https://github.com/mkleehammer/pyodbc/issues/846
I still had this issue with the default Homebrew & ODBC installations on macOS Ventura with a 2022 MacBook Pro.
The only thing that worked was to completely uninstall Homebrew and the ODBC drivers and then reinstall both with the prefix arch -x86_64.
$ arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ arch -x86_64 brew install msodbcsql18 mssql-tools18
For a college course I'm required to install Oracle Database, I may use any version from 11 to 18 but I need the enterprise edition. I managed to install 18c XE on a Fedora virtual machine following this guide, but I have not found an installation guide for an enterprise edition.
Database Installation Guide for Linux
download the distribution
copy it to your virtual machine
install following the instructions
See also:
Oracle Database Software Downloads
Pre-Built Developer VMs
Oracle Enterprise Edition is not certified for Fedora, so it was not tested on it, that's why it would be much easier to use Pre-Built Developer VMs as already mentioned in the previous answer or use Docker images, for example ready pre-built Oracle EE 12.2:
https://hub.docker.com/_/oracle-database-enterprise-edition
(in this case you just need installed docker and start it using docker run like this:
$ docker login
$ docker pull store/oracle/database-enterprise:12.2.0.1
$ docker run -d --network="bridge" -p 1521:1521 -p 5500:5500 -it --name Oracle_DB_Container store/oracle/database-enterprise:12.2.0.1
or built it yourself from
https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance
The environment is a single machine trying to connect to SQL Server 2019 in a Docker image (mcr.microsoft.com/mssql/server:2019-latest). The first time I tried this was with this tutorial:
tomssl and the connection using SSMS worked. But I need SQL Server 2019, so I tried the 2019-latest image, and the connection closed issue is now permanent.
If I remove the port number then the password error appears.
The docker image:
docker pull mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04
The run command from docker:
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Simp$on9432' -p 1405:1433 --name sql19-25 -v D:\Docker:/sql -d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04 sleep infinity
The sleep infinity was added to keep the image running.
I have tried to do the 2017 version again, but the same error appears.
The command was run in PowerShell 7.1.0.
OS Name Microsoft Windows 10 Pro, version 10.0.19042 Build 19042
Docker version 20.10.0, build 7287ab3
WSL 2 installed
Storage Driver: overlay2
Through SSMS (v18.8), I can connect to SQLEXPRESS. Also I have tried stopping the SQLEXPRESS, but still get the same error message.
Suggestions?
I install docker container on mac(OS X) and install Microsoft SQL 2017 image file on docker.So, I try to connect docker with Azure Data Studio but didn't connect it. Can I connect docker with Azure Data Studio and How to configure it? Please help me, thank a lot.
Use 127.0.0.1,1433 instead of 127.0.0.1:1433
This syntax is what my ASP.NET Core app uses as syntax so I figured MS liked that format for connection strings and such.
This worked for me. Hope it helps.
I was able to run SQL server on MAC using Docker by running it along with the Azure Data Studio.
In order to connect to a server, you need to go to preferences of your Docker settings and increase the Memory allocation from the default of 2GB to minimum 4GB (as SQL server needs min 3.25GB space). Save and restart the docker.
Once restarted, all you need to do is pull the docker image of the sql server and download it. this can be done by below commands on your terminal . FYI, I am using bash commands below:
Command 1:
sudo docker pull mcr.microsoft.com/mssql/server:2017-latest
This will pull the latest vesion docker image and download. Once done, you need to set your SQL authentication on the server for your database. Follow below commands:
Command 2:
sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<SetYourPasswordHere>' \
-p 1433:1433 --name sql1 \
-d mcr.microsoft.com/mssql/server:2017-latest
This sets your password and uses the port 1433 for SQL server (which is the default port). To confirm if the image has been created and the SQL server is running on docker, execute the below command to check log(s).
Command 3:
docker ps
To check all instances in your history of dockers( i.e. if you already had dockers installed before you are attempting this SQL connection/execution), run the below command and it will give you all the logs of all instances you have created
Command 4:
docker ps -a
or
docker ps -all
Once, you have completed above steps and see that the docker has created SQL instance, you need to go to Azure Data Studio and set the below credentials to access the server that you just created above using Docker.
Server: localhost
Authentication Type: SQL Authentication
Username: sa
Password: <Check Command 2 to see what you entered in the password where it says SetYourPasswordHere>
Hope this helps in your tryst with running SQL server on your MAC. All the Best!
You certainly can connect to a sql server image running in a docker container through azure data studio,
Based on the details mentioned in the question, I'm assuming that you have followed the steps on Microsoft docs for configuring sql server with docker,
The following command is needed to configure and run the SQL Server image docker container:
sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=your-strong-password’ -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest;
To quickly verify
check that the image is running by running:
docker ps -a
And checking the status column (with the correct instance name) to be 'UP',
Then launch Azure Data Studio and fill the connection details:
If you have followed all the default settings in setting up the image, this should work for you,
Hope this helps,
I hope first you have installed sql-cli(make sure you have node.js installed in your system),
Then connect to Mssql with command -> mssql -u -p
try to connect/create a database with docker first then connect from Azure Data Studio