이 페이지는 JIRA Oracle 설정에 대한 가이드를 제공한다.
Oracle 11g R2
Oracle 12c
1. Oracle 접속
Oracle 접속을 한다.(sys 또는 sysdba)
2. 테이블 스페이스 생성
기존 Instance에서 신규 tablespace 의 user 생성한다.
테이블 스페이스 생성 쿼리
create tablespace conf_tablespace datafile 'c:\xxx\xxx.dbf' size 1G autoextend on extent management local autoallocate;
linux의 경우 datafile(xxx.dbf)의 default location이 알고 싶으면
SQL> Select * from dba_data_files ;
...
FILE_NAME
--------------------------------------------------------------------------------
FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS
---------- ------------------------------ ---------- ---------- ---------
RELATIVE_FNO AUT MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS
------------ --- ---------- ---------- ------------ ---------- -----------
ONLINE_ LOST_WR
------- -------
/home/oracle/db/oradata/orcl/system01.dbf
1 SYSTEM 838860800 102400 AVAILABLE
1 YES 3.4360E+10 4194302 1280 837812224 102272
SYSTEM OFF
...
3. 사용자 생성
신규 유저 생성시 신규로 만든 테이블스페이스로 지정한다.
create user [userID] identified by userpassword default tablespace conf_tablespace quota unlimited on conf_tablespace;
위의 명령어로 user를 만든 후 다음 명령어로 quota가 잘만들어졌는지 확인해본다.
select tablespace_name, username, bytes, max_bytes from dba_ts_quotas where tablespace_name = 'conf_tablespace' and username = [userID]; 위의 결과값이 아무것도 나오지 않으면(no rows selected) 문제가 있는 것이고 아래와 같이 나오면 quota가 주어진 것, 즉 해당 유저로 insert table 같은 것이 unlimited하게 사용할 수 있게 잘 설정해준 것이다. TABLE USERNA BYTES MAX_BYTES ----- ------ ---------- ---------- USERS FOOBAR 0 10485760 1 row selected.
4. 사용자 권한 부여
사용자에 대한 권한을 부여한다.
grant connect to user_name; grant create table to user_name; grant create sequence to user_name; grant resource to user_name; grant create trigger to user_name;