Skip to content

Connection Issue with SQL Server on AWS RDS Using SSMS

0

I have created a private database on AWS RDS(SQL Server) with the following specifications:

Engine: SQL Server Express Edition Class: db.t3.micro Instance Type: t3.micro Additionally, I have set up an EC2 instance as public with key pairs, using Amazon Linux (Linux/UNIX).

I can connect successfully with DBeaver using tunnel, but the issue I'm facing is that I cannot connect to my RDS database using SQL Server Management Studio (SSMS), I was connected successfully with SSH tunnel using PuTTY, but when I'm trying to connect it in SSMS the message error is: TITLE: Connect to Server Cannot connect to localhost. ADDITIONAL INFORMATION: Login failed for user 'admin'. (Microsoft SQL Server, Error: 18456)

Note: I use the same username and password in DBeaver. Could someone please help me troubleshoot and resolve this connection issue?

1 Answer
0

Based on the information provided, it appears that you're encountering a connection issue when trying to connect to your AWS RDS SQL Server instance using SQL Server Management Studio (SSMS) through an SSH tunnel. Here are some steps to troubleshoot and potentially resolve the issue:

  1. Verify connection details: Ensure that you're using the correct server name in SSMS. The server name should be the DNS name (endpoint) of your RDS instance, followed by a comma and the port number (usually 1433 for SQL Server). For example: database-name.abcdefghijk.us-east-1.rds.amazonaws.com,1433

  2. Authentication method: Make sure you're using "SQL Server Authentication" in SSMS, not Windows Authentication.

  3. Username and password: Double-check that you're using the correct master username and password for your RDS instance. Since you mentioned that you can connect successfully with DBeaver, ensure you're using the exact same credentials in SSMS.

  4. Security group settings: Verify that the security group associated with your RDS instance allows inbound traffic on port 1433 from your EC2 instance's security group or IP address.

  5. Network connectivity: Ensure that your EC2 instance (which you're using as a jump box) has network connectivity to the RDS instance. Check that both are in the same VPC or have proper routing set up between them.

  6. SSH tunnel configuration: Confirm that your SSH tunnel is correctly set up in PuTTY. The local port should forward to the RDS instance's endpoint and port.

  7. Firewall settings: Check if there are any firewall settings on your local machine or the EC2 instance that might be blocking the connection.

If you've verified all these points and are still encountering issues, you may want to check the RDS instance's logs for any specific error messages or consult AWS support for further assistance.

Remember that connecting to a private RDS instance typically requires being within the same VPC or using a VPN/Direct Connect. Using an EC2 instance as a jump box with an SSH tunnel is a common workaround, but it requires careful configuration to ensure proper connectivity.
Sources
Troubleshooting connections to your SQL Server DB instance - Amazon Relational Database Service
Connecting to your DB instance with Microsoft SQL Server Management Studio - Amazon Relational Database Service

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.