Download Oracle Sql For Mac

Here I’ll show you how to get SQL Server up and running on your Mac in less than half an hour. And the best part is, you’ll have SQL Server running locally without needing any virtualization software.

  1. Sql For Mac
  2. Mac Sql Server

Jul 30, 2017 Starting with SQL Server 2017, you can now install SQL Server directly on to a Linux machine. And because macOS is Unix based (and Linux is Unix based), you can run SQL Server for Linux on your Mac. The way to do this is to run SQL Server on Docker. So let’s go ahead and install Docker. Then we’ll download and install SQL Server. Oracle sql developer free download - Insight Developer for Oracle, SQL Anywhere Developer Edition, SQLite Database, and many more programs.

Prior to SQL Server 2017, if you wanted to run SQL Server on your Mac, you first had to create a virtual machine (using VirtualBox, Parallels Desktop, VMware Fusion, or Bootcamp), then install Windows onto that VM, then finally SQL Server. This is still a valid option depending on your requirements (here’s how to install SQL Server on a Mac with VirtualBox if you’d like to try that method).

Starting with SQL Server 2017, you can now install SQL Server directly on to a Linux machine. And because macOS is Unix based (and Linux is Unix based), you can run SQL Server for Linux on your Mac. The way to do this is to run SQL Server on Docker.

So let’s go ahead and install Docker. Then we’ll download and install SQL Server.

  1. Install Docker

    Download the (free) Docker Community Edition for Mac (unless you’ve already got it installed on your system). This will enable you to run SQL Server from within a Docker container.

    To download, visit the Docker CE for Mac download page and click Get Docker.

    To install, double-click on the .dmg file and then drag the Docker.app icon to your Application folder.

    What is Docker?

    Docker is a platform that enables software to run in its own isolated environment. SQL Server (from 2017) can be run on Docker in its own isolated container. Once Docker is installed, you simply download — or “pull” — the SQL Server on Linux Docker Image to your Mac, then run it as a Docker container. This container is an isolated environment that contains everything SQL Server needs to run.

  2. Launch Docker

    Launch Docker the same way you’d launch any other application (eg, via the Applications folder, the Launchpad, etc).

    When you open Docker, you might be prompted for your password so that Docker can install its networking components and links to the Docker apps. Go ahead and provide your password, as Docker needs this to run.

  3. Increase the Memory

    By default, Docker will have 2GB of memory allocated to it. SQL Server needs at least 3.25GB. To be safe, increase it to 4GB if you can.

    To do this:

    1. Select Preferences from the little Docker icon in the top menu
    2. Slide the memory slider up to at least 4GB
    3. Click Apply & Restart
  4. Download SQL Server

    Now that Docker is installed and its memory has been increased, we can download and install SQL Server for Linux.

    Open a Terminal window and run the following command.

    This downloads the latest SQL Server 2019 for Linux Docker image to your computer.

    You can also check for the latest container version on the Docker website if you wish.

    Update: When I first wrote this article, I used the following image:

    Which downloaded SQL Server 2017. Therefore, the examples below reflect that version.

  5. Launch the Docker Image

    Run the following command to launch an instance of the Docker image you just downloaded:

    But of course, use your own name and password. Also, if you downloaded a different Docker image, replace microsoft/mssql-server-linux with the one you downloaded.

    Here’s an explanation of the parameters:

    -d
    This optional parameter launches the Docker container in daemon mode. This means that it runs in the background and doesn’t need its own Terminal window open. You can omit this parameter to have the container run in its own Terminal window.
    --name sql_server_demo
    Another optional parameter. This parameter allows you to name the container. This can be handy when stopping and starting your container from the Terminal.
    -e 'ACCEPT_EULA=Y'
    The Y shows that you agree with the EULA (End User Licence Agreement). This is required in order to have SQL Server for Linux run on your Mac.
    -e 'SA_PASSWORD=reallyStrongPwd123'
    Required parameter that sets the sa database password.
    -p 1433:1433
    This maps the local port 1433 to port 1433 on the container. This is the default TCP port that SQL Server uses to listen for connections.
    microsoft/mssql-server-linux
    This tells Docker which image to use. If you downloaded a different one, use it instead.

    Password Strength

    If you get the following error at this step, try again, but with a stronger password.

    I received this error when using reallyStrongPwd as the password (but of course, it’s not a really strong password!). I was able to overcome this by adding some numbers to the end. However, if it wasn’t just a demo I’d definitely make it stronger than a few dictionary words and numbers.

  6. Check the Docker container (optional)

    You can type the following command to check that the Docker container is running.

    If it’s up and running, it should return something like this:

  7. Install sql-cli (unless already installed)

    Run the following command to install the sql-cli command line tool. This tool allows you to run queries and other commands against your SQL Server instance.

    This assumes you have NodeJs installed. If you don’t, download it from Nodejs.org first. Installing NodeJs will automatically install npm which is what we use in this command to install sql-cli.

    Permissions Error?

    If you get an error, and part of it reads something like Please try running this command again as root/Administrator, try again, but this time prepend sudo to your command:

  8. Connect to SQL Server

    Now that sql-cli is installed, we can start working with SQL Server via the Terminal window on our Mac.

    Connect to SQL Server using the mssql command, followed by the username and password parameters.

    You should see something like this:

    This means you’ve successfully connected to your instance of SQL Server.

  9. Run a Quick Test

    Run a quick test to check that SQL Server is up and running and you can query it.

    For example, you can run the following command to see which version of SQL Server your running:

    If it’s running, you should see something like this (but of course, this will depend on which version you’re running):

    If you see a message like this, congratulations — SQL Server is now up and running on your Mac!

