The mongodb and mongodb+srv formats are directly from MongoDB. As part of the connection string, a series of connection arguments can be passed into the driver that will affect its behavior. For sharded or cluster setup, the URL should contain the server names (and optional ports) in a comma-separated list. DBeaver is free universal SQL client/database tool for developers and database administrators. It can work with any database server which has JDBC or ODBC driver. It supports pluggable extensions.
Install SQL Server directly to your Mac — no virtual machine required!
Microsoft has made SQL Server available for macOS and Linux systems. This is made possible by running SQL Server from a Docker container. Therefore, there's no need to install a virtual machine with Windows (which was the only way to run SQL Server on a Mac prior to SQL Server 2017).
Install and Configure Docker
This is a prerequisite for installing SQL Server on your Mac. Because the Mac runs SQL Server inside a Docker container, the first thing we need to do is download and install Docker (unless it's already installed). Once installed, we'll increase its memory allocation to a more suitable level for running SQL Server.
- Download Docker from the download page, extract it, and drag it into your Application folder.
- Launch Docker, and go to
Preferences > Advanced
and increase its memory allocation to 4GB
If I've confused you, don't worry. I've written a tutorial with screenshots: Install Docker on a Mac and Configure for SQL Server.
OK, we're now ready to install SQL Server on your Mac.
Now the Actual SQL Server Installation
Now that we've installed Docker and increased its memory allocation, we can go ahead and install SQL Server. The Mac uses the Linux image (the SQL Server for Linux Docker image).
Pull the SQL Server Image
Open a Terminal window and run the following command:*
This pulls the latest SQL Server for Linux Docker image to your computer.
* The exact command will depend on which release you download. Also, since I wrote this article, Docker has moved the repository for SQL Server. You might need to use
docker pull mcr.microsoft.com/mssql/server:2017-latest-ubuntu
to download SQL Server 2017.Also, SQL Server 2019 Preview has been available since late 2018. As of late 2019 you can download it at
docker pull mcr.microsoft.com/mssql/server:2019-CTP3.2-ubuntu
.For the latest image, see the official Microsoft repository on the Docker website.
Launch the SQL Server Image
Run the following command to launch an instance of the Docker image you just downloaded:
Replace the container name and password with your own. Also be sure to make a strong password, or you may get an error (see below).
Also, if you downloaded a different container image, replace
microsoft/mssql-server-linux
with your container image.Here's an explanation of the above parameters:
-d
- This is an optional parameter that 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 Homer
- This optional parameter provides a name for the container. This can be handy when stopping and starting the 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 install SQL Server. -e 'SA_PASSWORD=myPassw0rd'
- 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 that instead.
Password Strength
If you get the following error at this step, try again, but with a stronger password.
Check the Docker container (optional)
Type the following command to check that the Docker container is running.
If it's up and running, it should return something like this:
Show All Containers
The above command only shows those containers that are currently running. To show all containers (whether they're running or not), append the
-a
flag to the command (you can also use-all
):
Check your Installation & Manage SQL Server
Now that you've installed SQL Server on your Mac, you'll probably want to check that you can access it and query it, etc. Then you'll probably want to start creating databases and doing other DB-related tasks. You'll need some sort of management tool for this.
Here are three options:
sql-cli
sql-cli is a cross platform command line tool for SQL Server. This means you can create databases and query them right from your Mac's Terminal window.
Installation is as easy as running a single command (assuming you already have NodeJs installed).
Azure Data Studio
Azure Data Studio (formerly called SQL Operations Studio) is a free GUI tool from Microsoft. It's a bit more user friendly for those who aren't comfortable with the command line interface.
Installation is as easy as downloading it and dragging it to your Applications folder.
DBeaver
Another GUI option is DBeaver. DBeaver is a free open source database tool that works with many different database management systems (MySQL, PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access, Teradata, Firebird, Derby, etc).
You have a few options for installing DBeaver. The easiest way is to download the 'installer option', and then run the installation wizard.
Original author(s) | Serge Rider |
---|---|
Developer(s) | Open-source community |
Initial release | 2010; 11 years ago |
Stable release | |
Repository | |
Operating system | Cross-platform |
Available in | Multilingual |
Type | |
License | Apache license |
Website | dbeaver.io |
DBeaver is a SQL client software application and a database administration tool. For relational databases it uses the JDBCapplication programming interface (API) to interact with databases via a JDBC driver. For other databases (NoSQL) it uses proprietary database drivers. It provides an editor that supports code completion and syntax highlighting. It provides a plug-in architecture (based on the Eclipse plugins architecture) that allows users to modify much of the application's behavior to provide database-specific functionality or features that are database-independent. This is a desktop application written in Java and based on Eclipse platform.
The community edition (CE) of DBeaver is a free and open source software that is distributed under the Apache License. A closed-source enterprise edition of DBeaver is distributed under a commercial license.
History[edit]
DBeaver was started in 2010 as a hobby project. It was supposed to be free and open-source with a good-looking and convenient UI and to include frequently used features for database developers.The first official release was in 2011 on Freecode.[1]It quickly became a popular tool in the open-source community.[2][3]
In the same year, the official web site was founded and the community support forum (now moved to GitHub) was created.[4]In 2012 an Eclipse plugin version was released - since then DBeaver has become one of the most popular database extensions for Eclipse (top 50-60 among all Eclipse extensions).[5]
Shortly after, various software vendors started to integrate with DBeaver (mostly as an extensions to their proprietary Eclipse RCP products: Zend Studio,[6] NXTware,[7] DeltaDNA,[8] etc.).
In 2014 the Enterprise Edition (EE) version was released. The EE version is based on CE but also provides support of NoSQL/BigData databases (Cassandra, MongoDB and Redis) and includes a few additional Eclipse plugins.
In 2015 DBeaver source code/community has moved to GitHub.[9]
In 2017 DBeaver CE was relicensed under Apache License (starting from version 4.x).[10]
In July 2017 DBeaver EE version became commercial in order to support CE version.
Supported platforms and languages[edit]
DBeaver is a cross-platform tool and works on platforms which are supported by Eclipse (Windows, Linux, MacOS X, Solaris). DBeaver is available in English, Chinese, Russian, Italian, and German.
Versions[edit]
Full list of all released versions[11]
Community Edition[edit]
Community Edition (CE) is the initial version of DBeaver. It was released in 2010 and became open-source (GPL) in 2011.CE version includes extended support of the following databases:
- MySQL and MariaDB
- Any other database which has JDBC or ODBC driver.
Besides relational databases, CE version supports WMI driver (Windows Management Instrumentation – works only in Windows version).
Eclipse Plugin Edition[edit]
After a year, and in response to multiple user requests an Eclipse plugin version was released on Eclipse Marketplace. This version is used by programmers who use the Eclipse IDE for software development and need a database management tool right in their IDE. The Eclipse plugin includes most features of Community Edition and is also released under GPL license.
Enterprise Edition[edit]
DBeaver 3.x announced support of NoSQL databases (Cassandra and MongoDB in the initial version). Since then DBeaver was divided on Community and Enterprise editions.Enterprise Edition has support of NoSQL databases, persistent query manager and a few other enterprise-level features. The EE version is not open-source and requires the purchase of a license (a trial license can be generated free of charge).List of additional features:
- Persistent QM
- JSON documents editor (mostly for MongoDB)
- Eclipse EE features (resources management, Marketplace UI)
Features[edit]
DBeaver features include:
- SQL queries execution
- Data browser/editor with a huge number of features
- Syntax highlighting and SQL auto-completion
- Database structure (metadata) browse and edit
- SQL scripts management
- DDL generation
- ERD (Entity Relationship Diagrams) rendering
- SSL support (MySQL and PostgreSQL)
- Data export/migration
- Import, export and backup of data (MySQL and PostgreSQL)
- Mock data generation[12] for database testing
There are differences in the features available across different databases.
See also[edit]
References[edit]
- ^'Freecode DBeaver page'. 2011.
- ^'Techrepublic: Manage databases with the cross-platform tool DBeaver'. 2011.
- ^'DBeaver: Free Database Manager for Oracle, SQL Server, MySQL, PostgreSQL, DB2'. 2011.
- ^'DBeaver legacy KnowledgeBase forum'. 2011.
- ^'Eclipse Marketplace Metrics'. 2016.
- ^'DBeaver in Zend Studio'. 2013. Archived from the original on 2016-06-17. Retrieved 2017-01-29.
- ^'DBeaver in NXTware'. 2013.
- ^'DBeaver in DeltaDNA'. 2013.
- ^'DBeaver GitHub home'. 2016.
- ^'DBeaver relicense under EPL'. 2017.
- ^'DBeaver release notes on Softpedia'.
- ^'Mock Data Generation in DBeaver'. 2018.