/*设约束条件无效*/
alter table table_name disable constraint constraint_name;
alter table table_name enable novalidate constraint constraint_name;
/*将无效约束的数据行放入exception的表中,此表记录了违反数据约束的行的行号;在此之前,要先建exceptions表*/
alter table table_name add constraint constraint_name check(column_name >15) enable validate exceptions into exceptions;
/*运行创建exceptions表的脚本*/
start $ORACLE_HOME/rdbms/admin/utlexcpt.sql;
/*获取约束条件信息的表或视图*/
select * from user_constraints/dba_constraints/dba_cons_columns;
################## managing password security and resources ####################
alter user user_name account unlock/open;----锁定/打开用户;
alter user user_name password expire;---设定口令到期
/*建立口令配置文件,failed_login_attempts口令输多少次后锁,password_lock_times指多少天后口令被自动解锁*/
create profile profile_name limit failed_login_attempts 3 password_lock_times 1/1440;
/*创建口令配置文件*/
create profile profile_name limit failed_login_attempts 3 password_lock_time unlimited password_life_time 30 password_reuse_time 30 password_verify_function verify_function password_grace_time 5;
/*建立资源配置文件*/
create profile prfile_name limit session_per_user 2 cpu_per_session 10000 idle_time 60 connect_time 480;
alter user user_name profile profile_name;
文章来源于领测软件测试网 https://www.ltesting.net/