본문 바로가기
Database

[Oracle] 유저 생성 및 테이블 스페이스 설정

by 보리하늘 2017. 12. 28.
728x90
반응형

오라클 설치 후 테이블을 생성하기 전 단계이다.


**아래 명령어의 대괄호[] 는 따옴표 없이 내용 입력



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--유저 생성
CREATE USER [유저명] IDENTIFIED BY [유저명];
 
 
--권한 부여
GRANT connect, resource, dba TO [유저명];
 
 
--유저 정보 조회
select * from user_users;
 
 
--tablespace 조회
select * from dba_tablespaces;
 
 
--tablespace 생성
create tablespace [테이블스페이스명] datafile 'C:\oraclexe\app\oracle\oradata\XE\[테이블스페이스명].dbf' size 500m;
 
 
--uwer default tablesapce 변경
alter user [유저명] default tablespace [테이블스페이스명];
 
 
--전체 테이블 조회
select * from all_tables where owner = '[유저명]';
select * from all_tables where tablespace_name = '[테이블스페이스명]';
cs


728x90
반응형

댓글