ALTER PROFILE
Purpose
Use the ALTER
PROFILE
statement to add, modify, or remove a resource limit or password management parameter in a profile.
Changes made to a profile with an ALTER
PROFILE
statement affect users only in their subsequent sessions, not in their current sessions.
See Also:
CREATE PROFILE for information on creating a profilePrerequisites
You must have ALTER
PROFILE
system privilege to change profile resource limits. To modify password limits and protection, you must have ALTER
PROFILE
and ALTER
USER
system privileges.
Syntax
alter_profile::=
Description of the illustration alter_profile.gif
(resource_parameters::=, password_parameters::=)
resource_parameters::=
Description of the illustration resource_parameters.gif
password_parameters::=
Description of the illustration password_parameters.gif
Semantics
The keywords, parameters, and clauses in the ALTER
PROFILE
statement all have the same meaning as in the CREATE
PROFILE
statement.
You cannot remove a limit from the DEFAULT
profile.
Please refer to CREATE PROFILE and to the examples in the next section for more information.
Examples
Making a Password Unavailable: Example The following statement makes the password of the new_profile
profile (created in "Creating a Profile: Example") unavailable for reuse for 90 days:
ALTER PROFILE new_profile LIMIT PASSWORD_REUSE_TIME 90 PASSWORD_REUSE_MAX UNLIMITED;
Setting Default Password Values: Example The following statement defaults the PASSWORD_REUSE_TIME
value of the app_user
profile (created in "Setting Profile Resource Limits: Example") to its defined value in the DEFAULT
profile:
ALTER PROFILE app_user LIMIT PASSWORD_REUSE_TIME DEFAULT PASSWORD_REUSE_MAX UNLIMITED;
Limiting Login Attempts and Password Lock Time: Example The following statement alters profile app_user
with FAILED_LOGIN_ATTEMPTS
set to 5 and PASSWORD_LOCK_TIME
set to 1:
ALTER PROFILE app_user LIMIT FAILED_LOGIN_ATTEMPTS 5 PASSWORD_LOCK_TIME 1;
This statement causes the app_user
account to become locked for one day after five unsuccessful login attempts.
Changing Password Lifetime and Grace Period: Example The following statement modifies the profile app_user2
PASSWORD_LIFE_TIME
to 90 days and PASSWORD_GRACE_TIME
to 5 days:
ALTER PROFILE app_user2 LIMIT PASSWORD_LIFE_TIME 90 PASSWORD_GRACE_TIME 5;
Limiting Concurrent Sessions: Example This statement defines a new limit of 5 concurrent sessions for the app_user
profile:
ALTER PROFILE app_user LIMIT SESSIONS_PER_USER 5;
If the app_user
profile does not currently define a limit for SESSIONS_PER_USER
, the preceding statement adds the limit of 5 to the profile. If the profile already defines a limit, the preceding statement redefines it to 5. Any user assigned the app_user
profile is subsequently limited to 5 concurrent sessions.
Removing Profile Limits: Example This statement removes the IDLE_TIME
limit from the app_user
profile:
ALTER PROFILE app_user LIMIT IDLE_TIME DEFAULT;
Any user assigned the app_user
profile is subject in their subsequent sessions to the IDLE_TIME
limit defined in the DEFAULT
profile.
Limiting Profile Idle Time: Example This statement defines a limit of 2 minutes of idle time for the DEFAULT
profile:
ALTER PROFILE default LIMIT IDLE_TIME 2;
This IDLE_TIME
limit applies to these users:
-
Users who are not explicitly assigned any profile
-
Users who are explicitly assigned a profile that does not define an
IDLE_TIME
limit
This statement defines unlimited idle time for the app_user2
profile:
ALTER PROFILE app_user2 LIMIT IDLE_TIME UNLIMITED;
Any user assigned the app_user2
profile is subsequently permitted unlimited idle time.
参考至:http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_2007.htm
如有错误,欢迎指正
邮箱:czmcj@163.com
相关推荐
### ORACLE_PROFILE的使用详解 #### 一、概述与目的 在Oracle数据库中,`PROFILE`是一种非常重要的机制,它可以用来控制和管理用户对数据库资源的使用情况。通过设置不同的资源限制,管理员能够确保数据库资源得到...
- `alter user username profile profile_name;` **2.1.6 给账户解锁** - **用途:** 解锁被锁定的用户账户。 - **语法示示例:** - `alter user username account unlock;` **2.1.7 终止口令** - **用途:** ...
ORACLE常用命令 一、ORACLE的启动和关闭 1、在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a、启动ORACLE系统 oracle>svrmgrl SVRMGR>connect internal SVRMGR>startup ...
首先,我们来了解一下ALTER VIEW语法,这是Oracle中用于修改已存在的视图的命令。视图是基于一个或多个表的虚拟表,可以通过ALTER VIEW来更新其定义,例如添加或删除列,或者改变选择条件。`ALTER VIEW`还可以与`...
修改用户的语法与创建用户相同,只需将关键字 create 改为 alter,例如: ``` ALTER USER robinson ACCOUNT LOCK; ``` 修改用户密码的语法为: ``` ALTER USER robinson IDENTIFIED BY newpassword; ``` 删除用户的...
### Oracle学习笔记精要 ...综上所述,Oracle的学习笔记覆盖了用户管理、权限分配、Profile配置、日期格式调整以及事务处理等多个关键领域,深入理解并掌握这些知识点对于有效利用Oracle数据库至关重要。
ALTER PROFILE custom_profile LIMIT FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 2; ``` - 将Profile应用于用户: ```sql ALTER USER 用户名 PROFILE custom_profile; ``` ### Oracle表管理 #### 创建表 ...
ALTER TABLESPACE ZCGL ADD DATAFILE 'J:\MYORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\ZCGL01.DBF' SIZE 50M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED; ``` ##### 查询表空间大小 - **语法**: ```sql SELECT ...
`ATTACH`的语法是`ATTACH=[schema_name.]job_name`,其中`schema_name`指定了方案名,`job_name`指定了导出作业的名称。使用`ATTACH`时,需要注意的是,除了连接字符串和`ATTACH`选项,命令行不应包含其他选项。例如...
- **Profile 管理用户口令**: 使用 `create profile` 和 `alter user` 命令来管理用户的口令策略。 - 示例: `create profile secure limit PASSWORD_REUSE_MAX 5;` - 示例: `alter user john profile secure;` - ...
常见的DDL语句包括CREATE、ALTER、DROP、TRUNCATE等。例如,创建一个表的DDL语句可能如下: ```sql CREATE TABLE employees ( id INT PRIMARY KEY, name VARCHAR(50), salary DECIMAL(10,2) ); ``` 3. 使用DML:...
alter user xiaoming profile myprofile; ``` #### 口令历史控制 - **创建Profile文件**: ```sql create profile password_history limit password_life_time 10 password_grace_time 2 password_reuse_...
- 可以通过`ALTER PROFILE`来修改现有`PROFILE`的设置。 - 例如,限制用户口令的使用次数、过期时间等。 #### 八、总结 通过对Oracle用户管理的学习,我们了解了如何创建、修改和删除用户,以及如何有效地管理用户...
PROFILE DEFAULT -- 受profile文件的限制 QUOTA UNLIMITED ON 表空间名; -- 在表空间下面建表不受限制 ``` ### 创建角色与授权 创建角色的命令为: ```sql CREATE ROLE 角色名 IDENTIFIED BY 密码; ``` 接着是给...
1. **并行查询语法示例**: - `SELECT /*+PARALLEL(a,4)*/ FROM table_name a`,此语句指示Oracle使用4个并行工作进程来执行查询。 - `INSERT /*+PARALLEL(t,4)*/ INTO table_name t`,此语句同样使用4个并行工作...
profile_cdb [oracle@togogo ~]$ echo $ORACLE_SID cdb1 [oracle@togogo ~]$ sqlplus / as sysdba SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ...
[PROFILE profile_name]; ``` 2. 删除用户: ```sql DROP USER username CASCADE; ``` 3. 修改用户密码: ```sql ALTER USER username IDENTIFIED BY new_password; ``` 三、表的管理 1. 创建表: ```sql CREATE ...
根据提供的文档内容,我们可以总结出Oracle数据库的基本语法和操作知识点,包括系统用户管理、表空间创建、用户权限分配以及查询等重要概念。 ### Oracle 基本语法知识点 #### 1. 系统用户登录 - **登录命令**: `...
- 修改用户`UserName`的Profile为`Lock.Account`:`ALTER USER UserName PROFILE Lock.Account;` - 创建一个名为`Mmm`的Profile,设置密码有效期为10天,宽限期为2天:`CREATE PROFILE Mmm LIMIT PASSWORD_LIFE_...