-->
- SQLPro for MSSQL is the Premier application for editing and viewing SQL Server databases on mac os x. SQLPro for MSSQL. Download; Buy; A simple, powerful SQL Server manager for macOS Download Purchase (also available on the Mac App Store) Download. NO VIRTUAL MACHINES.
- Sql Server free download - Microsoft SQL Server 2008 Express (32-bit), Toad for SQL Server Freeware, SQL Server 7.0 Service Pack 4, and many more programs.
Never did I think that I'd be able to run SQL Server on my Mac. My, how times have changed. For the first time, SQL Server 2017 allows users to install the product on Linux. This opens the doors for working with fully-featured SQL Server database engines on MacOS through freely distributable Docker containers.
This article explains how to install the Microsoft ODBC Driver for SQL Server on macOS. It also includes instructions for the optional command-line tools for SQL Server (bcp
and sqlcmd
) and the unixODBC development headers.
This article provides commands for installing the ODBC driver from the bash shell. If you want to download the packages directly, see Download ODBC Driver for SQL Server.
Note
The Microsoft ODBC driver for SQL Server on macOS is only supported on the x64 architecture through version 17.7. The Apple M1 (ARM64) is supported starting with version 17.8. The architecture will be detected and the correct package will be automatically installed by the Homebrew formula. If your command prompt is running in x64 emulation mode on the M1, the x64 package will be installed. If you're not running in emulation mode in your command prompt, the ARM64 package will be installed.
Microsoft ODBC 17
To install Microsoft ODBC driver 17 for SQL Server on macOS, run the following commands:
Important
If you installed the v17 msodbcsql
package that was briefly available, you should remove it before installing the msodbcsql17
package. This will avoid conflicts. The msodbcsql17
package can be installed side by side with the msodbcsql
v13 package.
Previous versions
The following sections provide instructions for installing previous versions of the Microsoft ODBC driver on macOS.
ODBC 13.1
Use the following commands to install the Microsoft ODBC driver 13.1 for SQL Server on OS X 10.11 (El Capitan) and macOS 10.12 (Sierra):
Driver files
The ODBC driver on macOS consists of the following components:
Component | Description |
---|---|
libmsodbcsql.17.dylib or libmsodbcsql.13.dylib | The dynamic library (dylib ) file that contains all of the driver's functionality. This file is installed in /usr/local/lib/ . |
msodbcsqlr17.rll or msodbcsqlr13.rll | The accompanying resource file for the driver library. This file is installed in [driver .dylib directory]../share/msodbcsql17/resources/en_US/ for Driver 17 and in [driver .dylib directory]../share/msodbcsql/resources/en_US/ for Driver 13. |
msodbcsql.h | The header file that contains all of the new definitions needed to use the driver. Note: You cannot reference msodbcsql.h and odbcss.h in the same program. msodbcsql.h is installed in /usr/local/include/msodbcsql17/ for Driver 17 and in /usr/local/include/msodbcsql/ for Driver 13. |
LICENSE.txt | The text file that contains the terms of the End-User License Agreement. This file is placed in /usr/local/share/doc/msodbcsql17/ for Driver 17 and in /usr/local/share/doc/msodbcsql/ for Driver 13. |
RELEASE_NOTES | The text file that contains release notes. This file is placed in /usr/local/share/doc/msodbcsql17/ for Driver 17 and in /usr/local/share/doc/msodbcsql/ for Driver 13. |
Resource file loading
Sql Server For Mac Free Download
The driver needs to load the resource file in order to function. This file is called msodbcsqlr17.rll
or msodbcsqlr13.rll
depending on the driver version. The location of the .rll
file is relative to the location of the driver itself (so
or dylib
), as noted in the table above. As of version 17.1 the driver will also attempt to load the .rll
from the default directory if loading from the relative path fails. The default resource file path on macOS is /usr/local/share/msodbcsql17/resources/en_US/
Troubleshooting
Some users encounter an issue when trying to connect after installing the ODBC driver and receive an error like: '[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)'
. It may be the case that unixODBC is not configured correctly to find registered drivers. In these cases, creating a couple symbolic links can resolve the issue.
For additional cases where you are unable to make a connection to SQL Server using the ODBC driver, see the known issues article on troubleshooting connection problems.
Next steps
After installing the driver, you can try the C++ ODBC example application. For more information about developing ODBC applications, see Developing Applications.
For more information, see the ODBC driver release notes and system requirements.
-->Getting Started Microsoft SQL Server on Mac and Windows in 2020 - Installation Tutorial (FREE) How to install SQL Server on Mac and Windows in 2020; Docker download and Installation on Mac; Kitematic download and Installation on Mac; Docker Configuration for SQL Server on Mac; Download and Install SQL Server 2017 Express edition on Mac and Windows.
The following instructions assume a clean environment and show how to install PHP 7.x, the Microsoft ODBC driver, the Apache web server, and the Microsoft Drivers for PHP for SQL Server on Ubuntu 16.04, 18.04, and 19.10, RedHat 7 and 8, Debian 8, 9, and 10, Suse 12 and 15, Alpine 3.11 (experimental), and macOS 10.13, 10.14, and 10.15. These instructions advise installing the drivers using PECL, but you can also download the prebuilt binaries from the Microsoft Drivers for PHP for SQL Server GitHub project page and install them following the instructions in Loading the Microsoft Drivers for PHP for SQL Server. For an explanation of extension loading and why we do not add the extensions to php.ini, see the section on loading the drivers.
These instructions install PHP 7.4 by default. Note that some supported Linux distros default to PHP 7.1 or earlier, which is not supported for the latest version of the PHP drivers for SQL Server -- please see the notes at the beginning of each section to install PHP 7.2 or 7.3 instead.
Also included are instructions for installing the PHP FastCGI Process Manager, PHP-FPM, on Ubuntu. This is needed if using the nginx web server instead of Apache.
Contents of this page:
Installing the drivers on Ubuntu 16.04, 18.04, and 19.10
Note
To install PHP 7.2 or 7.3, replace 7.4 with 7.2 or 7.3 in the following commands.
Step 1. Install PHP
Step 2. Install prerequisites
Install the ODBC driver for Ubuntu by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
If there is only one PHP version in the system, then the last step can be simplified to phpenmod sqlsrv pdo_sqlsrv
.
Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers with PHP-FPM on Ubuntu
Note
To install PHP 7.2 or 7.3, replace 7.4 with 7.2 or 7.3 in the following commands.
Step 1. Install PHP
Verify the status of the PHP-FPM service by running
Step 2. Install prerequisites
Install the ODBC driver for Ubuntu by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
If there is only one PHP version in the system, then the last step can be simplified to phpenmod sqlsrv pdo_sqlsrv
.
Verify that sqlsrv.ini
and pdo_sqlsrv.ini
are located in /etc/php/7.4/fpm/conf.d/
:
Restart the PHP-FPM service:
Step 4. Install and configure nginx
To configure nginx, you must edit the /etc/nginx/sites-available/default
file. Add index.php
to the list below the section that says # Add index.php to the list if you are using PHP
:
Next, modify the section following # pass PHP scripts to FastCGI server
as follows:
Is Microsoft Sql Server Necessary
Step 5. Restart nginx and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Red Hat 7 and 8
Sql Software For Windows 10
Step 1. Install PHP
To install PHP on Red Hat 7, run the following:
Note
To install PHP 7.2 or 7.3, replace remi-php74 with remi-php72 or remi-php73 respectively in the following commands.
To install PHP on Red Hat 8, run the following:
Note
To install PHP 7.2 or 7.3, replace remi-7.4 with remi-7.2 or remi-7.3 respectively in the following commands.
Step 2. Install prerequisites
Install the ODBC driver for Red Hat 7 or 8 by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
You can alternatively install from the Remi repo:
Step 4. Install Apache
SELinux is installed by default and runs in Enforcing mode. To allow Apache to connect to databases through SELinux, run the following command:
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Debian 8, 9, and 10
Note
To install PHP 7.2 or 7.3, replace 7.4 in the following commands with 7.2 or 7.3.
Step 1. Install PHP
Step 2. Install prerequisites
Install the ODBC driver for Debian by following the instructions on the Linux installation article.
You may also need to generate the correct locale to get PHP output to display correctly in a browser. For example, for the en_US UTF-8 locale, run the following commands:
You may need to add /usr/sbin
to your $PATH
, as the locale-gen
executable is located there.
Step 3. Install the PHP drivers for Microsoft SQL Server
If there is only one PHP version in the system, then the last step can be simplified to phpenmod sqlsrv pdo_sqlsrv
. As with locale-gen
, phpenmod
is located in /usr/sbin
so you may need to add this directory to your $PATH
.
Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Suse 12 and 15
Note
In the following instructions, replace <SuseVersion>
with your version of Suse - if you are using Suse Enterprise Linux 15, it will be SLE_15 or SLE_15_SP1. For Suse 12, use SLE_12_SP4 (or above if applicable). Not all versions of PHP are available for all versions of Suse Linux - please refer to http://download.opensuse.org/repositories/devel:/languages:/php
to see which versions of Suse have the default version PHP available, or to http://download.opensuse.org/repositories/devel:/languages:/php:/
to see which other versions of PHP are available for which versions of Suse.
Note
Packages for PHP 7.4 are not available for Suse 12.To install PHP 7.2, replace the repository URL below with the following URL:https://download.opensuse.org/repositories/devel:/languages:/php:/php72/<SuseVersion>/devel:languages:php:php72.repo
.To install PHP 7.3, replace the repository URL below with the following URL:https://download.opensuse.org/repositories/devel:/languages:/php:/php73/<SuseVersion>/devel:languages:php:php73.repo
.
Step 1. Install PHP
Step 2. Install prerequisites
Install the ODBC driver for Suse by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
Note
If you get an error message saying Connection to 'pecl.php.net:443' failed: Unable to find the socket transport 'ssl'
, edit the pecl script at /usr/bin/pecl and remove the -n
switch in the last line. This switch prevents PECL from loading ini files when PHP is called, which prevents the OpenSSL extension from loading.
Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Alpine 3.11
Note
The default version of PHP is 7.3. Alternate versions of PHP are not available from other repositories for Alpine 3.11. You can instead compile PHP from source.
Step 1. Install PHP
PHP packages for Alpine are found in the edge/community
repository. Add the following line to /etc/apt/repositories
, replacing <mirror>
with the URL of an Alpine repository mirror:
Then run:
Step 2. Install prerequisites
Install the ODBC driver for Alpine by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
You may need to define a locale:
Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on macOS High Sierra, Mojave, and Catalina
If you do not already have it, install brew as follows:
Note
To install PHP 7.2 or 7.3, replace [email protected] with [email protected] or [email protected] respectively in the following commands.
Step 1. Install PHP
PHP should now be in your path -- run php -v
to verify that you are running the correct version of PHP. If PHP is not in your path or it is not the correct version, run the following:
Step 2. Install prerequisites
Install the ODBC driver for macOS by following the instructions on the macOS installation article.
Microsoft Sql Server Mac Free Software
In addition, you may need to install the GNU make tools:
Step 3. Install the PHP drivers for Microsoft SQL Server
Step 4. Install Apache and configure driver loading
To find the Apache configuration file, httpd.conf
, for your Apache installation, run
The following commands append the required configuration to httpd.conf
. Be sure to substitute the path returned by the preceding command in place of /usr/local/etc/httpd/httpd.conf
:
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Testing Your Installation
To test this sample script, create a file called testsql.php in your system's document root. This is /var/www/html/
on Ubuntu, Debian, and Redhat, /srv/www/htdocs
on SUSE, /var/www/localhost/htdocs
on Alpine, or /usr/local/var/www
on macOS. Copy the following script to it, replacing the server, database, username, and password as appropriate. On Alpine 3.11, you may also need to specify the CharacterSet as 'UTF-8' in the $connectionOptions
array.
Point your browser to https://localhost/testsql.php (https://localhost:8080/testsql.php on macOS). You should now be able to connect to your SQL Server/Azure SQL database.
See Also
-->To manage your database, you need a tool. Whether your databases run in the cloud, on Windows, on macOS, or on Linux, your tool doesn't need to run on the same platform as the database.
You can view the links to the different SQL tools in the following tables.
Note
To download SQL Server, see Install SQL Server.
Recommended tools
The following tools provide a graphical user interface (GUI).
Tool | Description | Operating system |
---|---|---|
Azure Data Studio | A light-weight editor that can run on-demand SQL queries, view and save results as text, JSON, or Excel. Edit data, organize your favorite database connections, and browse database objects in a familiar object browsing experience. | Windows macOS Linux |
SQL Server Management Studio (SSMS) | Manage a SQL Server instance or database with full GUI support. Access, configure, manage, administer, and develop all components of SQL Server, Azure SQL Database, and SQL Data Warehouse. Provides a single comprehensive utility that combines a broad group of graphical tools with a number of rich script editors to provide access to SQl for developers and database administrators of all skill levels. | Windows |
SQL Server Data Tools (SSDT) | A modern development tool for building SQL Server relational databases, Azure SQL databases, Analysis Services (AS) data models, Integration Services (IS) packages, and Reporting Services (RS) reports. With SSDT, you can design and deploy any SQL Server content type with the same ease as you would develop an application in Visual Studio. | Windows |
Visual Studio Code | The mssql extension for Visual Studio Code is the official SQL Server extension that supports connections to SQL Server and rich editing experience for T-SQL in Visual Studio Code. Write T-SQL scripts in a light-weight editor. | Windows macOS Linux |
Command-line tools
The tools below are the main command-line tools.
Tool | Description | Operating system |
---|---|---|
bcp | The bulk copy program utility (bcp) bulk copies data between an instance of Microsoft SQL Server and a data file in a user-specified format. | Windows macOS Linux |
mssql-cli (preview) | mssql-cli is an interactive command-line tool for querying SQL Server. Also, query SQL Server with a command-line tool that features IntelliSense, syntax high-lighting, and more. | Windows macOS Linux |
mssql-conf | mssql-conf configures SQL Server running on Linux. | Linux |
mssql-scripter (preview) | mssql-scripter is a multi-platform command-line experience for scripting SQL Server databases. | Windows macOS Linux |
sqlcmd | sqlcmd utility lets you enter Transact-SQL statements, system procedures, and script files at the command prompt. | Windows macOS Linux |
sqlpackage | sqlpackage is a command-line utility that automates several database development tasks. | Windows macOS Linux |
SQL Server PowerShell | SQL Server PowerShell provides cmdlets for working with SQL. | Windows macOS Linux |
Migration and other tools
These tools are used to migrate, configure, and provide other features for SQL databases.
Tool | Description |
---|---|
Configuration Manager | Use SQL Server Configuration Manager to configure SQL Server services and configure network connectivity. Configuration Manager runs on Windows |
Database Experimentation Assistant | Use Database Experimentation Assistant to evaluate a targeted version of SQL for a given workload. |
Data Migration Assistant | The Data Migration Assistant tool helps you upgrade to a modern data platform by detecting compatibility issues that can impact database functionality in your new version of SQL Server or Azure SQL Database. |
Distributed Replay | Use the Distributed Replay feature to help you assess the impact of future SQL Server upgrades. Also use Distributed Replay to help assess the impact of hardware and operating system upgrades, and SQL Server tuning. |
ssbdiagnose | The ssbdiagnose utility reports issues in Service Broker conversations or the configuration of Service Broker services. |
SQL Server Migration Assistant | Use SQL Server Migration Assistant to automate database migration to SQL Server from Microsoft Access, DB2, MySQL, Oracle, and Sybase. |
Microsoft Sql Server Mac Free Download
If you're looking for additional tools that aren't mentioned on this page, see SQL Command Prompt Utilities and Download SQL Server extended features and tools
Comments are closed.