Oracle——17概要文件
生活随笔
收集整理的這篇文章主要介紹了
Oracle——17概要文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
?
概要文件用于限制由用戶使用的系統和數據庫資源,并可以對口令進行管理。如果在創建用戶時沒有指定概要文件,
將使用默認的概要文件。
?
1、使用create profile命令創建概要文件
語法格式如下:
?
create profile profile_name limitresource_parameters | password_parameters;?
?
其中,resource_parameters用來指定資源限制的參數,password_parameters用來指定口令參數。
(1)resource_parameters的語法格式如下:
?
[sessions_per_user integer | unlimited | default] --限制一個用戶并發會話個數*/[cpu_per_session integer | unlimited | default] --限制一次會話的cpu時間,以s/100為單位*/[cpu_per_call integer | unlimited | default] --限制一次調用的cpu時間*/[connect_time integer | unlimited | default] --限制一次會話持續的時間,以min為單位*/[idle_time integer | unlimited | default] --限制一次會話的連續不活動時間,以min為單位*/[logical_reads_per_session integer | unlimited | default] --規定一次會話中讀取數據塊的數目,包括從內存和磁盤中讀取的塊數*/[logical_reads_per_call integer | unlimited | default] --規定處理一個SQL語句一次調用所讀的數據塊的數目*/[composite_limit integer | unlimited | default] --規定一次會話的資源開銷,以服務單位表示該參數值*/[private_sga integer {K|M} | unlimited | default ] --規定一次會話在系統全局區的共享池可分配的私有空間的數目*/?
?
(2)password_parameters的語法格式如下:
?
[failed_login_attempts expression | unlimited | default] --在鎖定賬戶前允許登錄失敗的次數,默認是10次*/[password_life_time expression | unlimited | default] --設置口令的有效期,以天為單位,有效期過后將強制修改密碼,默認180天*/[password_reuse_time expression | unlimited | default] --規定口令不被重復使用的天數,默認無限制*/[password_reuse_max expression | unlimited | default] --規定口令被重新使用前需要更改口令的次數,默認無限制*/[password_lock_time expression | unlimited | default] --指定由于多次登錄失敗而鎖定賬戶的天數,默認1天*/[password_grace_time expression | unlimited | default] --設定口令的過期寬限時間,單位為天,默認7天*/[password_verify_function functionName | null | default] --使用function來校驗口令的復雜度,null表示沒有校驗*/?
?
示例代碼:
?
create profile myprofile limitpassword_login_attempts 5password_lock_time 5;alter user hello profile myprofile;?
?
說明:
上述代碼建立了一個名為myprofile的概要文件,并把它提供給用戶hello使用,該文件指明如果用戶hello連續5次登錄失敗,則用戶hello將被鎖定5天。
?
2、使用alter profile命令修改概要文件
語法格式如下:
?
alter profile profile_name limitresource_parameters | password_parameters;?
示例代碼:
修改概要文件myprofile,設定口令過期寬限時間為10天,設定每60天修改一次密碼,代碼如下:
?
alter profile myprofile limitpassword_grace_time 10password_life_time 60;?
?
3、使用drop profile命令刪除概要文件
語法格式如下:
?
drop profile profile_name;?
例如,刪除概要文件myprofile如下:
?
drop profile myprofile;?
轉載于:https://my.oschina.net/NEMOCoder/blog/608976
總結
以上是生活随笔為你收集整理的Oracle——17概要文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ssh无密码登录设置(centos6系统
- 下一篇: mybatis 做 insert操作的时