Database ( DB )/Database

[Oracle] Create a Schema ( 오라클 스키마 생성 )

노루아부지 2019. 12. 19. 13:36

-- Step 1. Create tablespace ( 테이블스페이스 생성 )

CREATE TABLESPACE [table space name] datafile 'table space file path' size 500M;

 

ex) CREATE TABLESPACE docs_test datafile 'docs_test.dbf' size 500M;

 

 

-- Step2. Create Schema ( 스키마 생성 )

CREATE USER [schema name] identified by [password] DEFAULT TABLESPACE [table space name];

 

ex) CREATE USER docs_test identified by 1234 DEFAULT TABLESPACE docs_test;

 

-- Step 3. Grant authorization ( 권한부여 )

GRANT CONNECT, RESOURCE TO [schema name];

 

ex) GRANT CONNECT, RESOURCE TO docs_test;

728x90
loading