ORACLE user profile配置/管理/维护
今天在新数据库上面创建一个USER时,要求配置资源限制,很久没有玩ORACLE了,这个东西还玩得差不多了。userprofile包括了两部分内容,1.是资源的限制,但是这个
今天在新数据库上面创建一个USER时,要求配置资源限制,很久没有玩ORACLE了,这个东西还玩得差不多了。
user profile包括了两部分内容,1.是资源的限制,但是这个默认是不生效的,香港服务器,要启动(resource_limit为true)才生效。2.用户密码限制,这个配置后,再用户下次登陆就生效。通过user profile配置的限制都是在用户下次登陆时生效,对当前的session不生效。数据库中有一个默认的profile,名字是DEFAULT,在11G前这个DEFAULT没有任何的限制,但是从11G开始,对PASSWORD_LIFE_TIME 为180,FAILED_LOGIN_ATTEMPTS为10次。
资源的限制包括下面几个部分
密码限制由下面几个部分组成
下面是详细的说明
SESSIONS_PER_USER:指定每一个用户最大可以并发sessions,如果达到了最大session后会报ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit错误
CPU_PER_SESSION:指定每一个SESSION总共使用CPU时间,单位是1/100秒,如果超过后会报下面的错误ORA-02392: exceeded session limit on CPU usage, you are being logged off
CPU_PER_CALL:每一次CALL使用的CPU时间,也就是一条SQL调用(a parse, execute, or fetch),单位是1/100秒,如果超过后会报ORA-02393: exceeded call limit on CPU usage。
CONNECT_TIME:限制一个session总的连接时间,单位为分钟。如果超过最大值会报ORA-02399: exceeded maximum connect time, you are being logged off
IDLE_TIME:指定一个session空闲的时间,单位为分钟。如果超过最大值会报ORA-02396: exceeded maximum idle time, please connect again
LOGICAL_READS_PER_SESSION:限制每一个session读取logical块的个数。
LOGICAL_READS_PER_CALL:限制一条SQL读取logical块的个数。如果超过最大值会报ORA-02395: exceeded call limit on IO usage
PRIVATE_SGA:限制一个session在sga中私有空间的分配。
COMPOSITE_LIMIT:指定一个session总的资源代价。
FAILED_LOGIN_ATTEMPTS:指定帐户在被锁之前可以使用错误密码尝试登陆的次数,默认是10次
PASSWORD_LIFE_TIME:指定密码存活的天数,默认是180天。
PASSWORD_LOCK_TIME:登陆失败过,帐户被锁定的天数。默认值是1天。
PASSWORD_GRACE_TIME:指密码到期后,还可以使用多少天来登陆数据库,默认是7天。
PASSWORD_VERIFY_FUNCTION:指定密码验证函数。如果为null就表示没有。
PASSWORD_REUSE_TIME and PASSWORD_REUSE_MAX :这个两个参数要一起配置才会生效,PASSWORD_REUSE_TIME指相同密码被重用的间隔天数,PASSWORD_REUSE_MAX相同密码再次被重用要求最低的密码修改次数(不包括本次修改成重用密码)
下面是开始测试:
测试环境:OS RHEL 5.6 X86_64 DB:11.2.0.2
1,香港服务器,创建profile
2.查看profile的内容
3 修改/查看某个用户的profile
4 修改profile中的资源的值。
这里包括两部分的内容,1.修改成用户指定的值,2.是修改成系统默认的值
5 删除profile
当某个profile被删除时,如果这个profile已经被分配给某个用户,那么我们在删除的时候要加上cascade,并且已经被分配的用户的profile会被自己修改成default profile。
6。修改参数,使资源限制生效
这个参数默认值是false,是一个动态参数
user profile这个比较操作比较简单,香港服务器租用,重要的是要理解里面参数的含意。
下面是资源限制达到最大值后的报错提示。
本文出自 “认真就输” 博客,请务必保留此出处

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

Deleting all data in Oracle requires the following steps: 1. Establish a connection; 2. Disable foreign key constraints; 3. Delete table data; 4. Submit transactions; 5. Enable foreign key constraints (optional). Be sure to back up the database before execution to prevent data loss.

Oracle database paging uses ROWNUM pseudo-columns or FETCH statements to implement: ROWNUM pseudo-columns are used to filter results by row numbers and are suitable for complex queries. The FETCH statement is used to get the specified number of first rows and is suitable for simple queries.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node
