ORACLE, create tablespace and user, grant privileges

Create main tablespace

create tablespace TEST datafile ‘/home/oracle/app/oracle/oradata/TEST/test.dbf’ size 1000M

autoextend on next 500M maxsize unlimited;

Create main temp tablespace

create temporary tablespace TEST_TEMP tempfile ‘/home/oracle/app/oracle/oradata/TEST/

test_temp.dbf’size 1000M autoextend on next 500M maxsize unlimited;

Create user and it’s password, specify tablespace

create user TEST identified by TEST_2019 default tablespace TEST temporary tablespace

TEST_TEMP;

Grant privileges to user

grant connect,resource,dba to TEST;

grant read,write on directory data_dump to TEST;

Cteate extend tablespace

alter tablespace TEST add datafile ‘/home/oracle/app/oracle/oradata/TEST/

test_201906130833.dbf’ SIZE 1000M AUTOEXTEND ON NEXT 500M maxsize unlimited;

alter tablespace TEST add datafile ‘/home/oracle/app/oracle/oradata/TEST/

test_201906130834.dbf’ SIZE 1000M AUTOEXTEND ON NEXT 500M maxsize unlimited;

alter tablespace TEST add datafile ‘/home/oracle/app/oracle/oradata/TEST/

test_201906130835.dbf’ SIZE 1000M AUTOEXTEND ON NEXT 500M maxsize unlimited;

…………………..

Create extend temp tablespace

alter tablespace TEST_TEMP add tempfile ‘/home/oracle/app/oracle/oradata/TEST/

test_temp201906130851.dbf’ SIZE 1000M AUTOEXTEND ON NEXT 500M maxsize unlimited;

alter tablespace TEST_TEMP add tempfile ‘/home/oracle/app/oracle/oradata/TEST/

test_temp201906130852.dbf’ SIZE 1000M AUTOEXTEND ON NEXT 500M maxsize unlimited;

……………………

One Reply to “ORACLE, create tablespace and user, grant privileges”

Leave a Reply