ORACLE profile系列4 --CREATE PROFILE

这篇博客是ORACLE profile系列的第四篇,主要说一下,如果创建profile和使用profile进行资源和密码控制

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:

Syntax

create_profile::=

Description of the illustration create_profile.gif

resource_parameters::=

Description of the illustration resource_parameters.gif

(size_clause::=

password_parameters ::=

Description of the illustration password_parameters.gif

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.

时间: 2024-08-25 14:32:16

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

Oracle基础 09 概要文件 profile

--创建 profile 概要文件create profile profile123 limit failed_login_attempts 2;  --修改用户的 profile 文件alter user scott profile profile123; 确保将初始化参数 resource_limit 设置为true,以实施概要文件中的资源限制.否则,Oracle将忽略 create 或 alter profile 语句中的限制设置.与密码有关的概要文件属性不依赖 resource_limi

Use the Profile Manager to create and remove Firefox profiles

Skip to main content Switch language Skip to search Ask a question Sign In English Firefox Editing Tools Learn the Basics: get started Download, install and migration Firefox Sync Customize controls, options and add-ons Privacy and security settings

Oracle Create Profile

一.目的: Oracle系统中的profile可以用来对用户所能使用的数据库资源进行限制,使用Create Profile命令创建一个Profile,用它来实现对数据库资源的限制使用,如果把该profile分配给用户,则该用户所能使用的数据库资源都在该profile的限制之内. 二.条件: 创建profile必须要有CREATE PROFILE的系统权限. 为用户指定资源限制,必须: 1.动态地使用alter system或使用初始化参数resource_limit使资源限制生效.该改变对密码资

Oracle密码验证函数与Create Profile

今天看到了一个oracle密码函数的东西,就在网上找文档自己做测试,刚开始看不懂,最后做完记录一下 密码函数的作用就是要将用户密码进行限制,比如申请一个网站的账号的时候,密码会要求你不少于8位,必须要有一个大小写,字符,或者英文加上数字才可以,这些都是可以对create user的密码进行限制的,首先要接触一个profile的参数,之前没接触过这个,profile的作用就是对一些CPU的资源,或者用户密码进行限制的. oracle 用户管理 :profile + tablespace + rol

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

SELECT pro.profile_option_name, pro.user_profile_option_name, lev.level_type TYPE, --lev.level_code, lev.level_name, prv.profile_option_value FROM apps.fnd_profile_options_vl pro, applsys.fnd_profile_option_values prv, (SELECT 10001 level_id, 'Site'

【锁】Oracle锁系列

[锁]Oracle锁系列 1  BLOG文档结构图 2  前言部分 2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 锁的概念.分类.及其模拟 ② 查询锁的视图及视图之间的关联 ③ 锁的参数(DML_LOCKS.DDL_LOCK_TIMEOUT) ④ FOR UPDATE及FOR UPDATE OF系列 ⑤ 带ONLINE和不带ONLINE创建索引的锁情况(是否阻塞DML操作) ⑥ 包或存过不能编译的解决方法

【函数】Oracle函数系列(1)--字符函数

[函数]Oracle函数系列(1)--字符函数 1  BLOG文档结构图 2  前言部分 2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 常见字符函数(lower.upper.initcap.concat.substr.length.intr.lpad.rpad.trim.chr.ascii.replace.translate)的使用 ② 判断字符串中是否含有汉字 ③ substr和instr的联合使用 ④

Oracle学习系列4

Oracle学习系列4 ************************************************************************************ 数据库更新操作: 分类: 查询操作:select 更新操作:insert ,update , delete 为了保存原始的emp表的信息,在进行增删改之前备份词表: create table emp_bak as select * from emp ; //将表emp结构和数据完整的复制出来 添加数据:

Oracle学习系列5

Oracle学习系列5 ************************************************************************************ 1,掌握表的建立与删除 了解Oracle中的主要数据类型 2,约束的分类和使用 3,表的关联:交,并,补 4,掌握ROWNUM伪列的作用 5,掌握序列的使用 6,掌握视图的作用 7,了解同义词,用户管理,权限分配与撤销,数据库的备份 ------------------------------------