Chinaunix首页 | 论坛 | 博客
  • 博客访问: 22811
  • 博文数量: 13
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2014-10-24 10:02
个人简介

Preparing to success.

文章分类

全部博文(13)

文章存档

2015年(1)

2014年(12)

我的朋友

分类: 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




阅读(473) | 评论(0) | 转发(0) |
0

上一篇:Sybase reorg

下一篇:ssh等效性-无密码登录

给主人留下些什么吧!~~