EBS中如何后台批量更改Profiles的值
(版权声明,本人原创或者翻译的文章如需转载,如转载用于个人学习,请注明出处;否则请与本人联系,违者必究)
自己写来管理自己负责维护的EBS instance,经常有人设置了一些调试用的profile忘记关闭,结果导致服务器性能变差,可用空间变小,所以写了这个脚本。
1.如果要增加修改的profile, 需要同时在l_profNames 增加变量名, 在 l_profNewVal增加变量值。
2.l_profSpeUser, 如果只更改一个用户的profile值,就需要设置这个用户名,必须大写,而且这个值拥有最高优先级。
3.l_profSpeResp, 如果只更改一个职责的profile值,就需要设置这个职责名,而且这个值拥有第二高优先级。
4.l_profSpeApp, 如果只更改一个应用的profile值,就需要设置这个用户名,必须大写,而且这个值拥有第三最高优先级。
5.如果即不指明用户,职责和应用,那就对所有层次更新所有层次的profiles。
6.l_profExceptUser, 如果对所有层次更新profiles,那么这里指定的用户会被忽略,不会被更新,用户名要大写。
7.l_profIncludeSite,如果对所有层次更新profiles的时候,这个变量指明会不会更新站点层次的值。'N'是不更新,'Y'是更新。
/**
* Batch update profile values from back end. Mainly used to
* enable/disable debug profiles on dev instance
* Author:tavor
* Date:2014-01-08
* Revision:1
*******************************************************************************************
**** IF YOU ARE NOT INSTANCE OWNER/ADMINISTRATOR, PLEASE BE CAREFUL TO RUN THIS SCRIPT*****
*******************************************************************************************
* 1.If need to add more profile, need to specify profile name in l_profNames
* and new value in l_profNewVal.
* 2.l_profSpeUser is the user we just update profile for him/her, and this has highest priority.
* 3.l_profSpeResp is the resp we just update profile for it, and this has less higher priority.
* 4.l_profSpeApp is the App we just update profile for it, and this has less the third high priority.
* 5.If l_profSpeUser, l_profSpeResp and l_profSpeApp are all null, then we will update profiles for
* all resp, user and app level.
* 6.l_profExceptUser, If we update profiles for all levels, we wil