Download Oracle Sql For Mac

A SQL Server GUI for your Mac – Azure Data Studio

Azure Data Studio (formerly SQL Operations Studio) is a free GUI management tool that you can use to manage SQL Server on your Mac. You can use it to create and manage databases, write queries, backup and restore databases, and more.

Azure Data Studio is available on Windows, Mac and Linux.

Here are some articles/tutorials I’ve written for Azure Data Studio:

Another Free SQL Server GUI – DBeaver

Another SQL Server GUI tool that you can use on your Mac (and Windows/Linux/Solaris) is DBeaver.

DBeaver is a free, open source database management tool that can be used on most database management systems (such as MySQL, PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, Microsoft Access, Teradata, Firebird, Derby, and more).

I wrote a little introduction to DBeaver, or you can go straight to the DBeaver download page and try it out with your new SQL Server installation.

Limitations of SQL Server for Linux/Mac

SQL Server 2017 for Linux does have some limitations (at least, in its initial release). The Linux release doesn’t include many of the extra services that are available in the Windows release, such as Analysis Services, Reporting Services, etc. Here’s a list of what’s available and what’s not on SQL Server 2017 for Linux.

Another limitation is that SQL Server Management Studio is not available on Mac or Linux. SSMS a full-blown GUI management for SQL Server, and it provides many more features than Azure Data Studio and DBeaver (at least at the time of writing). You can still use SSMS on a Windows machine to connect to SQL Server on a Linux or Mac machine, but you just can’t install it locally on the Linux or Mac machine.

If you need any of the features not supported in SQL Server for Linux, you’ll need SQL Server for Windows. However, you can still run SQL Server for Windows on your Mac by using virtualization software. Here’s how to install SQL Server for Windows on a Mac using VirtualBox.

SQL*Plus Instant Client is a standalone product with all the functionality of SQL*Plus command-line. It connects to existing remote Oracle databases, but does not include its own database. It is easy to install and uses significantly less disk space than the full Oracle Database Client installation required to use SQL*Plus command-line.

SQL*Plus Instant Client is available on platforms that support the OCI Instant Client. See About OCI Instant Client for more information on the OCI Instant Client.

To install SQL*Plus Instant Client, you need two packages:

  • SQL*Plus Instant Client package.

  • Either the Basic OCI Instant Client package, or the lightweight OCI Instant Client package.

D.1 About Choosing the SQL*Plus Instant Client to Install

