Restrict users' use of database resources by creating user profile files

xiaoxiao2021-03-06  106

You can limit the resource list in the following example, create a Test_Profile environment file for user Testuser:

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 for 3 consecutive times, the account will be automatically locked by Oracle. Since then, when you enter the correct password of the TestUser account, an error message will be received:

Error: ORA-28000: The Account Is Locked

Environmental files are created by the "Create Profile" command, you can modify it 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 of the database is modified to allow maximum idle time for 1 hour:

or alter profile DEFAULT profile filename limit idle_time 60; - set to 1. The user profile setting resource initialization parameter resource_limit = true2 ./* establishing resource configuration file * / create profile prfile_name limit session_per_user 2 cpu_per_session 10000 idle_time 60 connect_time 480; 3. RTER USER_NAME PROFILE PROFILE_NAME; - Assign the created Profile file to the user 4. Modify the resource profile with the command ALTER profile default or profile file name limit idle_time 60; 5.drop profile_name; - Delete Profile / * established After profile, and specify it to a user, you must use Cascade to delete * / drop profile_name cascade; alter system set resource_limit = true; --- Enable voluntary limit, the default is False

转载请注明原文地址:https://www.9cbs.com/read-104122.html

New Post(0)