Help Center/ TaurusDB_TaurusDB for PostgreSQL/ User Guide/ Instance Connection/ Connecting to a TaurusDB for PostgreSQL Instance Through sqlcmd
Updated on 2025-11-14 GMT+08:00

Connecting to a TaurusDB for PostgreSQL Instance Through sqlcmd

sqlcmd is a command-line tool that allows you to run T-SQL statements, system procedures, and scripts in SQL Server databases.

Prerequisites

  • You have purchased a TaurusDB for PostgreSQL instance.
  • You have enabled Babelfish.

Procedure

  1. Install the sqlcmd CLI client.

    For details, see the SQL Server official documentation (Download and install sqlcmd).

  2. Use sqlcmd to run the following command to connect to a database:

    1
    sqlcmd -S <host>,<port> -U <login> -P <password> -d <database>
    
    Table 1 Parameter description

    Parameter

    Description

    <host>

    Private IP address of an instance.

    <port>

    Database port. The default value is 1433.

    <database>

    Name of the Babelfish database to be connected.

    <login>

    Login name of the Babelfish user.

    <password>

    Password associated with the user.