SQL*Plus Instant Client can be installed in two ways:

  • Download the packages from the Oracle Technology Network (OTN).

  • Copy the same files that are in the packages from an Oracle Database 12c Client Administrator installation.

Both the SQL*Plus and OCI packages must be from the same Oracle Database version, for example, 12.2.0.0.0.

D.1.1 Basic Instant Client

SQL*Plus Instant Client using the Basic OCI package works with any NLS_LANG setting supported by the Oracle Database. It supports all character sets and language settings available in the Oracle Database.

D.1.2 Lightweight Instant Client

SQL*Plus Instant Client using the lightweight OCI package displays error messages in English only and supports only specific character sets. It is significantly smaller than SQL*Plus Instant Client using the Basic OCI package.

Valid values for NLS_LANG parameters with the lightweight Instant Client are:

  • language can be any valid language supported by the Oracle Database, however, error messages are only reported in English.

  • territory can be any valid territory supported by the Oracle Database.

  • charset is one of the following character sets:

    • US7ASCII

    • WE8DEC

    • WE8MSWIN1252

    • WE8ISO8859P1

    • UTF8

    • AL16UTF16

    • AL32UTF8

For example:

See Setting Up a Globalization Support Environment, and NLS_LANG Environment Variable for more information about NLS settings.

D.1.2.1 Lightweight SQL*Plus Instant Client Error with Unsupported Character Set

Attempting to start SQL*Plus Instant Client with an unsupported character set will fail with the following error:

D.2 About Installing SQL*Plus Instant Client by Downloading from OTN

The OTN downloads for Linux are RPM packages. The OTN downloads for UNIX and Windows are zip files.

The SQL*Plus Instant Client package should never be installed on an ORACLE_HOME.

D.2.1 Installing SQL*Plus Instant Client from Linux RPM Packages

  1. Download the RPM packages containing the SQL*Plus Instant Client package, and the OCI package from the OTN Instant Client page at http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html. Both packages must be from the same version such as 12.2.0.0.0.
  2. Use rpm -i for the initial install of the RPM packages, or rpm -u to upgrade to a newer version of the packages.
  3. Configure SQL*Plus Instant Client. See About Configuring SQL*Plus Instant Client.

D.2.2 Installing SQL*Plus Instant Client from the UNIX or Windows Zip Files

  1. Download the zip files containing the SQL*Plus Instant Client package, and the OCI package from the OTN Instant Client page at http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html. Both packages must be from the same version such as 12.2.0.0.0.
  2. Create a new directory, for example, /home/instantclient12_2 on UNIX or c:instantclient12_2 on Windows.
  3. Unzip the two packages into the new directory.
  4. Configure SQL*Plus Instant Client. See About Configuring SQL*Plus Instant Client.

D.2.3 List of Files Required for SQL*Plus Instant Client

Tables E-1, E-2 and E-3 list the required files from each of the SQL*Plus and OCI packages. The files from only one of the OCI packages are required. Other files installed that are not listed here can be ignored, or can be removed to save disk space.

Table D-1 Instant Client Files in the SQL*Plus Package

Linux and UNIXWindowsDescription

sqlplus

sqlplus.exe

SQL*Plus executable

libsqlplus.so

not applicable

SQL*Plus library

libsqlplusic.so

orasqlplusic12.dll

SQL*Plus data shared library

Table D-2 Instant Client Files in the Basic OCI Package

Linux and UNIXWindowsDescription

libclntsh.so.12.1

oci.dll

Client code library

libclntshcore.so

not applicable

OCI Instant Client data shared Library

libociei.so

oraociei12.dll

OCI Instant Client data shared library

libnnz12.so

orannzsbb12.dll

Security library

libons.so

oraons.dll

ONS library

Table D-3 Instant Client Files in the Lightweight OCI Package

Linux and UNIXWindowsDescription

libclntsh.so.12.1

oci.dll

Client code library

libociicus.so

oraociicus12.dll

OCI Instant Client data shared library (English only)

libnnz12.so

orannzsbb12.dll

Security library

