Sign inSign up

coolincy/babelfish

By coolincy

Updated over 2 years ago

Babelfish for PostgreSQL, By Coolincy (Unofficial)

Image
0

1.3K

coolincy/babelfish repository overview

Babelfish for PostgreSQL is an open source project available under the Apache 2.0 and PostgreSQL licenses. It provides the capability for PostgreSQL to understand queries from applications written for Microsoft SQL Server. Babelfish understands the SQL Server wire-protocol and T-SQL, the Microsoft SQL Server query language, so you don’t have to switch database drivers or re-write all of your application queries. With Babelfish, applications currently running on SQL Server can now run directly on PostgreSQL with fewer code changes.

Babelfish for PostgreSQL是一个开源项目,可在 Apache 2.0 和 PostgreSQL 许可证下使用。它为 PostgreSQL 提供了理解来自为 Microsoft SQL Server 编写的应用程序的查询的功能。Babelfish理解SQL Server wire-protocol和T-SQL、Microsoft SQL Server查询语言,因此您不必切换数据库驱动程序或重写所有应用程序查询。使用 Babelfish,当前在 SQL Server 上运行的应用程序现在可以直接在 PostgreSQL 上运行,只需更少的代码更改。

Make dir for data volume 为数据卷存储创建目录

mkdir -p /data/babelfish15/data
mkdir -p /data/babelfish15/backup
sudo chown 70:70 /data/babelfish15/data
sudo chown 70:70 /data/babelfish15/backup

Run container 运行容器

docker run -d --restart=unless-stopped \
-e "POSTGRES_DB=postgres" \
-e "POSTGRES_USER=postgres" \
-e "POSTGRES_PASSWORD=postgres" \
-p 5432:5432 \
-p 1433:1433 \
-v /data/babelfish15/data:/var/lib/postgresql/data \
-v /data/babelfish15/backup:/var/lib/postgresql/backup \
coolincy/babelfish:15 -u sa -p sapass -d sqlserver -m single-db

-m: database mode, single-db or multi-db

Connect with sqlcmd, user: sa, password: sapass 使用 sqlcmd 连接数据库

sqlcmd -S localhost,1433 -U sa -P sapass

Tag summary

Content type

Image

Digest

sha256:a4f5a0d11

Size

88.3 MB

Last updated

over 2 years ago

docker pull coolincy/babelfish:16.2-4.1.0