Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle tablespaces and user creation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

-create tablespaces and users

Create a temporary tablespace

CREATE TEMPORARY TABLESPACE test_temp

TEMPFILE'/ u01/oracle/product/10.2.0/oradata/orcl/test_temp01.dbf'

SIZE 32M

AUTOEXTEND ON

NEXT 32M MAXSIZE 2048M

EXTENT MANAGEMENT LOCAL

Create user tablespace

CREATE TABLESPACE test_data

LOGGING

DATAFILE'/ u01/oracle/product/10.2.0/oradata/orcl/my_data01.dbf'

SIZE 32M

AUTOEXTEND ON

NEXT 32M MAXSIZE 2048M

EXTENT MANAGEMENT LOCAL

Create users and develop tablespaces

CREATE USER username IDENTIFIED BY password

DEFAULT TABLESPACE TEST_DATA

TEMPORARY TABLESPACE TEST_TEMP

-user empowerment and view user permissions

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

Assign the role of role to username, that is, to enable the user username to manage and use the resources owned by role

GRANT role TO username

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

View the roles owned by the user or role

SELECT * FROM DBA_ROLE_PRIVS

SELECT * FROM USER_ROLE_PRIVS

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report