Using a SQL Server client to connect to your DB cluster - Amazon Aurora
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Using a SQL Server client to connect to your DB cluster

You can use a SQL Server client to connect with Babelfish on the TDS port. As of Babelfish 2.1.0 and higher releases, you can use the SSMS Object Explorer or the SSMS Query Editor to connect to your Babelfish cluster.

Limitations
  • In Babelfish 2.1.0 and older versions, using PARSE to check SQL syntax doesn't work as it should. Rather than checking the syntax without running the query, the PARSE command runs the query but doesn't display any results. Using the SMSS <Ctrl><F5> key combination to check syntax has the same anomalous behavior, that is, Babelfish unexpectedly runs the query without providing any output.

  • Babelfish doesn't support MARS (Multiple Active Result Sets). Be sure that any client applications that you use to connect to Babelfish aren't set to use MARS.

  • For Babelfish 1.3.0 and older versions, only the Query Editor is supported for SSMS. To use SSMS with Babelfish, be sure to open the Query Editor connection dialog in SSMS, and not the Object Explorer. If the Object Explorer dialog does open, cancel the dialog and re-open the Query Editor. In the following image, you can find the menu options to choose when connecting to Babelfish 1.3.0 or older versions.

    
						Connecting to a Babelfish database with SSMS if Object Explorer doesn't work.

For more information about interoperability and behavioral differences between SQL Server and Babelfish, see Differences between Babelfish for Aurora PostgreSQL and SQL Server.

Using sqlcmd to connect to the DB cluster

You can connect to and interact with an Aurora PostgreSQL DB cluster that supports Babelfish by only using version 19.1 and earlier SQL Server sqlcmd command line client. SSMS version 19.2 isn't supported to connect to a Babelfish cluster. Use the following command to connect.

sqlcmd -S endpoint,port -U login-id -P password -d your-DB-name

The options are as follows:

  • -S is the endpoint and (optional) TDS port of the DB cluster.

  • -U is the login name of the user.

  • -P is the password associated with the user.

  • -d is the name of your Babelfish database.

After connecting, you can use many of the same commands that you use with SQL Server. For some examples, see Getting information from the Babelfish system catalog.

Using SSMS to connect to the DB cluster

You can connect to an Aurora PostgreSQL DB cluster running Babelfish by using Microsoft SQL Server Management Studio (SSMS). SSMS includes a variety of tools, including the SQL Server Import amd Export Wizard discussed in Migrating a SQL Server database to Babelfish for Aurora PostgreSQL. For more information about SSMS, see Download SQL Server Management Studio (SSMS) in the Microsoft documentation.

To connect to your Babelfish database with SSMS
  1. Start SSMS.

  2. Open the Connect to Server dialog box. To continue with the connection, do one of the following:

    • Choose New Query.

    • If the Query Editor is open, choose Query, Connection, Connect.

  3. Provide the following information for your database:

    1. For Server type, choose Database Engine.

    2. For Server name, enter the DNS name. For example, your server name should look similar to the following.

      cluster-name.cluster-555555555555.aws-region.rds.amazonaws.com,1433
    3. For Authentication, choose SQL Server Authentication.

    4. For Login, enter the user name that you chose when you created your database.

    5. For Password, enter the password that you chose when you created your database.

    
							Connecting to a Babelfish database with SSMS.
  4. (Optional) Choose Options, and then choose the Connection Properties tab.

    
							Connecting to a Babelfish database in SSMS.
  5. (Optional) For Connect to database, specify the name of the migrated SQL Server database to connect to, and choose Connect.

    If a message appears indicating that SSMS can't apply connection strings, choose OK.

    If you are having trouble connecting to Babelfish, see Connection failure.

    For more information about SQL Server connection issues, see Troubleshooting connections to your SQL Server DB instance in the Amazon RDS User Guide.