这个博客是ORACLE profile系列第四部分。主要说一下,假设你创建profile而使用profile资源和password控制

CREATE PROFILE

Note:

Oracle recommends that you use the Database Resource Manager rather than this SQL statement to establish resource limits. The Database Resource Manager offers a more flexible means of managing and tracking resource use. For more information on the Database
Resource Manager, refer to Oracle Database Administrator's Guide.

Purpose

Use the CREATE PROFILE statement to create a
profile, which is a set of limits on database resources. If you assign the profile to a user, then that user cannot exceed these limits.

See Also:

Oracle Database Security Guide for a detailed description and explanation of how to use password management
and protection

Prerequisites

To create a profile, you must have the CREATE PROFILE system privilege.

To specify resource limits for a user, you must:

  • Enable resource limits dynamically with the ALTER SYSTEM statement or with the initialization parameter
    RESOURCE_LIMIT. This parameter does not apply to password resources. Password resources are always enabled.

  • Create a profile that defines the limits using the CREATE PROFILE statement

  • Assign the profile to the user using the CREATE USER or
    ALTER USER statement

##创建并使profile生效的前提条件是:

要想成功创建profile,用户必须具有create profile权限

假设想使profile中指定的限制对相关用户生效,首先我们须要把该profile指定给用户。其次我们须要开启数据库的resource_limit功能。(能够在数据库启动之前在參数文件里指定RESOURCE_LIMIT初始化參数。或者直接使用alter system set resource_limit=true;来启用)

See Also:

Examples

Creating a Profile: Example The following statement creates the profile
new_profile:

CREATE PROFILE new_profile
LIMIT PASSWORD_REUSE_MAX 10
PASSWORD_REUSE_TIME 30;

Setting Profile Resource Limits: Example The following statement creates the profile
app_user:

CREATE PROFILE app_user LIMIT
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL 3000
CONNECT_TIME 45
LOGICAL_READS_PER_SESSION DEFAULT
LOGICAL_READS_PER_CALL 1000
PRIVATE_SGA 15K
COMPOSITE_LIMIT 5000000;

If you assign the app_user profile to a user, then the user is subject to the following limits in subsequent sessions:

  • The user can have any number of concurrent sessions.

  • In a single session, the user can consume an unlimited amount of CPU time.

  • A single call made by the user cannot consume more than 30 seconds of CPU time.

  • A single session cannot last for more than 45 minutes.

  • In a single session, the number of data blocks read from memory and disk is subject to the limit specified in the
    DEFAULT profile.

  • A single call made by the user cannot read more than 1000 data blocks from memory and disk.

  • A single session cannot allocate more than 15 kilobytes of memory in the SGA.

  • In a single session, the total resource cost cannot exceed 5 million service units. The formula for calculating the total resource cost is specified by the
    ALTER RESOURCE COST statement.

  • Since the app_user profile omits a limit for IDLE_TIME and for password limits, the user is subject to the limits on these resources specified in the
    DEFAULT profile.

Setting Profile Password Limits: Example The following statement creates the
app_user2 profile with password limits values set:

CREATE PROFILE app_user2 LIMIT
FAILED_LOGIN_ATTEMPTS 5
PASSWORD_LIFE_TIME 60
PASSWORD_REUSE_TIME 60
PASSWORD_REUSE_MAX 5
PASSWORD_VERIFY_FUNCTION verify_function
PASSWORD_LOCK_TIME 1/24
PASSWORD_GRACE_TIME 10;

This example uses the default Oracle Database password verification function,
verify_function
. Refer to Oracle Database Security Guide for information on using this verification function provided or designing your own verification function.

版权声明:本文博主原创文章。博客,未经同意不得转载。

