Greetings.
I have a particular server configured as follows:
- DB1 -- this guy is the Subscriber of a transaction replication topology.
- DB2 -- this guy is a Data Warehouse (using that term loosely). If queries data from DB1, as well as other sources regularly during the day. It mashes that data up, and Power BI then comes along every few hours to use for reports.
When DB2 gets too busy, it can cause replication latency delays. The biggest resource contention there by far is RAM. I've implemented Resource Governor -- the goal is to make sure DB2 doesn't cause these issues. It uses 4 main logins for processing, which is what I used to create my classifier function. However, Ive never used this before -- can someone please tell me if I've got it configured correctly to accomplish my goals?
Thanks!
USE [master]
GO
/****** Object: WorkloadGroup [groupSURep] Script Date: 9/18/2024 10:44:58 AM ******/
CREATE WORKLOAD GROUP [groupSURep] WITH(group_max_requests=0,
importance=Medium,
request_max_cpu_time_sec=0,
request_max_memory_grant_percent=25,
request_memory_grant_timeout_sec=0,
max_dop=0) USING [poolSURep], EXTERNAL [default]
GO
USE [master]
GO
/****** Object: ResourcePool [poolSURep] Script Date: 9/18/2024 10:44:29 AM ******/
CREATE RESOURCE POOL [poolSURep] WITH(min_cpu_percent=0,
max_cpu_percent=100,
min_memory_percent=0,
max_memory_percent=70,
cap_cpu_percent=70,
AFFINITY SCHEDULER = AUTO
,
min_iops_per_volume=0,
max_iops_per_volume=0)
GO
CREATE FUNCTION Class_funct() RETURNS SYSNAME WITH SCHEMABINDING
AS
BEGIN
DECLARE @workload_group sysname;
IF ( SUSER_SNAME() = 'domain\thisGuy')
SET @workload_group = 'groupSURep';
IF ( SUSER_SNAME() = 'domain\thatGuy')
SET @workload_group = 'groupSURep';
IF ( SUSER_SNAME() = 'domain\theOtherGuy')
SET @workload_group = 'groupSURep';
IF ( SUSER_SNAME() = 'domain\theLastGuy')
SET @workload_group = 'groupSURep';
RETURN @workload_group;
END;