Restricting user use of database resources by creating user profile files

Source: Internet
Author: User
Tags modify resource
Create | data | database
List of resources that can be restricted




In the following example, create a test_profile environment file that users testuser to use:



Create Profile Test_profile Limit



Failed_login_attempts 3;



Create user TESTUSER identified by abcd1234



Profile Test_profile;



Grant CREATE session to TESTUSER;



If the connection to the TestUser account fails 3 consecutive times, the account will be automatically locked by Oracle. You will then receive an error message when you enter the correct password for the TestUser account:



Error:ora-28000:the account is locked



Environment files are created by the "Create Profile" command and can be modified with the ALTER PROFILE command. The "Alter profile" command shown in the following example is used to modify an existing environment file. In this example, the default environment file for the database is modified to allow maximum idle time of 1 hours:



Alter profile DEFAULT or profile filename limit idle_time 60;

--Set the user's resource profile
1. Set Initialization parameters Resource_limit=true
2./* set up the resource configuration file * *
Create profile Prfile_name limit Session_per_user 2 cpu_per_session 10000 idle_time 480;

3.alter user user_name profile profile_name; --Assign the profile file created to the user

4. Modify the resource configuration file with the command
Alter profile DEFAULT or profile filename limit idle_time 60;

5.drop profile Profile_name; --Delete profile

/* Established profile, and assigned to a user, you must use cascade to remove the * *
Drop profile profile_name CASCADE;

alter system set RESOURCE_LIMIT=TRUE;---Enable voluntary restrictions, the default is False












Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.