_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › ResourceGovernor

Contents

1 谿瑚襭


1 谿瑚襭 #

--adhoc query襯  resource pool
create resource pool readeradhocpool
with
(
 min_cpu_percent=25, max_cpu_percent=50,
 min_memory_percent=25, max_memory_percent=50
)
go

--workload group to be used by reader login
create workload group readeradhogroup
    using readeradhocpool ;
go


use master;
go
create function dbo.resource_classifier() 
returns sysname 
with schemabinding
as
begin
	declare @workloadgroup as sysname
	
	if (suser_name() = 'reader')
		set @workloadgroup = 'readeradhogroup'
--	else if (suser_name() = 'reportuser')
--		set @workloadgroup = 'reportgroup'
	else 
		set @workloadgroup = 'default'

	return @workloadgroup
end
go

alter resource governor 
with (classifier_function=dbo.resource_classifier);
go
alter resource governor reconfigure
go
--alter resource governor disable
--go
alter resource governor reset statistics
go
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

螳 覯 螳 譬 覦覯 殊殊 酔 螳 蠏豺 蟆 狩 蟆企. (C. )