sql data link test successful still can't connect to named instance after migration to AWS

0

We are in the process of migrating to AWS and during the ready for testing we are unable to connect to a named SQL database instance.

No firewalls are blocking ports 1433 or 1434. Using Data Link Properties Test Connection, we can connect to the server. If we add the named instance to the test it fails with the error below. Microsoft Data Link Error

The same source server is functioning perfectly in the original VMWare hosted environment.

2 Answers
0

The issue you're experiencing with connecting to a named SQL database instance after migrating to AWS, despite successful Data Link Properties Test Connection to the server, could be related to several factors:

  1. SQL Server Browser Service: Ensure that the SQL Server Browser service is running on the AWS instance. This service is crucial for connecting to named instances as it helps direct client connections to the correct port for the named instance.

  2. UDP Port 1434: While you've mentioned that ports 1433 and 1434 are not blocked by firewalls, double-check that UDP port 1434 is specifically open. The SQL Server Browser service uses this UDP port to respond to client requests for named instance information.

  3. Dynamic Ports: Named instances often use dynamic ports. Verify that the named instance is not using a dynamic port that might be blocked. You can check the port used by the named instance in SQL Server Configuration Manager.

  4. Security Groups: If you're using Amazon EC2, ensure that the security group associated with your instance allows inbound traffic on the necessary ports, including the dynamic port if used by the named instance.

  5. Windows Firewall: Even if no external firewalls are blocking the ports, check the Windows Firewall on the AWS instance to ensure it's not preventing connections.

  6. Network Configuration: Verify that the network configuration in AWS (VPC, subnets, route tables) allows for the necessary communication between your client and the SQL Server instance.

  7. SQL Server Configuration: Check the SQL Server configuration to ensure it's set up to allow remote connections and that the named instance is configured correctly after the migration.

  8. Connection String: Ensure your connection string is correctly formatted for connecting to a named instance in the AWS environment. It might need to include the full DNS name of the instance along with the instance name.

If these steps don't resolve the issue, you may need to investigate further by checking SQL Server error logs and Windows event logs for any specific error messages related to connection attempts.

Sources
Resolve connection errors after migrating Microsoft SQL Server to the AWS Cloud - AWS Prescriptive Guidance
Troubleshooting connections to your SQL Server DB instance - Amazon Relational Database Service
AWS DMS - Replication instance cannot connect to the rds | AWS re:Post

profile picture
answered a month ago
0

You were not stating if your using RDS or an EC2 to run SQL Server? If its RDS, then I dont believe AWS RDS MS SQL Supports named instances unless its a "Custom" install which isnt recommended.

If RDS, then you will need to connect to the Default instance of the SQL Server using either the Endpoint hostname or the recommened Listener Endpoint if using AG's

profile picture
EXPERT
answered a month 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.

Guidelines for Answering Questions