.for CDBS

run as sysDBa
CREATE OR REPLACE FUNCTION verify_function
(username varchar2,
password varchar2,
old_password varchar2)
RETURN boolean IS
n boolean;
m integer;
differ integer;
isdigit boolean;
ischar boolean;
ispunct boolean;
digitarray varchar2();
punctarray varchar2();
chararray varchar2(); BEGIN
digitarray:= '';
chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
punctarray:='!"#$%&()``*+,-/:;<=>?_'; -- Check if the password is same as the username
IF NLS_LOWER(password) = NLS_LOWER(username) THEN
raise_application_error(-, 'Password same as or similar to user');
END IF; -- Check for the minimum length of the password
IF length(password) < THEN
raise_application_error(-, 'Password length less than 4');
END IF; -- Check if the password is too simple. A dictionary of words may be
-- maintained and a check may be made so as not to allow the words
-- that are too simple for the password.
IF NLS_LOWER(password) IN ('welcome', 'database', 'account', 'user', 'password', 'oracle', 'computer', 'abcd') THEN
raise_application_error(-, 'Password too simple');
END IF; -- Check if the password contains at least one letter, one digit and one
-- punctuation mark.
-- . Check for the digit
isdigit:=FALSE;
m := length(password);
FOR i IN .. LOOP
FOR j IN ..m LOOP
IF substr(password,j,) = substr(digitarray,i,) THEN
isdigit:=TRUE;
GOTO findchar;
END IF;
END LOOP;
END LOOP;
IF isdigit = FALSE THEN
raise_application_error(-, 'Password should contain at least one digit, one character and one punctuation');
END IF;
-- . Check for the character
<<findchar>>
ischar:=FALSE;
FOR i IN ..length(chararray) LOOP
FOR j IN ..m LOOP
IF substr(password,j,) = substr(chararray,i,) THEN
ischar:=TRUE;
GOTO findpunct;
END IF;
END LOOP;
END LOOP;
IF ischar = FALSE THEN
raise_application_error(-, 'Password should contain at least one \
digit, one character and one punctuation');
END IF;
-- . Check for the punctuation
<<findpunct>>
ispunct:=FALSE;
FOR i IN ..length(punctarray) LOOP
FOR j IN ..m LOOP
IF substr(password,j,) = substr(punctarray,i,) THEN
ispunct:=TRUE;
GOTO endsearch;
END IF;
END LOOP;
END LOOP;
IF ispunct = FALSE THEN
raise_application_error(-, 'Password should contain at least one \
digit, one character and one punctuation');
END IF; <<endsearch>>
-- Check if the password differs from the previous password by at least
-- letters
IF old_password IS NOT NULL THEN
differ := length(old_password) - length(password); IF abs(differ) < THEN
IF length(password) < length(old_password) THEN
m := length(password);
ELSE
m := length(old_password);
END IF; differ := abs(differ);
FOR i IN ..m LOOP
IF substr(password,i,) != substr(old_password,i,) THEN
differ := differ + ;
END IF;
END LOOP; IF differ < THEN
raise_application_error(-, 'Password should differ by at \
least characters');
END IF;
END IF;
END IF;
-- Everything is fine; return TRUE ;
RETURN(TRUE);
END;
/ GRANT EXECUTE ON verify_function TO PUBLIC; CREATE PROFILE c##APP_PROFILE LIMIT
COMPOSITE_LIMIT UNLIMITED
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
IDLE_TIME UNLIMITED
CONNECT_TIME UNLIMITED
PRIVATE_SGA UNLIMITED
FAILED_LOGIN_ATTEMPTS UNLIMITED
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION verify_function
PASSWORD_LOCK_TIME
PASSWORD_GRACE_TIME
; alter user C##BACKUPDB profile c##APP_PROFILE;
alter user C##OPER profile c##APP_PROFILE;
alter user system profile c##APP_PROFILE;
alter user sys profile c##APP_PROFILE; ##change password alter user system profile default;
alter user system identified by oracle; alter user sys profile default;
alter user sys identified by oracle; alter user C##OPER profile default;
alter user C##OPER identified by oper123; alter user sys profile c##APP_PROFILE;
alter user system profile c##APP_PROFILE;
alter user C##OPER profile c##APP_PROFILE; For pDBs run as DBa user pDB
alter user IC_ADMIN profile APP_PROFILE;
alter user IC_READONLY profile APP_PROFILE;
alter user IC_USER profile APP_PROFILE;
alter user oper profile APP_PROFILE;
alter user PDBADMIN profile APP_PROFILE; ##change password alter user IC_ADMIN profile default;
alter user IC_ADMIN identified by ic_admin12cu; alter user IC_READONLY profile default;
alter user IC_READONLY identified by ic_readonly12cu; alter user IC_USER profile default;
alter user IC_USER identified by ic_user12cu; alter user oper profile default;
alter user oper identified by oper123; alter user IC_ADMIN profile APP_PROFILE;
alter user IC_READONLY profile APP_PROFILE;
alter user IC_USER profile APP_PROFILE;
alter user oper profile APP_PROFILE;

