Sign inSign up

zekiguven/babelfish

By zekiguven

•Updated over 2 years ago

Babelfish for PostgreSQL, added versions : 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.3.0, 2.4.0,3.0.0, 3.1.0

Image
Databases & storage
1

2.3K

zekiguven/babelfish repository overview

⁠docker-babelfish

Docker⁠ image for Babelfish for PostgreSQL⁠.

Babelfish for PostgreSQL is a collection of extensions⁠ for PostgreSQL⁠ that enable it to use the Tabular Data Stream (TDS) protocol⁠ and Transact-SQL (T-SQL)⁠ allowing apps designed for Microsoft SQL Server⁠ to utilize PostgreSQL as their database. For more details, see "Goodbye Microsoft SQL Server, Hello Babelfish"⁠ from the AWS News Blog.

⁠Quick Start

To create a new container, run:

docker run -d -p 1433:1433 zekiguven/babelfish:v1.2-pg13.6

⁠Example Data

Use the example_data.sql⁠ script to populate the database with example data.

You can then query the database using commands such as:

SELECT * FROM example_db.authors;
SELECT * FROM example_db.books;
⁠Advanced Setup

To initialize with a custom username, append -u my_username to the docker run command where my_username is the username desired.

To initialize with a custom password, append -p my_password to the docker run command where my_password is the password desired.

To initialize with a custom database name, append -d my_database to the docker run command where my_database is the database name desired. This is the name of the database that Babelfish for PostgreSQL uses internally to store the data and is not accessible via TDS.

⁠Migration Mode

By default, the single-db migration mode is used. To use a different migration mode, append -m migration_mode to the docker run command where migration_mode is the value for the migration mode desired.

For more information about migration modes, see Single vs. multiple instances⁠.

docker run -d --name babel -p 1433:1433 -p 5432:5432 -v c:\data:/data zekiguven/babelfish:v2.1.1-pg14.3 -m multi-db

⁠Connecting

If you are hosting the container on your local machine, the server name is localhost. Otherwise, use the IP address or DNS-backed fully qualified domain name (FQDN) for the server you are hosting the container on.

Use SQL Server Authentication mode for login.

The default login for Babelfish is:

  • Username: babelfish_user
  • Password: 12345678

If you specified a custom username and/or password, use those instead.

Babelfish does not currently support the SSMS Object Explorer. If you are using SSMS, you must connect via a New Query.

⁠Connection string

Assuming Babelfish is hosted on the local machine, using the default settings, and you are trying to connect to a database named example_db, the connection string is:

Data Source=localhost;Initial Catalog=example_db;Persist Security Info=true;User ID=babelfish_user;Password=12345678

⁠Data Volume

Database data is stored in the /data volume.

⁠Using with custom network with multiple db

docker network create -o com.docker.network.driver.mtu=1350 babelnet

docker run -d --name babel --network babelnet -p 1433:1433 -p 5432:5432 -v c:\data:/data zekiguven/babelfish:v2.1.1-pg14.3 -m multi-db

⁠Using with custom server collation (from 2.1.2)

docker run -d --name babel -p 1433:1433 -p 5432:5432 -v c:\data:/data zekiguven/babelfish:v2.1.2-pg14.3 -c bbf_unicode_cp1254_ci_as

forked from jonathanpotts/babelfishpg

Tag summary

Content type

Image

Digest

sha256:0f27741c3…

Size

215.8 MB

Last updated

over 2 years ago

docker pull zekiguven/babelfish:v4.1-pg16.2