上午刚上班,一同事跑过来说,昨天夜里将数据割接到RAC数据库,上午应用跑一会儿就自动断开,以前单实例跑很正常。
通过查找学习,找到如下两种解决方法:
方法一、直接修改资源配置文件
分三个步骤在sqlplus环境下完成。
第一步,查询资源文件,找到connect_time所在的profile名。
select resource_name,profile from dba_profiles;
第二步,用alter命令修改profile中的值:
alter profile MONITORING_PROFILE limit connect_time unlimited;
(或跟一个时间值,如1000,单位为分钟)
alter profile MONITORING_PROFILE limit idle_time unlimited;
第三步,用如下命令查看profile中的值:
select resource_name,limit from dba_profile where profile='MONITORING_PROFILE';
方法二:通过创建资源配置文件并进行用户分配来完成
分三个步骤在sqlplus环境下完成。【该方法不对其它数据库连接用户产生影响】
第一步,查看并修改resource_limit的状态。
sql>show parameter resource_limit;如果为false,则将其修改为true,否则配置不会生效;
sql>alter system set resource_file=true;
第二步,用create profile命令创建一个新的profile文件:
create profile test_profile limit connect_time unlimited idle_time unlimited;
第三步,将这个新的配置文件分配给该用户:
sql>alter user root_qy profile test_profile;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22969361/viewspace-1242119/
,如需转载,请注明出处,否则将追究法律责任。