Oracle 17概要檔案

2021-06-26 14:43:34 字數 2580 閱讀 7365

概要檔案用於限制由使用者使用的系統和資料庫資源,並可以對口令進行管理。如果在建立使用者時沒有指定概要檔案,

將使用預設的概要檔案。

1、使用create profile命令建立概要檔案

語法格式如下:

create profile profile_name limit

resource_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 | 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 limit

password_login_attempts 5

password_lock_time 5;

alter user hello profile myprofile;

說明:

上述**建立了乙個名為myprofile的概要檔案,並把它提供給使用者hello使用,該檔案指明如果使用者hello連續5次登入失敗,則使用者hello將被鎖定5天。

2、使用alter profile命令修改概要檔案

語法格式如下:

alter profile profile_name limit

resource_parameters | password_parameters;

示例**:

修改概要檔案myprofile,設定口令過期寬限時間為10天,設定每60天修改一次密碼,**如下:

alter profile myprofile limit

password_grace_time 10

password_life_time 60;

3、使用drop profile命令刪除概要檔案

語法格式如下:

drop profile profile_name;
例如,刪除概要檔案myprofile如下:

drop profile myprofile;

Oracle 17概要檔案

概要檔案用於限制由使用者使用的系統和資料庫資源,並可以對口令進行管理。如果在建立使用者時沒有指定概要檔案,將使用預設的概要檔案。1 使用create profile命令建立概要檔案 語法格式如下 create profile profile name limit resource parameter...

oracle概要檔案

connect sys 12345678 as sysdba 使用概要檔案 建立乙個概要檔案,僅用於限制使用者對一下資源的使用 1.不限制使用者建立的併發會話數 2.每個會話中,不限制使用者使用的cpu時間 3.單個會話中的持續時間不能超過三小時 4.會話中的持續空閒時間不能超過5min 5.單個會...

Oracle(17)如何管理許可權和角色

系統許可權主要指對資料庫管理的操作以及對資料物件的操作 建立 刪除 修改 物件許可權主要指對資料物件的操作 curd 角色本質就是多個許可權的集合,用於簡化對許可權的管理,分為預定義角色和自定義角色。剛剛建立的使用者,沒有任何許可權,也不能執行任何操作。如果要執行某種特定的資料庫操作,必須為其授予系...