-
[오라클 SQL] docker 도커 컨테이너로 11g xe 설치 후 scott 계정 생성IT 2022. 7. 16. 00:51반응형
윈도우 - 도커 - 오라클 11g xe 를 잘 설치하였고 원격 접속까지 성공하였다.
본격적인 학습을 위해 scott 계정을 활성화 하려고 하니, 계정이 없다.
오라클 xe(eXprEss) 버전은 학습용 scott 계정이 없다. 정식 버전에만 있다고 한다.
하지만, scott 계정을 생성할 수 있는 파일이 있다. 경로를 찾아서 불러오기만 하면 된다.
그런데, 구글링 해보니 아래처럼 윈도우 설치 기준의 경로만 죄다 알려주고 있다.
C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\scott.sql
도커의 linux 에서 scott 계정 생성 파일의 경로는 다음과 같다. (삽질 끝에 어렵게 찾았음)
u01/app/oracle/product/11.2.0/xe/rdbms/admin/utlsampl.sql
sqlplus에 DB를 생성할 수 있는 sys 계정으로 접속 후 생성을 진행함.
C:\Users\Administrator>docker exec -it oracle11g sqlplus # 로그인 SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 13 15:25:59 2022 Copyright (c) 1982, 2011, Oracle. All rights reserved. Enter user-name: sys as sysdba # sys 계정 입력 Enter password: oracle # 비밀번호 입력 Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production SQL> show user # 계정 확인 USER is "SYS" SQL> @u01/app/oracle/product/11.2.0/xe/rdbms/admin/utlsampl.sql # @+경로 입력 후 엔터 Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production C:\Users\Administrator>docker exec -it oracle11g sqlplus # 다시 로그인 한다. SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 13 16:28:08 2022 Copyright (c) 1982, 2011, Oracle. All rights reserved. Enter user-name: scott # scott 계정 입력 Enter password: tiger # 비밀번호 입력 Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production SQL> show user # scott 계정 확인 USER is "SCOTT"
728x90반응형'IT' 카테고리의 다른 글
[오라클 클라우드] Arm A1 무료 인스턴스 추가 (최대 코어 4, 최대 메모리 24GB 제공) (0) 2022.07.18 [GCP] 구글 클라우드 플랫폼에서 평생 무료 서버 구축 (0) 2022.07.18 [오라클 SQL] ORA-12154 오류 해결 (0) 2022.07.16 [오라클 SQL] 윈도우 docker 도커 오라클 11g 설치 및 원격 연결 (0) 2022.07.09 Apple TV+ 무료 구독 유료 결제 전 해지 (0) 2022.07.06