Collections:
Assign a Tablespace to a User in Oracle
How To Assign a Tablespace to a Users in Oracle?
✍: FYIcenter.com
When you create a new user, Oracle will assign the SYSTEM tablespace to the user by default. If you want to change this, you can assign a different table space to a user using the ALTER USER command. The following tutorial exercise changes user dev's default tablespace, and assigns 4MB of space to dev:
>.\bin\sqlplus /nolog SQL> CONNECT DEV/developer SQL> ALTER USER dev DEFAULT TABLESPACE USERS; User altered. SQL> ALTER USER dev QUOTA 4M ON USERS; User altered. SQL> disconnect SQL> CONNECT DEV/developer SQL> CREATE TABLE fyi (id NUMBER); Table created. SQL> DROP TABLE fyi; Table dropped. SQL> CREATE TABLE fyi (id NUMBER); Table created.
As you can see, "dev" can create and drop tables now. You can also let "dev" to create tables in any tablespace without any restriction by granting him the UNLIMITED TABLESPACE system privilege.
2019-06-29, 921👍, 0💬
Popular Posts:
How To Define an External Table in a Text File in Oracle? You can use the CREATE TABLE statement to ...
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a ...
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
What Is SQL in MySQL? SQL, SEQUEL (Structured English Query Language), is a language for RDBMS (Rela...
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of...