Orcl creates a user to grant permissions

Source: Internet
Author: User

Orcl create user permissions 1. system permissions classification: DBA: All privileges are granted, which are the highest permissions of the system. only DBA can create a database structure. RESOURCE: users with Resource permissions can only create entities, but cannot create database structures. CONNECT: users with the Connect permission can only log on to Oracle, create entities, and create database structures. For normal users: grant connect and resource permissions. For DBA management users: grant the connect, resource, and dba permissions. 2. System Privilege Management and Control ORACLE provides over 80 SYSTEM privileges, each of which allows users to perform one or more database operations. 1. Granting SYSTEM privileges (1) SQL> grant connect, resource, dba to username 1 [, username 2]...; (2) SQL> grant create user, alter user, drop user> TO jxzy_new> with admin option; 2. revoke system privileges SQL> REVOKE CREATE USER, ALTER USER, drop user> FROM jxzy_new // but no Cascade recovery function 3. displays the system privileges granted (SYSTEM privileges of a USER) SQL> select * fromsys. dba_sys_privs SQL> select * from role_sys_privs; 4. delete a user: SQL> drop user Username cascade; // Add cascade to delete all users and the items they have created. 5. Grant the table operation permission to all users.: SQL> grant all on product to public; // public indicates all users. The all permission here does not include drop. [Object permission data dictionary]: SQL> select owner, table_name from all_tables; // The table SQL> select table_name from user_tables that can be queried by the user; // user-created table SQL> select grantor, table_schema, table_name, privilege from all_tab_privs; // authorized table (authorized) SQL> select grantee, owner, table_name, privilege from user_tab_privs; // tables with permissions granted (granted permissions) 6. DBA users can operate any base table of all users (no authorization required, including deletion ): DBA User: SQL> Create table stud02.product (id number (10), name v Archar2 (20); SQL> drop table stud02.emp; SQL> create table stud02.employee as select * from scott. emp; 3. Modify user: 1. Modify password: SQL> Alter user acc01 identified by "12345"; 2. Modify user's default tablespace: SQL> Alter user acc01 default tablespace users; 3. Modify the user's temporary tablespace SQL> Alter user acc01 temporary tablespace temp_data; 4. Force the user to change the password: SQL> Alter user acc01 password expire; 5. lock the user SQL> Alter user acc01 account lock; // lock the SQL> Al Ter user acc01 account unlock; // unlock 4. delete user SQL> drop user Username; // The user has not created any Entity SQL> drop user Username CASCADE; // delete all users and their created entities * 1. the user currently being connected cannot be deleted. 5. Monitoring users: 1. querying user session information: SQL> select username, sid, serial #, machine from v $ session; 2. Deleting user session information: SQL> Alter system kill session 'sid, serial # '; 3. query user SQL statements: SQL> select user_name, SQL _text from v $ open_cursor; SQL> alter session set NLS_LANGUAGE = 'simplified CHINESE 'NLS_TERRITORY = 'China' NLS_CURRENCY =' RMB 'NLS_ISO_CURRENCY = 'China' NLS_NUMERIC_CHARACTERS = '., 'nls_calendar = 'gregorian 'NLS_DATE_FORMAT = 'yyyy-mm-dd dy' NLS_DATE_LANGUAGE = 'simplified CHINESE 'nls_sort = 'binary 'time_zone = '+ 08:00' hour = 'RMB' NLS_TIME_FORMAT = 'hh. MI. ssxff am 'nls_timestamp_format = 'dd-MON-RR HH. MI. ssxff am 'nls_time_tz_format = 'hh. MI. ssxff am tzh: tzm'

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.