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;
  • 相关阅读:
    mysql获取当前时间,及其相关操作
    notepad++ 样式随我变!
    MySQL索引的创建、删除和查看
    so easy 的弹出层——使用jquery
    mysql获取当前时间,及其相关操作
    侯捷大师畅谈技术人生与读书感悟
    《海量数据库解决方案》之聚簇表的代价
    博文视点大讲堂第44期——招聘真相全揭秘 圆满结束
    程序员修炼道路上的“葵花宝典”——博文视点大讲堂42期快乐结束
    众专家推荐
  • 原文地址:https://www.cnblogs.com/smthts/p/2918593.html
Copyright © 2011-2022 走看看