사용자 도구

사이트 도구


database:oracle

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
database:oracle [2020/07/02 14:55]
kwon37xi [Docker Images]
database:oracle [2020/08/21 14:01] (현재)
kwon37xi [Identifier too long]
줄 9: 줄 9:
   * [[https://hub.docker.com/r/jaspeen/oracle-xe-11g|jaspeen/oracle-xe-11g - Docker Hub]] - https://github.com/jaspeen/docker-oracle-xe-11g   * [[https://hub.docker.com/r/jaspeen/oracle-xe-11g|jaspeen/oracle-xe-11g - Docker Hub]] - https://github.com/jaspeen/docker-oracle-xe-11g
   * [[https://hub.docker.com/_/oracle-database-enterprise-edition|Oracle Database Enterprise Edition - Docker Hub]]   * [[https://hub.docker.com/_/oracle-database-enterprise-edition|Oracle Database Enterprise Edition - Docker Hub]]
 +    * [[https://medium.com/@pakss328/docker-oracle-%EA%B8%B0%EB%B3%B8-%EC%85%8B%ED%8C%85-a09bf869cb59|docker oracle 기본 셋팅 - 박상수 - Medium]]
   * [[https://github.com/steveswinsburg/oracle12c-docker|steveswingsburg/oracle12c]]   * [[https://github.com/steveswinsburg/oracle12c-docker|steveswingsburg/oracle12c]]
 +  * [[https://emflant.tistory.com/237|(docker) oracle xe 18c 설치 및 sqlplus 접속하기 :: SourceBox]]
 +  * [[https://github.com/oracle/docker-images|oracle/docker-images: Official source for Docker configurations, images, and examples of Dockerfiles for Oracle products and projects]]
  
 ===== Docker 로 설치 ===== ===== Docker 로 설치 =====
 +  * [[https://github.com/oracle/docker-images/issues/959|Docker 로 Oracle 설치시에 all_objects 조회가 엄청나게 느린 현상이 발생함]]
 +    * [[java:junit:dbunit|DBUnit]], [[java:junit:database_rider|database-rider]] 에서 문제됨.
 +    * docker 기반이 아닐 경우 1초 정도에 실행 끝남.
 +    * [[https://stackoverflow.com/questions/37722685/oracle-11g-docker-select-very-slow|sql - Oracle 11g docker SELECT very slow - Stack Overflow]] ''asynch_io'' 를 꺼야 성능이 좋아진다는 내용
   * [[https://hub.docker.com/r/wnameless/oracle-xe-11g-r2|wnameless/oracle-xe-11g-r2]] [[https://github.com/wnameless/docker-oracle-xe-11g|github]]<code sh>   * [[https://hub.docker.com/r/wnameless/oracle-xe-11g-r2|wnameless/oracle-xe-11g-r2]] [[https://github.com/wnameless/docker-oracle-xe-11g|github]]<code sh>
 docker run -d --name==oracle11gr2 \ docker run -d --name==oracle11gr2 \
줄 17: 줄 24:
  -p 49180:8080 \  -p 49180:8080 \
  -e ORACLE_ALLOW_REMOTE=true  -e ORACLE_ALLOW_REMOTE=true
- -e ORACLE_DISABLE_ASYNCH_IO=true+ -e ORACLE_DISABLE_ASYNCH_IO=true # 필수!! all_objects 조회를 위해서.
   wnameless/oracle-xe-11g-r2   wnameless/oracle-xe-11g-r2
 </code> </code>
줄 118: 줄 125:
   * [[https://www.oracletutorial.com/oracle-date-functions/oracle-dbtimezone/|Oracle DBTIMEZONE]]   * [[https://www.oracletutorial.com/oracle-date-functions/oracle-dbtimezone/|Oracle DBTIMEZONE]]
  
 +===== 권한 Grant =====
 +  * [[https://hello-nanam.tistory.com/1|나남나여 :: 오라클 테이블 권한 부여 ( GRANT )]]
 +  * [[https://m.blog.naver.com/PostView.nhn?blogId=heartflow89&logNo=221002112762&proxyReferer=https:%2F%2Fwww.google.com%2F|[Oracle/오라클] 권한 부여(GRANT) / 제거(REVOKE) / 조회 / 계정(사용자) 생성 : 네이버 블로그]]
 +  * [[https://jink1982.tistory.com/34|[Oracle] 권한 생성(GRANT), 권한 삭제(REVOKE) :: 돼민이]]
 +  * [[http://develop.sunshiny.co.kr/736|Oracle - 디폴트 롤, DBA, CONNECT, RESOURCE :: You've got to find what you love.]]
 +
 +==== 기본 Role ====
 +  * ''CONNECT'' : DB 접속 권한
 +  * ''RESOURCE'' : 객체(생성, 수정, 삭제), 데이터(입력, 수정, 조회, 삭제) 권한
 +  * ''DBA'' : 절대 권력?
 +
 +==== Table 단위 권한 부여 ====
 +<code>
 +-- 부여
 +GRANT SELECT, INSERT, DELETE, UPDATE ON [TABLE NAME] TO [USER];
 +
 +-- 해제
 +REVOKE SELECT, INSERT, DELETE, UPDATE ON [TABLE NAME] FROM [USER];
 +</code>
 +
 +===== Identifier too long =====
 +  * ''ORA-00972: identifier is too long(Oracle 데이터베이스 오류 972: ORA-00972: 식별자가 너무 깁니다)''
 +  * 컬럼명, 테이블명 등의 식별자 길이는 **30byte**로 제한돼 있다.
 +  * 한글 컬럼명 등의 경우 인코딩에따라 ''UTF-8''은 한 글자가 3byte 혹은 ''CP949'' 일 경우에는 2byte를 차지하기 때문에 생각보다 길어지게 된다.
 +  * JPA/Hibernate 에서 발생한다면 [[java:hibernate:dialect|Hibernate Dialect]] alias 참조
database/oracle.1593669338.txt.gz · 마지막으로 수정됨: 2020/07/02 14:55 저자 kwon37xi