|
- PASSWORD_REUSE_TIME: Specifies that a user cannot reuse a password for a given number of days
- PASSWORD_REUSE_MAX: Specifies the number of password changes that are required before the current password can be reused
复制代码
以上两个在图形界面有BUG:
- [oracle@station90 oradata]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 2 19:24:23 2018
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected to an idle instance.
- SQL> startup
- ORACLE instance started.
- Total System Global Area 6664212480 bytes
- Fixed Size 2240944 bytes
- Variable Size 3674213968 bytes
- Database Buffers 2969567232 bytes
- Redo Buffers 18190336 bytes
- Database mounted.
- Database opened.
- SQL> alter user user1 identified by oracle_4U;
- User altered.
- SQL> alter user user1 identified by oracle_4U;
- alter user user1 identified by oracle_4U
- *
- ERROR at line 1:
- ORA-28007: the password cannot be reused
- SQL>
复制代码
设置完以上这一对参数后,不管是SYS还是他本人,第一次都可以修改成oracle_4U一次(存入旧密码),之后都会同时遵守以上两个参数。
- [oracle@station90 admin]$ pwd
- /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin
- [oracle@station90 admin]$ ls -l utlpw*
- -rw-r--r-- 1 oracle oinstall 11555 8月 13 2006 utlpwdmg.sql
- [oracle@station90 admin]$ cp utlpwdmg.sql /home/oracle/v1.sql
- [oracle@station90 admin]$ cp utlpwdmg.sql /home/oracle/v2.sql
复制代码
- select s.audit_option from dba_stmt_audit_opts s
- minus
- select p.privilege from dba_priv_audit_opts p;
复制代码 | AUDIT_OPTION | 1 | DATABASE LINK | 2 | PROFILE | 3 | PUBLIC SYNONYM | 4 | ROLE | 5 | SYSTEM AUDIT | 6 | SYSTEM GRANT |
- select * from dba_priv_audit_opts;
- select * from dba_obj_audit_opts;
- select s.audit_option from dba_stmt_audit_opts s
- minus
- select p.privilege from dba_priv_audit_opts p;
- noaudit CREATE SESSION;
- audit create session by hr by access whenever successful;
复制代码- select * from dba_common_audit_trail order by 6 desc ;
- select * from dba_tables t where t.owner='SYS' and t.table_name='AUD
- ;
- truncate table aud$;
- create tablespace tbsaudit datafile '/u01/app/oracle/oradata/orcl/tbsaudit.dbf' size 30M
- reuse autoextend on;
-
- alter table aud$ move tablespace tbsaudit;
-
- audit select on hr.employees by access whenever successful;
-
- select * from dba_obj_audit_opts;
-
- select * from dba_common_audit_trail
- where db_user='HR' order by 6 desc ;
- select * from v$xml_audit_trail;
复制代码- select * from dba_audit_policies;
- noaudit select on hr.employees;
- begin
- dbms_fga.add_policy (
- object_schema => 'HR',
- object_name => 'EMPLOYEES',
- policy_name => 'audit_emps_salary',
- audit_condition=> 'department_id=20',
- audit_column => 'SALARY,COMMISSION_PCT',
- enable => TRUE,
- statement_types => 'SELECT,UPDATE',
- audit_column_opts => dbms_fga.ALL_COLUMNS
- );
- end;
-
- select * from dba_common_audit_trail
- where db_user='HR' order by 6 desc ;
复制代码- begin
- dbms_fga.add_policy (
- object_schema => 'HR',
- object_name => 'EMPLOYEES',
- policy_name => 'audit_emps_salary2',
- audit_condition=> 'department_id=20',
- audit_column => 'SALARY,COMMISSION_PCT',
- enable => TRUE,
- statement_types => 'SELECT,UPDATE',
- audit_column_opts => dbms_fga.ALL_COLUMNS,
- audit_trail => dbms_fga.XML+dbms_fga.EXTENDED
- );
- end;
复制代码- SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 2 21:49:14 2018
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- SQL> conn hr/oracle_4U@orcl
- Connected.
- SQL> insert into t05211_a values ( 8) ;
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL> update t05211_a set a=9 ;
- 1 row updated.
- SQL> commit;
- Commit complete.
- SQL>
复制代码
- create table hr.t05211_a(a number);
- create table tvalue ( a varchar2(200)) tablespace tbsaudit ;
- create or replace trigger trgvalue
- after update of a on hr.t05211_a
- referencing new as new old as old
- for each row
- begin
- if :old.a != :new.a then
- insert into tvalue
- values (sys_context('userenv','os_user')||' '||
- sys_context('userenv','session_user')||' '||
- sys_context('userenv','current_user')||' '||
- to_char(sysdate,'YYYY-MM-DD:HH24:MI:SS')||' modified '||:new.a|| :old.a||
- sys_context('userenv','ip_address'));
- end if;
- end;
- select * from tvalue;
复制代码A | oracle HR SYS 2018-08-02:21:49:45 modified 98192.168.0.90 |
|
|