Windows: How to connect instance to instance, by instance name?

We are trying to configure SQL Server replication and it specifically requires using the instance name, not the DNS name. When we try and connect to the publishing instance, it can not locate it. How do we configure our network and/or instances to allow us to do this?

Edit: Everything is in the same region, subnet and VPC.


Related discussions:

Ensure that the security group has a rule to allow the specific communication. Also are the machines domain joined and what’s the DNS setup?

Wide open for every instance in the security group. The machines are domain joined although we’re using the AWS version of AD, not the Microsoft version. DNS is using the same two IP numbers.

Have you set the server name for the SQL service? I’ve just been through this a few weeks ago. The error that shown up leaded me step by step to work through this. I experienced the same as you.

So are u using route53?

The DNS it is pointing to is internal (172.x.x.x). Isn’t Route 53 for external?

I thought that SQL Server took on the name of the server? When we connect via SSMS locally, we’re using the instance name and it connects as would be expected. I did a SELECT @@SERVERNAME and it returns the correct server name. We have not changed the name of the instance which I know can cause problems.

If you associate a r53 hosted zone with the VPC it will be used for internal

Let me check that out!

Netbios Names require broadcast which isnt supported in VPC

So how does one use replication (within EC2)? I would think that this would be a show stopper for people if they couldn’t use replication.

Look into the nic properties. AWS appends their own domain automatically to hostname-based lookups. Go in there and remove theirs and add yours if it’s missing. It’s in the advanced ipv4 properties.

Use the hobo way and modify both servers host files.

Man, you should be using DMS/RDS, if possible. Using an EC2 instance for this is possible but is only ideal for certain specific situations.

Basically, it’s not clear what you’re setting replication up to support so it’s hard to be certain if it even makes sense for you to do this.

I had to start it. Besides I had to create admin user that are matched on both servers. And of course the security group must allow connection between the servers.

Mirroring or Always On.

Also vpc internal dns names otherwise if these boxes are domain joined use your own dns.

https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html

Is there a guide you followed? I’m curious how you found it.

Recently I made a 3 node replication server using EC2 instances 2 postgresql 1 monitor node and just set up a VPC using 3 availability zones and attached a elastic IP to the internet gateway. Didn’t think about using the built in systems and would be good to get some perspective on that.