Oracle creates table spaces, creates users, and authorizes, views permissions

Source: Internet
Author: User

Create a temporary table space
CREATE Temporary tablespace test_temp
Tempfile ' C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf '
SIZE 32M
Autoextend on
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;

Create a user table space


CREATE tablespace Test_data
LOGGING
DataFile ' C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TEST_DATA01. DBF '
SIZE 32M
Autoextend on
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;

Create a user and make a table space


CREATE USER username identified by password
DEFAULT tablespace Test_data
Temporary tablespace test_temp;

Granting permissions to Users


GRANT
Create SESSION, create any TABLE, create any VIEW, create any INDEX, create any PROCEDURE,
Alter any TABLE, alter any PROCEDURE,
Drop any TABLE, drop no VIEW, drop any INDEX, drop any PROCEDURE,
SELECT any table, INSERT any table, UPDATE all table, DELETE any table
to username;

Delegating role to username, that is, enabling username this user to manage and use the resources owned by role

GRANT role to username;


-----------------------------------------------View User Rights---------------------------------------------------------

View All Users


SELECT * from Dba_users;
SELECT * from All_users;
SELECT * from User_users;

View User system permissions


SELECT * from Dba_sys_privs;
SELECT * from User_sys_privs;

View user object or role permissions


SELECT * from Dba_tab_privs;
SELECT * from All_tab_privs;
SELECT * from User_tab_privs;

View all roles


SELECT * from Dba_roles;

To view the roles owned by a user or role


SELECT * from Dba_role_privs;
SELECT * from User_role_privs;

-------encountered no privileges on tablespace ' tablespace '

Alter user UserQuota 10m[unlimited] on tablespace;

Oracle creates table spaces, creates users, and authorizes, views permissions

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.