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