2.for 11.2.0.4

CREATE OR REPLACE FUNCTION verify_function
(username varchar2,
password varchar2,
old_password varchar2)
RETURN boolean IS
n boolean;
m integer;
differ integer;
isdigit boolean;
ischar boolean;
ispunct boolean;
digitarray varchar2(20);
punctarray varchar2(25);
chararray varchar2(52); BEGIN
digitarray:= '0123456789';
chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
punctarray:='!"#$%&()``*+,-/:;<=>?_'; -- Check if the password is same as the username
IF NLS_LOWER(password) = NLS_LOWER(username) THEN
raise_application_error(-20001, 'Password same as or similar to user');
END IF; -- Check for the minimum length of the password
IF length(password) < 4 THEN
raise_application_error(-20002, 'Password length less than 4');
END IF; -- Check if the password is too simple. A dictionary of words may be
-- maintained and a check may be made so as not to allow the words
-- that are too simple for the password.
IF NLS_LOWER(password) IN ('welcome', 'database', 'account', 'user', 'password', 'oracle', 'computer', 'abcd') THEN
raise_application_error(-20002, 'Password too simple');
END IF; -- Check if the password contains at least one letter, one digit and one
-- punctuation mark.
-- 1. Check for the digit
isdigit:=FALSE;
m := length(password);
FOR i IN 1..10 LOOP
FOR j IN 1..m LOOP
IF substr(password,j,1) = substr(digitarray,i,1) THEN
isdigit:=TRUE;
GOTO findchar;
END IF;
END LOOP;
END LOOP;
IF isdigit = FALSE THEN
raise_application_error(-20003, 'Password should contain at least one digit, one character and one punctuation');
END IF;
-- 2. Check for the character
<<findchar>>
ischar:=FALSE;
FOR i IN 1..length(chararray) LOOP
FOR j IN 1..m LOOP
IF substr(password,j,1) = substr(chararray,i,1) THEN
ischar:=TRUE;
GOTO findpunct;
END IF;
END LOOP;
END LOOP;
IF ischar = FALSE THEN
raise_application_error(-20003, 'Password should contain at least one \
digit, one character and one punctuation');
END IF;
-- 3. Check for the punctuation
<<findpunct>>
ispunct:=FALSE;
FOR i IN 1..length(punctarray) LOOP
FOR j IN 1..m LOOP
IF substr(password,j,1) = substr(punctarray,i,1) THEN
ispunct:=TRUE;
GOTO endsearch;
END IF;
END LOOP;
END LOOP;
IF ispunct = FALSE THEN
raise_application_error(-20003, 'Password should contain at least one \
digit, one character and one punctuation');
END IF; <<endsearch>>
-- Check if the password differs from the previous password by at least
-- 3 letters
IF old_password IS NOT NULL THEN
differ := length(old_password) - length(password); IF abs(differ) < 3 THEN
IF length(password) < length(old_password) THEN
m := length(password);
ELSE
m := length(old_password);
END IF; differ := abs(differ);
FOR i IN 1..m LOOP
IF substr(password,i,1) != substr(old_password,i,1) THEN
differ := differ + 1;
END IF;
END LOOP; IF differ < 3 THEN
raise_application_error(-20004, 'Password should differ by at \
least 3 characters');
END IF;
END IF;
END IF;
-- Everything is fine; return TRUE ;
RETURN(TRUE);
END;
/ GRANT EXECUTE ON verify_function TO PUBLIC; drop profile APP_PROFILE; CREATE PROFILE APP_PROFILE LIMIT
COMPOSITE_LIMIT UNLIMITED
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
IDLE_TIME UNLIMITED
CONNECT_TIME UNLIMITED
PRIVATE_SGA UNLIMITED
FAILED_LOGIN_ATTEMPTS UNLIMITED
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION verify_function
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 7
; --@env_DBdev.sql define v_DBdata_un=DBdata
define v_DBdata_pw=DBdata.123
define v_DBusr_un=DBusr
define v_DBusr_pw=DBdev_usr2
define v_DBquery_un=DBquery
define v_DBquery_pw=DBdev_query1
define v_DBpatch_un=DBpatch
define v_DBpatch_pw=DBdev_patch1 ##change password alter user system profile default;
alter user system identified by oracle; alter user sys profile default;
alter user sys identified by oracle; alter user &V_DBDATA_UN profile default;
alter user &V_DBUSR_UN profile default;
alter user &V_DBPATCH_UN profile default;
alter user &V_DBQUERY_UN profile default; alter user &V_DBDATA_UN identified by "&V_DBDATA_PW" ;
alter user &V_DBUSR_UN identified by "&V_DBUSR_PW" ;
alter user &V_DBPATCH_UN identified by "&V_DBPATCH_PW" ;
alter user &V_DBQUERY_UN identified by "&V_DBQUERY_PW" ; alter user &V_DBDATA_UN profile APP_PROFILE;
alter user &V_DBUSR_UN profile APP_PROFILE;
alter user &V_DBUSR_UN profile APP_PROFILE;
alter user &V_DBUSR_UN profile APP_PROFILE;
alter user system profile APP_PROFILE;
alter user sys profile APP_PROFILE;

  

