ORACLE User Rights Management

Source: Internet
Author: User

Oracle creates the user's syntax:

CREATE USER username identified bypassword or identified exeternally or identified globally as ' Cn=user ' [DEFAULT tablespace tablespace] [Temporary Tablespace Temptablespace] [QUOTA [integer k[m] [UNLIMITED]] on tablespace [, QUOTA [Integer k[m]] [UNLIMITED]] on tablespace [PROFILES profile_name] [PASSWORD EXPIRE] [client LOCK or Account Unlock]create user Username: User name, typically Alphanumeric type and "#" and "_" symbols. Identified by Password: User password, usually alphanumeric type and "#" and "_" symbol. Identified exeternally: Indicates that the user name is authenticated under the operating system and that the user name must be the same as the user name defined in the operating system. Identified globally as ' Cn=user ': The user name is verified by the Oracle secure domain Hub server, and the CN name represents the user's external name. [DEFAULT tablespace tablespace] : The default table space. [Temporary tablespace tablespace] : The default temporary table space. [QUOTA [Integer k[m]] [UNLIMITED] on Tablespace: The number of bytes of table space that the user can use. [PROFILES Profile_name] : The name of the resource file. [PASSWORD EXPIRE] : The password is immediately set to an out-of-date state and the password must be changed before the user logs in. [Account Lock or UNLOCK]: whether the user is locked, by default, is unlocked. 

--Example
CREATEProfile Pro_user Limit failed_login_attempts5Password_lock_time3--SELECT * from Dba_profiles;--DROP profile Pro_user CASCADE;--for profile settings, you can view: http://blog.csdn.net/huang_xw/article/details/6530635--Create an accountCREATE USERTEST identified byTest Profile Pro_userdefaulttablespace users quota 100m onUsersTemporaryTablespaceTemppassword expire account unlock--select * from Dba_users;

-- Change Password ALTER USER  by newpwd; -- Modify Profile ALTER USER TEST profile Newprofile; -- Delete Account DROP USER [CASCADE];

--Grant System permission

--GrammarGRANTPrivilege[, Privilege ...]  to User [, User|role, public ...] [With ADMIN OPTION];GRANT CREATESESSION,CREATE TABLE, UNLIMITED tablespace toTEST;GRANTCONNECT, RESOURCE toTEST withADMINOPTION;--REVOKE connect,resource FOM TEST;Select *  fromDba_sys_privs;--View System Permissions


--Grant the object permission

--GrammarGRANTObject_privilege[Columns ...]  onObject to User [, User|role, public ...] [With GRANT OPTION];GRANT SELECT,UPDATE(Empno,sal),INSERT,DELETE  onSCOTT. Emp toTEST;REVOKEPrivilege onObject from{User|Role| Public};REVOKE SELECT,UPDATE(Empno,sal),INSERT,DELETE  fromTEST;Select *  fromDba_tab_privs;--View Object Permissions

--character
-Roles are basically the same as accounts, and roles can be granted to users.

ORACLE User Rights Management

Related Article

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.