All Products
Search
Document Center

PolarDB:PolarPlus

Last Updated:Aug 26, 2026

PolarPlus is an Oracle-compatible client for PolarDB.

Download the client

PolarPlus is provided as a compressed package and does not require installation. To use it on Linux, download and decompress the package. The directory structure of the decompressed folder is shown below. The polarplus file is the executable file. If you add the path of the polarplus_release/ directory to the system PATH, you can run the polarplus command.

polarplus_release
├── polarplus -> ./polarplus.sh
├── polarplus.sh
├── polarplus.jar
├── login.sql
├── etc
│ └── sysconfig
├── help
└── lib

PolarPlus usage instructions

Introduction

PolarPlus is a command-line user interface utility for PolarDB. It supports SQL commands, PolarPlus commands, PL/SQL anonymous blocks, functions, and stored procedures. The tool provides the following features:

  • Query specific database objects.

  • Execute stored procedures.

  • Format the output of SQL commands.

  • Execute batch scripts.

  • Execute operating system commands.

  • Record output.

Differences from native tools

PolarPlus is designed for PolarDB and supports the common features of the Oracle SQLPlus tool.

Note

You can use PolarDB-Tools to manage PolarDB clusters. This toolset is designed for PolarDB for PostgreSQL (Compatible with Oracle). The psql tool provided in the toolset supports PL/SQL anonymous blocks, functions, and stored procedures that use Oracle syntax.

Configure PolarPlus

Note

The PolarPlus tool has the following dependencies:

  • Java Development Kit (JDK) 1.8 environment (x64).

  • OpenSSL version 1.1 (x64).

  1. Use the wget command to download and decompress PolarPlus. For the download link, see Download the client.

  2. Open the polarplus.sh file.

  3. Modify export base="{pwd}/polarplus" and replace {pwd} with the absolute path of the polarplus directory.

  4. Use the following command on the server to invoke PolarPlus:

    polarplus [ -S[ILENT ] ] [ login | /NOLOG ] [ @scriptfile[.ext ] ]

    Parameter

    Description

    -S[ILENT ]

    If specified, this parameter suppresses the PolarPlus logon banner and all prompts.

    login

    The logon information used to connect to the database server and database.

    The logon information uses the following format:

    username[/password][@{connectstring | variable } ]

    For more information, see Logon information.

    variable is a variable defined in the login.sql file. This file contains the database connection string.

    /NOLOG

    If you start PolarPlus with /NOLOG specified, a database connection is not established when PolarPlus starts. Do not use this mode to connect to a database to use SQL commands or PolarPlus commands.

    Note

    After starting PolarPlus with the /NOLOG option, you can use the CONNECT command to connect to a database.

    scriptfile[.ext ]

    scriptfile is the name of a file in the current working directory. The file contains SQL commands and PolarPlus commands that are automatically executed after PolarPlus starts.

    .ext is the file name extension. If the file name extension is sql, you can omit the .sql extension when you specify the script file. Name the script file with an extension when you create it. Otherwise, PolarPlus cannot access the file.

    Note

    PolarPlus always uses the .sql extension for file names that do not have an extension specified.

    Table 1. Logon information

    Parameter

    Description

    username

    The database username used to connect to the database.

    password

    The password associated with the specified username.

    connectstring

    A database connection string with the following format:

    host[:port][/dbname][?ssl={true | false}]
    • host is the hostname or IP address of the database server.

      Note

      If connectstring, variable, or NOLOG is not specified, the default host is the local host.

    • If you connect using an IPv6 address, the IP address must be enclosed in square brackets.

      The following is an example of a connection using an IPv6 address:

      polarplus  polardb/password@[fe80::20c:29ff:fe7c:78b2]:5444/polardb
    • port is the port number that accepts connections on the database server.

      Note

      If not specified, the default value is 5444.

    • dbname is the name of the database to connect to.

      Note

      If not specified, the default value is polardb.

    • If an SSL connection is required, include the ?ssl=true parameter in the connection string. The connection string must contain host:port. If the SSL parameter is not specified, the default value is false.

    The following is a connection example:

    polarplus  polardb/password@pc-bp1zxxxxxxxxxxx.o.polardb.rds.aliyuncs.com:1521/polardb
    Note

    PolarPlus is used to connect only to version 1.0 of PolarDB for PostgreSQL (Compatible with Oracle). To connect to version 2.0 of PolarDB for PostgreSQL (Compatible with Oracle), download PolarPlus2. Its directory structure and usage are similar to those of PolarPlus. Simply replace polarplus with polarplus2 in directories and commands.