Oracle creates tablespaces, creates users, modifies users' default tablespaces, and grants and views Permissions

Source: Internet
Author: User

Query the table space Path:

Select * From dba_data_files

 

Instance:

1. Create tablespace ucitdb_data

Logging

Datafile '/home/APP/Oracle/oradata/ucitdb/ucitdb_data01.dbf'

Size 32 m

Autoextend on

Next 32 m maxsize 2048 m

Extent management local;

Create a tablespace

Ucitdb_data: User tablespace

 

 

2. Create user ucitdba identified by 111111.

Default tablespace ucitdb_data;

Create an account and set the default tablespace

 

Ucitdba: Account name created

111111: Set the account password

 

3. Grant DBA to ucitdba

Grant permissions to users

DBA: User Group

Ucitdba: User

Create temporary tablespace:
Create temporary tablespace test_temp

Tempfile 'C: \ oracle \ product \ 10.1.0 \ oradata \ orcl \ test_temp01.dbf'

Size 32 m

Autoextend on

Next 32 m maxsize 2048 m

Extent management local;

Create user tablespace:
Create tablespace test_data

Logging

Datafile 'C: \ oracle \ product \ 10.1.0 \ oradata \ orcl \ test_data01.dbf'

Size 32 m

Autoextend on

Next 32 m maxsize 2048 m

Extent management local;

Create a user and create a tablespace:
Create User Username identified by password

Default tablespace test_data

Temporary tablespace test_temp;

Grant 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 any view, drop any index, drop any procedure,

Select any table, insert any table, update any table, delete any table

To username;

 

Grant the role "role" to username, that is, enable the user "username" to manage and use resources owned by role.

 

Grant role to username;

----------------------------------------------- View User Permissions ---------------------------------------------------------

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 objects 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;

View roles owned by a user or role:
Select * From dba_role_privs;

Select * From user_role_privs;

------ No privileges on tablespace 'tablespace'
Alter user userquota 10 m [unlimited] On tablespace;

 
 
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.