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;
  • 相关阅读:
    bzoj1529: [POI2005]ska Piggy banks
    BZOJ 3065 带插入区间K小值
    【BZOJ做题记录】07.07~?
    【BZOJ2882】【字符串的最小表示】工艺
    【不能继续浪啦】BZ做题记录[7.01~7.06]
    第一次到zhzx到今天已经一周年了
    BestCoder Round #45
    BestCoder Round #41 记。
    BZOJ做题记录[0512~?]
    [BZOJ2809&1455&1367]解题报告|可并堆
  • 原文地址:https://www.cnblogs.com/smthts/p/2918593.html
Copyright © 2011-2022 走看看