ORACLE profile列4 --CREATE PROFILE的更多相关文章

  1. Oracle基础 09 概要文件 profile

    --创建 profile 概要文件create profile profile123 limit failed_login_attempts 2;  --修改用户的 profile 文件alter u ...

  2. Oracle密码验证函数与Create Profile

    今天看到了一个oracle密码函数的东西,就在网上找文档自己做测试,刚开始看不懂,最后做完记录一下 密码函数的作用就是要将用户密码进行限制,比如申请一个网站的账号的时候,密码会要求你不少于8位,必须要 ...

  3. iOS 真机测试时报错:Provisioning profile "iOS Team Provisioning Profile: XXX” doesn't include the currently selected device “XXX”.

    这几天因工作需要,去给客户演示iOS项目打包的过程.之前演示都是顺利的,但后来客户自己操作时打电话说遇到了问题,出现报错. 就过去看了一下,发现一个很陌生的错误提示: The operation co ...

  4. Oracle一列的多行数据拼成一行显示字符

    Oracle一列的多行数据拼成一行显示字符   oracle 提供了两个函数WMSYS.WM_CONCAT 和 ListAgg函数.    www.2cto.com   先介绍:WMSYS.WM_CO ...

  5. profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2

    profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2   by:授客 QQ:103355312 ...

  6. Linux下环境变量设置技巧,不用/etc/profile而是在/etc/profile.d目录下新建特定的shell文件来设置

    区别: 1.两个文件都是设置环境变量文件的,/etc/profile是永久性的环境变量,是全局变量,/etc/profile.d/设置所有用户生效,同样是永久变量,是全局变量. 2./etc/prof ...

  7. Oracle创建表语句(Create table)语法详解及示例、、 C# 调用Oracle 存储过程返回数据集 实例

    Oracle创建表语句(Create table)语法详解及示例 2010-06-28 13:59:13|  分类: Oracle PL/SQL|字号 订阅 创建表(Create table)语法详解 ...

  8. Oracle EBS-SQL (SYS-12):查询各Profile的设置情况.sql

    SELECT pro.profile_option_name, pro.user_profile_option_name, lev.level_type TYPE, --lev.level_code, ...

  9. 【转】Oracle索引列NULL值引发执行计划该表的测试示例

    有时开发进行表结构设计,对表字段是否为空过于随意,出现诸如id1=id2,如果允许字段为空,因为Oracle中空值并不等于空值,有可能得到意料之外的结果.除此之外,最关键的是,NULL会影响oracl ...

随机推荐

  1. AntiXSS - 支持Html同时防止XSS攻击

    AntiXSS - 支持Html同时防止XSS攻击 跨站脚本攻击(XSS)已经不是什么新鲜的话题了,甚至很多大公司也为此吃尽苦头.最简单直接的防范方法,就是不允许任何html标签输入,对用户输入进行编 ...

  2. eclipse failed to create the java virtual machine 问题图文解析(转)

    clipse failed to create  the java virtual  machine 解决方法: 1.问题现象 2.java虚拟机初始化失败!寻找eclipse解压路径 3.寻找ecl ...

  3. Backbone.js 为复杂Javascript应用程序提供模型(models)、集合(collections)、视图(views)的结构

    Backbone.js 为复杂Javascript应用程序提供模型(models).集合(collections).视图(views)的结构.其中模型用于绑定键值数据和 自定义事件:集合附有可枚举函数 ...

  4. httpcomponents-client-ga(4.5)

    http://hc.apache.org/httpcomponents-client-ga/tutorial/html/   Chapter 1. Fundamentals Prev     Next ...

  5. Git管理工具对照(GitBash、EGit、SourceTree)

    Git管理工具对照(GitBash.EGit.SourceTree) GitBash是採用命令行的方式对版本号进行管理,功能最为灵活强大,可是由于须要手动输入希望改动的文件名称,所以相对繁琐. EGi ...

  6. 【LaTeX排版】LaTeX论文排版<三>

    A picture is worth a thousand words(一图胜千言).图在论文中的重要性不言而喻,本文主要解说图的制作与插入. 1.图像的插入     图像能够分为两大类:位图和向量图 ...

  7. linux环境下的线程的创建问题

    pthread_create函数用于创建一个线程 函数原型 #include<pthread.h> int pthread_create(pthread_t *restrict tidp, ...

  8. Jsoup 抓取和数据页 认识HTTP头

    推荐一本书:黑客攻防技术宝典.Web实战篇  :       顺便留下一个疑问:能否通过jsoup大量并发訪问web或者小型域名server,使其瘫痪?其有用jsoup熟悉的朋友能够用它解析url来干 ...

  9. hdu3452 无向树去掉最小的边集使不论什么叶子与根不连通 / 最小割

    思路一下就上来了,叶子向汇点连边,inf保证不会成为割,跑根到汇点最小割就可以.注意无向树双向建边.基础题,分分钟1A: #include<iostream> #include<qu ...

  10. C++传递函数指针

    函数指针是一个很好的类型.因此,您可以编写一个函数,它的一个参数是一个函数指针.然后.在(外部)当函数使用的函数指针参数,来间接调用时调用相应的参数的函数的函数. 因为指针在不同的情况下能够指向不同的 ...