전체/Oracle
oracle USER 생성, 권한부여, table space 생성, export, import 방법
effortDev
2019. 6. 17. 10:32
1. USER 생성
1 2 3 4 | -- user 생성 CREATE USER SANGHYUN IDENTIFIED BY mypassword DEFAULT tablespace USERS TEMPORARY tablespace TEMP; | cs |
2. USER 권한부여하기
1 2 3 4 5 | -- 권한부여하기 GRANT RESOURCE, CONNECT TO SANGHYUN; -- 데이터베이스 import 시 권한 부여하기 GRANT IMP_FULL_DATABASE TO SANGHYUN; | cs |
3. TABLE SPACE 생성
1 2 3 4 | -- table space 생성 CREATE TABLESPACE MY_TABLE_TAB DATAFILE 'MY_TABLE_TAB' SIZE 2048M AUTOEXTEND ON NEXT 4M MAXSIZE UNLIMITED LOGGING PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT MANUAL FLASHBACK ON; | cs |
4. export 방법
1 2 | -- export 방법 exp userid=sanghyun/mypw file='D:\myfile.dmp' | cs |
5. import 방법
1 2 | -- import 방법 imp username/password file=D:\myfile.dmp commit=y ignore=y full=y; | cs |