Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Mirroring - Endpoint setup with multiple SQL instances

I currently have 2 SQL Servers: SQL01 and SQL02. Each of these servers have two instances: SQL01\Prod, SQL01\uat, SQL02\prod and SQL02\uat

I currently have mirroring setup between SQL01\uat and SQL02\uat, this is working fine.

Now that we are moving out of testing we want to setup the prod instance. But we are having trouble setting up the mirroring in prod, the error is something akin to cannot find the remote database.

It appears that each server has a single endpoint port.

Is it possible to create a mirroring endpoint per instance. For example so that SQL01\uat has a port of 5022 and SQL01\prod has a port of 5023?

like image 563
Dave F Avatar asked Jul 20 '26 21:07

Dave F


1 Answers

Yes, you can specify the TCP port when creating the endpoint:

CREATE ENDPOINT endpoint_mirroring
    STATE = STARTED
    AS TCP ( LISTENER_PORT = 5022)
    FOR DATABASE_MIRRORING (
       AUTHENTICATION = WINDOWS KERBEROS,
       ENCRYPTION = SUPPORTED,
       ROLE=ALL);
GO
like image 89
Mark Storey-Smith Avatar answered Jul 23 '26 00:07

Mark Storey-Smith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!