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

Compressed tar archive

There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...