D.3 Installing SQL*Plus Instant Client from the 12c Client Release Media

  1. Run the installer on the Oracle Database 12c Client Release media and choose the Administrator option.
  2. Create a new directory, for example, /home/instantclient12_2 on UNIX and Linux, or c:instantclient12_2 on Windows.
  3. Copy the SQL*Plus Instant Client and the OCI Instant Client files to the new directory. All files must be copied from the same ORACLE_HOME.

    See Installing SQL*Plus Instant Client on UNIX or Linux or Installing SQL*Plus Instant Client on Windows for a list of the files to copy.

  4. Configure SQL*Plus Instant Client. See About Configuring SQL*Plus Instant Client.

D.3.1 Installing SQL*Plus Instant Client on UNIX or Linux

To install SQL*Plus Instant Client using the Basic OCI package on UNIX and Linux, copy the following files:

To install SQL*Plus Instant Client using the lightweight OCI package on UNIX and Linux, copy the following files:

D.3.2 Installing SQL*Plus Instant Client on Windows

To install SQL*Plus Instant Client using the Basic OCI package on Windows, copy the following files:

To install SQL*Plus Instant Client using the lightweight OCI package on Windows, copy the following files:

D.4 About Configuring SQL*Plus Instant Client

The SQL*Plus Instant Client executable should only be used with the matching version of the OCI Instant Client.

Note that no ORACLE_HOME or ORACLE_SID environment variables need to be set.

D.4.1 Configuring SQL*Plus Instant Client on Linux (from RPMs)

The RPMs downloaded from OTN install into Oracle specific sub-directories in the /usr file system. The sub-directory structure enables multiple versions of Instant Client to be available.

  1. Add the name of the directory containing the Instant Client libraries to LD_LIBRARY_PATH. Remove any other Oracle directories.

    For example, to set LD_LIBRARY_PATH on Solaris in the Bourne or Korn shells:

  2. Make sure the sqlplus executable installed from the RPM is the first found in your PATH. To test, enter which sqlplus which should return /usr/bin/sqlplus. If not, remove any other Oracle directories from PATH, or put /usr/bin before other SQL*Plus executables in PATH, or use an absolute or relative path to start SQL*Plus.

    For example, to set PATH in the bash shell:

    If you install multiple versions of SQL*Plus, you may need to change the symbolic link /usr/bin/sqlplus to the version of SQL*Plus matching the libraries in LD_LIBRARY_PATH. For 12.2.0.1, /usr/bin/sqlplus is a symbolic link to the SQL*Plus binary at /usr/lib/oracle/12.1.0.1/client/bin/sqlplus.

  3. Set Oracle globalization variables required for your locale. A default locale will be assumed if no variables are set. See Locale Datafor more information.

D.4.2 Configuring SQL*Plus Instant Client on Linux (from Client Media or Zip File) and UNIX

  1. Add the name of the directory containing the Instant Client files to the appropriate shared library path LD_LIBRARY_PATH, LIBPATH or SHLIB_PATH. Remove any other Oracle directories.

    For example on Solaris in the Bourne or Korn shells:

  2. Add the directory containing the Instant Client files to the PATH environment variable. If it is not set, then an absolute or relative path must be used to start SQL*Plus. Remove any other Oracle directories from PATH. For example:
  3. Set Oracle globalization variables required for your locale. A default locale will be assumed if no variables are set. See Locale Datafor more information.

    For example:

D.4.3 Configuring SQL*Plus Instant Client on Windows

The environment may be configured using SET commands in a Windows command prompt or made permanent by setting Environment Variables in System Properties.

For example, to set environment variables in Windows 2000 using System Properties, open System from the Control Panel, click the Advanced tab and then click Environment Variables.

  1. Add the directory containing the Instant Client files to the PATH system environment variable. Remove any other Oracle directories from PATH.

    For example, add c:instantclient12_2 to the beginning of PATH.

  2. Set Oracle globalization variables required for your locale. A default locale will be assumed if no variables are set. See Locale Datafor more information. For example, to set NLS_LANG for a Japanese environment, create a user environment variable NLS_LANG set to JAPANESE_JAPAN.JA16EUC.

    If you have installed the lightweight Instant Client, see Lightweight Instant Client for information about supported NLS_LANG settings.

