Oracle DB for system administrators, part2

5. lets login and see the list of tablespaces
SQL>  select * from v$tablespace;

       TS# NAME                           INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
         0 SYSTEM                         YES NO  YES
         1 SYSAUX                         YES NO  YES
         2 UNDOTBS1                       YES NO  YES
         4 USERS                          YES NO  YES
         3 TEMP                           NO  NO  YES
         6 EXAMPLE                        YES NO  YES

6 rows selected.

SQL>


6. Next we will add new tablespace for tests
SQL> create tablespace test01  datafile '/home/oracle/base/data/orcl/test01.dbf' size 500M  extent management local;

Tablespace created.

SQL>


7. And check if its created
SQL>  select * from v$tablespace where name = 'TEST01';

       TS# NAME                           INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
         8 TEST01                         YES NO  YES

SQL>


8. Lets create user
SQL> create user romeo profile default identified by pass1234 default tablespace TEST01 ;

User created.

SQL>

The user is named romeo, have password pass1234 and default tablespace test01
9. And unlock the user
SQL> alter user romeo account unlock;

User altered.

SQL>


10. give him/her rights to connect and other common privileges
SQL> grant resource, connect to romeo;

Grant succeeded.

SQL>



P.S. For detailed explanation of terminology and concept of Oracle database please consult appropriate documentation

No comments:

Post a Comment

Should I trust AI

 Should I trust AI? So far no, sorry.  I tested for the moment (May, 2025) most advanced model for programming and ask very simple question:...