hr 계정 생성하기
오라클 18c 버전 이후에는 연습용 스키마가 따로 분리되어 있어서 따로 설치해야한다.
반드시 관리자 계정(system)에서 설치
1. 명령 프로토콜 [ 관리자 권한 ] 으로 실행
2. 스키마 다운로드
https://github.com/oracle-samples/db-sample-schemas/releases
Releases · oracle-samples/db-sample-schemas
Oracle Database Sample Schemas. Contribute to oracle-samples/db-sample-schemas development by creating an account on GitHub.
github.com
db-sample-schemas-21.1.zip 다운로드
3. 압축 풀기
4. 파일 넣기
C:\app\사용자계정\product\21c\dbhomeXE\demo\schema 폴더에
다운받은 db-sample-schemas-21.1 폴더 안에 있는 human_resources 폴더 복사해서 붙여넣기

명령 프로토콜 [윈도우] + R -> cmd
5. 스키마 Oracle에 다운로드
SQL > sqlplus system/비밀번호
SQL> select * from all_users;
SQL> alter session set "_ORACLE_SCRIPT"=true;
// 세션 변경
SQL> @?/demo/schema/human_resources/hr_main.sql
specify password for HR as parameter 1: // (hr 계정 비밀번호 설정)
1의 값을 입력하십시오: hr
specify default tablespeace for HR as parameter 2: // (기본 테이블 스페이스)
2의 값을 입력하십시오: users
specify temporary tablespace for HR as parameter 3: // (임시 테이블 스페이스)
3의 값을 입력하십시오: temp
specify password for SYS as parameter 4: // (system의 비밀번호 입력)
4의 값을 입력하십시오: 1234
specify log path as parameter 5: // (로그 저장 디렉토리 지정)
5의 값을 입력하십시오: $ORACLE_HOME/demo/schema/log
specify connect string as parameter 6: // (접속 문자열 지정)
6의 값을 입력하십시오: localhost:1521/xe

다운로드 시작
.
.
PL/SQL procedure successfully completed.
문구 뜨면 다운로드 성공.
[ 에러 문구 ]
SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_cre.sql"
SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_popul.sql"
SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_idx.sql"
SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_code.sql"
SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_comnt.sql"
SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_analz.sql"
SQL>
오류 발생 시 :
https://greenyellow-s.tistory.com/37
Oracle, hr 계정 오류 수정
설치 오류 문구 SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_cre.sql"SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_popul.sql"SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_idx.sql"SP2-0310: unable to
greenyellow-s.tistory.com
'환경설정 > Oracle' 카테고리의 다른 글
Oracle, 방화벽 제거하기 (0) | 2024.07.25 |
---|---|
Oracle, 사용자 계정 만들기 / 계정 삭제 (0) | 2024.07.25 |
Oracle Express 21c 설치 / sqldeveloper 설치 (0) | 2024.07.25 |