D.5 About Connecting to a Database with SQL*Plus Instant Client

SQL*Plus Instant Client is always 'remote' from any database server. To connect to a database you must specify the database using an Oracle Net connection identifier.

An example using an Easy Connection identifier to connect to the HR schema in the MYDB database running on mymachine is:

Download oracle sql for mac os

Alternatively you can use a Net Service Name:

Net Service Names can be stored in a number of places, including LDAP. The use of LDAP is recommended to take advantage of the new features of Oracle Database 12c. See Local Naming Parameters in the tnsnames.ora Filefor more information.

If you want to use Net Service Names configured in a local Oracle Net tnsnames.ora file, then set the environment variable TNS_ADMIN to the directory containing the tnsnames.ora file. For example, on UNIX, if your tnsnames.ora file is in /home/user1 and it defines the Net Service Name MYDB2:

If TNS_ADMIN is not set, then an operating system dependent set of directories is examined to find tnsnames.ora. This search path includes looking in the directory specified by the ORACLE_HOME environment variable for network/admin/tnsnames.ora. This is the only reason to set the ORACLE_HOME environment variable for SQL*Plus Instant Client. If ORACLE_HOME is set when running Instant Client applications, it must be set to a directory that exists.

This example assumes the ORACLE_HOME environment variable is set, and the $ORACLE_HOME/network/admin/tnsnames.ora or ORACLE_HOMEnetworkadmintnsnames.ora file defines the Net Service Name MYDB3:

The TWO_TASK (on UNIX) or LOCAL (on Windows) environment variable can be set to a connection identifier. This removes the need to explicitly enter the connection identifier whenever a connection is made in SQL*Plus or SQL*Plus Instant Client. This UNIX example connects to the database known as MYDB4:

On Windows, TNS_ADMIN and LOCAL may be set in the System Properties. See Configuring SQL*Plus Instant Client on Windows.

D.6 AS SYSDBA or AS SYSOPER Connections with SQL*Plus Instant Client

To connect AS SYSDBA or AS SYSOPER to perform DBA tasks, you need to set up an Oracle password file on the database server using the database's orapwd utility. Once this is configured, your SQL*Plus Instant Client connection string might look something like:

See Using Password File Authenticationfor information on Oracle password files.

D.7 About Uninstalling Instant Client

The SQL*Plus Instant Client package can be removed separately from the OCI Instant Client. After uninstalling the SQL*Plus Instant Client package, the remaining OCI Instant Client libraries enable custom written OCI programs or third party database utilities to connect to a database.

D.7.1 Uninstalling SQL*Plus Instant Client

Sql For Mac

  1. For installations on Linux from RPM packages, use rpm -e only on the SQL*Plus Instant Client package

    or

    For installations on UNIX and Windows, and installations on Linux from the Client Release media, manually remove the following SQL*Plus specific files:

    Table D-4 Instant Client Files in the SQL*Plus Package

    UNIXWindowsDescription

    sqlplus

    sqlplus.exe

    SQL*Plus executable

    libsqlplus.so

    not applicable

    SQL*Plus library

    libsqlplusic.so

    orasqlplusic12.dll

    SQL*Plus data shared library

  2. Reset environment variables and remove tnsnames.ora if necessary.

D.7.2 Uninstalling the Complete Instant Client

Mac Sql Server

  1. For installations on Linux from RPM packages, use rpm -qa to find the SQL*Plus Instant Client and Basic OCI package names and run rpm -e to remove them

    or

    For installations on UNIX and Windows, and installations on Linux from the Client Release media, manually delete the directory containing the SQL*Plus executable and Oracle libraries.

    See Installing SQL*Plus Instant Client from the 12c Client Release Media for a list of the files you copied to the directory.

  2. Reset environment variables such as PATH, SQLPATH, LD_LIBRARY_PATH and TNS_ADMIN.
  3. Remove tnsnames.ora if necessary.

Comments are closed.