Preparing to success.
分类: Sybase
2014-12-26 18:23:10
master..sysresourcelimits基于用户的资源限制。
select * from master..sysresourcelimits 等价于sp_help_resource_limit
name——login name
appname——app name
rangeid——systimeranges.id
limitvalue——spt_limit_types.id
enforced——spt_limit_types.enforced
1——before run
2——during run
3——both
actiontotake
1——alert
2——stop query batch
3——stop tran
4——cancel session
scope
1——query
2——batch query
4——tran
spare——reserve
---------------------------------------------
select * from spt_limit_types
name id enforced object_type scope units
---- ----- ---- ------- -----
io_cost 1 3 1 1 derived from optimizer's costing formula
elapsed_time 2 2 1 6 in seconds
row_count 3 2 1 1 # of row returned to client
tempdb_space 4 2 1 1 in pages
------------------------------------------------
select * from systimeranges
name id startday endday starttime endtime
---- ----------- ----------- ----------- --------- -------
at all times 1 1 7 00:00 00:00
select 'exec sp_add_resource_limit '+ name+" ,null,'at all times',io_cost,1000000,2,1,1" from syslogins where suid >10
select 'exec sp_add_resource_limit '+ name+" ,null,'at all times',row_count,1000,2,1,1" from syslogins where suid >10
select 'exec sp_add_resource_limit '+ name+" ,null,'at all times',tempdb_space,51200,2,1,1" from syslogins where suid >10
sp_modify_resource_limit jinl,null,'at all times',io_cost,5000000,2,4,1,0