[Oracle]개발팁 모음
[사용자에게 할당된 크기를 무한대로 수정]
alter user test quota unlimited on sample_stone;
[테이블스페이스 만들기]
CREATE TABLESPACE sample_stone
DATAFILE '/oracle/oradata/stone/sample_stone.dbf' SIZE 100M
DEFAULT STORAGE
(INITIAL 10K
NEXT 10K
MINEXTENTS 2
MAXEXTENTS 50
PCTINCREASE 50)
-기존 DBF파일에 테이블스페이스연결문법
CREATE TABLESPACE sample_stone
DATAFILE '/oracle/oradata/stone/sample_stone.dbf' SIZE 100M REUSE
DEFAULT STORAGE
(INITIAL 10K
NEXT 10K
MINEXTENTS 2
MAXEXTENTS 50
PCTINCREASE 50)
GRANT connect, resource TO test;
create user test identified by test
default tablespace sample_stone
quota 500k on sample_stone
profile default;
GRANT connect, resource TO test;
data01디렉토리에 dbf파일을 만든다.
[시간 가져오기 yyyymmddhh24]
select to_char(sysdate, 'yyyymmddhh24')
=> 이렇게 하면 오후 2시를 14시로 가져온다
[제약조건 삭제하기]
alter table table명
drop constraint primary key명;