https://blog.csdn.net/wwlhz/article/details/68059524

更改Oracle用户的idle_time

https://blog.csdn.net/gelyon/article/details/6586790

关于Oracle profile文件connect_time时间限制超时的问题探究

 

fix for 12c profile的更多相关文章

  1. vc6.0 Buile菜单下 Profile的作用

    Profile的作用 帮助你分析并发现程序运行的瓶颈,找到耗时所在,同时也能帮助你发现不会被执行的代码.从而最终实现程序的优化. Profile的组成 Profile包括3个命令行工具:PREP,PR ...

  2. Fix a corrupted user profile

    Fix a corrupted user profile Applies to Windows 7 Your user profile is a collection of settings that ...

  3. 12C中Profile的使用

    12c中PROFILE在PDB和CDB中是公用的,不过创建的profile名称在CDB和PDB有所不同. 如: 1.CDB中创建Profile SQL> show con_name CON_NA ...

  4. Fix error of "you have been logged on with a temporary profile"

    You have been logged on with a temporary profile on windows2008 R2 After looking into this issue, I ...

  5. WebLogic 12c Linux 命令行 静默安装

    CentOS 6.3安装配置Weblogic 10  http://www.linuxidc.com/Linux/2014-02/96918.htm Oracle WebLogic 11g 安装部署文 ...

  6. Linux-安装Oracle(CentOS-Oracle 12c)

    第一步:网络连接,在我的上一篇博客中有介绍,不再多说. 网络连接的目的:为了能使用yum命令,在网上直接下载文件. 第二步:前往oracle官网下载12c database服务器端的两个文件:(安装在 ...

  7. Linux 平台安装Oracle Database 12c

    1)下载Oracle Database 12cRelease 1安装介质 官方的下载地址: 1:http://www.oracle.com/technetwork/database/enterpris ...

  8. XE8 & IOS开发之免费证书真机调试:开发证书、AppID、开发授权profile的申请,附Debug真机调试演示(XCode7 Beta版或以上版本适用,有图有真相)

    网上能找到的关于Delphi XE系列的移动开发的相关文章甚少,本文尽量以详细的图文内容.傻瓜式的表达来告诉你想要的答案. 原创作品,请尊重作者劳动成果,转载请注明出处!!! 注意,苹果发布Xcode ...

  9. [转载]iOS Provisioning Profile(Certificate)与Code Signing详解

    原文:http://blog.csdn.net/phunxm/article/details/42685597 引言 关于开发证书配置(Certificates & Identifiers & ...

随机推荐

  1. C++卷积神经网络实例:tiny_cnn代码具体解释(6)——average_pooling_layer层结构类分析

    在之前的博文中我们着重分析了convolutional_layer类的代码结构.在这篇博文中分析相应的下採样层average_pooling_layer类: 一.下採样层的作用 下採样层的作用理论上来 ...

  2. JNI返回复杂对象之中的一个

    需求: 首先说需求.近期接手一个项目.要在底层解析二进制数据,数据结构比較负责,因为server是c++server,加之開始没有考虑到移动端开发,所以协议有点扯蛋.大体是这种,一个数据包里面是map ...

  3. UITableViewController的子控件不随着滑动

    UITableViewController的子控件不随着滑动 我们知道有时候使用UITableViewController简单便捷,省事,但是如果我们使用了addSubview,无论是[self.vi ...

  4. CocoaPoda在iOS开发中的使用

    CocoaPoda在iOS开发中的使用 CocoaPods 简介 CocoaPods是iOS开发中不可避免的依赖管理第三方的工具,能简化一些第三方库文件需要添加编译参数及依赖库的繁复工作 CocoaP ...

  5. Django模板语言(二)

    1,装饰器:在不改变原函数的调用方式情况下为原函数增加一些功能(遵循开放封闭的原则) def outter(fn): def inner(*args, **kwargs): # 可以在执行函数前执行一 ...

  6. Chart.js docs

    原文链接:http://www.bootcss.com/p/chart.js/docs/ 引入Chart.js文件 首先我们需要在页面中引入Chart.js文件.此工具库在全局命名空间中定义了Char ...

  7. js常用操作事件

    触发描述 方法 用法 点击 onclick="method();"   变换 onchange="testChange();"   双击 ondblclick= ...

  8. (续)linux SD卡初始化---mmc_sd_init_card函数

    mmc_sd_init_card剩下的关于UHS-I的分支结构. uhs-I的初始化流程图如图: 红线标出的部分是已经做了的事,与上一篇那个流程图是一致的,之后就是if分支中做的事. if分支中的函数 ...

  9. I.MX6 wpa_applicant 开启 debug 输出

    /*********************************************************************** * I.MX6 wpa_applicant 开启 de ...

  10. 小程序-demo:快速开始

    ylbtech-小程序-demo:快速开始 1.返回顶部 1.app.js //app.js App({ onLaunch: function () { // 展示本地存储能力 var logs = ...