Is there any way to implement Always On Availability Groups using SQL Server 2019 Enterprise Edition on a Single Virtual Server.
The goal is not to have any HA or DR capability, but merely Read-Scale as a method to distribute read operations to a second replica. The thought is to have two or more instances on the same virtual server, with each instance having a portion of the RAM assigned based on load experienced for reading vs. writing. The memory for each SQL instance would be less cluttered, and less locking etc would occur, and performance would be expected to improve even with a single server.
Attempting to do this with two instances on the same server, SQL complains in the AG Creation Wizard that the name of the replica node has the same base server name included, even though there are two separate instances. Essentially, it is interpreting the base server name of the instance name as the 'node' (even though the setup for read-scaling does not require WSFC node setup), and thus the replica is not allowed to be created on the same node.
Is there a way around this?
Thanks!
Script I tried without success when instances were on same server:
CREATE AVAILABILITY GROUP [TEST_AG1]
WITH (
AUTOMATED_BACKUP_PREFERENCE = SECONDARY,
DB_FAILOVER = ON,
DTC_SUPPORT = NONE,
CLUSTER_TYPE = NONE
)
FOR DATABASE [Northwind]
REPLICA ON N'ROBSWS2019\SQLA' WITH (
ENDPOINT_URL = N'TCP://ROBSWS2019.AUSTINLANE.local:5022',
FAILOVER_MODE = MANUAL,
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
BACKUP_PRIORITY = 50,
SECONDARY_ROLE(ALLOW_CONNECTIONS = NO)
),
N'ROBSWS2020\SQLB' WITH (
ENDPOINT_URL = N'TCP://ROBSWS2020.AUSTINLANE.local:5022',
FAILOVER_MODE = MANUAL,
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
BACKUP_PRIORITY = 50,
SECONDARY_ROLE(ALLOW_CONNECTIONS = NO)
);
GO