zoukankan      html  css  js  c++  java
  • oracle sga修改以及限制某一个用户的连接数的方法【自己整理】

    show parameter sga_max_size; --查看sga最大多少
    show parameter sga_target; --查看sga_target 
    
    SQL> show sga
    show parameter sga_max_size; --查看sga最大多少
    show parameter sga_target; --查看sga_target 
    
    SQL> show sga 
      Total System Global Area 2602007792 bytes 
      Fixed Size 740592 bytes 
      Variable Size 335544320 bytes 
      Database Buffers 2264924160 bytes 
      Redo Buffers 798720 bytes 
      SQL> alter system set sga_max_size=500m scope=spfile; 
             System altered.  
             alter system set sga_target=500m scope=spfile; 
      System altered. 
      SQL> shutdown immediate; 
      SQL> startup 
      SQL> show sga 
      Total System Global Area 5252811728 bytes 
      Fixed Size 744400 bytes 
      Variable Size 2986344448 bytes 
      Database Buffers 2264924160 bytes 
      Redo Buffers 798720 bytes
    
    
    限制用户连接数:
    
    先创建一个PROFILE
    
    create  profile ses_conn limit sessions_per_user n;  n为最大连接数。
    
    
    
    然后将该PROFILE付给需要限制的用户。alter user xxx profile ses_conn;
    
    
    
    最后别忘了确认RESOURCE_LIMIT参数已设为TRUE。
    
    如果没有,用
    alter system set resource_limit=TRUE;
    
    
    如果要删除限制,删除Profile即可
    
    drop profile ses_conn cascade; 
      Total System Global Area 2602007792 bytes   Fixed Size 740592 bytes   Variable Size 335544320 bytes   Database Buffers 2264924160 bytes   Redo Buffers 798720 bytes   SQL> alter system set sga_max_size=500m scope=spfile; System altered. alter system set sga_target=500m scope=spfile;   System altered.   SQL> shutdown immediate;   SQL> startup   SQL> show sga   Total System Global Area 5252811728 bytes   Fixed Size 744400 bytes   Variable Size 2986344448 bytes   Database Buffers 2264924160 bytes   Redo Buffers 798720 bytes 限制用户连接数: 先创建一个PROFILE create profile ses_conn limit sessions_per_user n; n为最大连接数。 然后将该PROFILE付给需要限制的用户。alter user xxx profile ses_conn; 最后别忘了确认RESOURCE_LIMIT参数已设为TRUE。 如果没有,用 alter system set resource_limit=TRUE; 如果要删除限制,删除Profile即可 drop profile ses_conn cascade;
  • 相关阅读:
    conda配置文件.condarc
    conda--python环境管理工具
    angular引入UEditor
    spark-MD5文件MD5加密
    js数组切片
    Window.postMessage() 解决父页面与iframe之间跨域通信问题,实时获取iframe消息动态
    博客园自定义主题
    html-标签转义-反转义
    uni-app获取通讯录信息 获取手机号
    LeetCode第243场周赛
  • 原文地址:https://www.cnblogs.com/smthts/p/2918593.html
Copyright © 2011-2022 走看看