OracleDBA之路之Tabespace(三)

创建一个永久的表空间

创建一个永久的表空间

SQL> CREATE TABLESPACE MYTABLESPACE DATAFILE '/u01/oradata/houzhh/myts01.dbf' size 100M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
 
Tablespace created.
[oracle@oracle11g houzhh]$ ll
total 1754128
-rw-r----- 1 oracle oinstall 104865792 Sep 12 20:53 myts01.dbf

SQL> select * from v$tablespace;
 
       TS# NAME                           INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
         8 MYTABLESPACE                   YES NO  YES

为该表空间下添加一个用户

SQL> CREATE USER xiaomi IDENTIFIED BY xiaomi DEFAULT TABLESPACE MYTABLESPACE TEMPORARY TABLESPACE MYTEMP;
 
User created.

SQL> grant connect,resource,dba to xiaomi;
 
Grant succeeded.

你可能感兴趣的:(oracle)