Oracle Privilege Grant

Source: Internet
Author: User

one, user sys;//system administrator, with the highest authority system;//Local Administrator, sub-high privilege Scott;//Normal user, password default to Tiger, default unlocked
Second, landingSqlplus/ asSysdba//Login sys account sqlplus sys asSysdba//Ditto Sqlplus Scott/Tiger//Login to General user Scott
Third, manage usersCreate UserZhangsan;//under Administrator account, create user Zhangsan alertUserScott identified byTiger//Change Passwordfour, granting permissions1, the default ordinary user Scott is not unlocked by default, cannot do that use, the new user does not have any permissions, must be granted permissions/*Administrator Authorization*/ Grant CreateSession toZhangsan;//Grant Zhangsan user permission to create session, that is, login permissionGrantUnlimited session toZhangsan;//granting Zhangsan users permission to use tablespacesGrant Create Table toZhangsan;//granting permissions to create tables GranteDrop Table toZhangsan;//granting permission to delete a tableGrant Insert Table toZhangsan;//permissions to insert tablesGrant Update Table toZhangsan;//permissions to modify tablesGrant All to Public;//This one is more important, giving all permissions ( All) to all Users ( Public) 2, Oralce strict rights management, ordinary users are also the default can not access each other, need to authorize each other/*Oralce more strict rights management, ordinary users are also the default can not access each other*/ Grant Select onTableName toZhangsan;//Grant Zhangsan users permission to view the specified tableGrant Drop onTableName toZhangsan;//granting permission to delete a tableGrant Insert onTableName toZhangsan;//Grant the Insert permissionGrant Update onTableName toZhangsan;//granting permissions to modify tablesGrant Insert(ID) onTableName toZhangsan;Grant Update(ID) onTableName toZhangsan;//Grant Insert and Modify permissions on specific fields of the specified table, note that only insert and updateGrantAlert All Table toZhangsan;//Grant Zhangsan user alert permission to any tablev. Revoke permissions basic syntax with Grant, the keyword is revoke VI, view permissionsSelect * fromUser_sys_privs;//View all permissions for the current userSelect * fromUser_tab_privs;//to view the permissions used by the user on the tablevii. Table of users of the action table/*You need to precede the table name with a user name, as follows*/ Select * fromZhangsan.tablenameEight, permission pass that is, user A will grant B,B permission to grant the permission of the operation to C again, the command is as follows:GrantAlertTable onTableName toZhangsan withAdminoption;//Key words withAdminoption GrantAlertTable onTableName toZhangsan with Grant option;//Key words with Grantthe option effect is similar to adminNine, role role is a set of permissions, you can give a role to the userCreateRole Myrole;//Create a roleGrant CreateSession toMyrole;//Grant Myrole permission to create sessionGrantMyrole toZhangsan;//roles granted to Zhangsan user MyroleDroprole myrole; deleting roles/*However, some permissions are not granted to the role, such as the unlimited tablespace and the Any keyword*/

Oracle Privilege Grant

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.