본문 바로가기
  • Welcome J-Kyu Tstory
Oracle

Oracle SQL Developer 설치 및 계정생성 샘플스키마설치

by regularity 2022. 2. 25.
728x90

 

Oracle SQL을 개인용 PC에 설치해서 실습해보기 위해서는 크게 2가지가 필요합니다.

 

첫 번째는 Oracle Database Express, 두 번째는 Oracle SQL Developer입니다.

 

지난 글에서 Oracle Database Express를 설치한 데 이어 Oracle SQL Developer 설치하는 방법을 리뷰해 보려고 합니다.

 

1. Oracle SQL Developer 다운로드 사이트 접속

 

2. 운영체제에 적합한 버전 다운로드

저의 경우엔 운영체제가 윈도우 유저이면서 64-bit 운영체제이므로 Windows-64-bit with JDK 8 included 를 다운로드 받았습니다. JDK가 포함되지 않은 것을 다운로드 받는 경우 JDK를 별도로 설치해야 하는데 번거로우므로 JDK가 포함된 파일을 다운로드 받는 것을 권장 합니다.

 

3. 라이선스 동의 및 파일 내려 받기

위와 같은 화면이 나오면 I Accept the Oracle License Agreement 항목을 선택하여 동의해주고 파일을 내려받아 줍니다.

 

4. 압축 해제 및 폴더 이동

다운로드 받은 압축 파일을 압축 해제 해준 뒤, 폴더 안의 sqldeveloper 폴더를 C드라이브 아래로 옮겨 줍니다.

 

5. sqldeveloper 파일 실행

Oracle SQL Developer는 별도의 설치 없이 실행이 가능합니다. 위의 sqldeveloper.exe 파일을 더블클릭 하여 실행해 줍니다.

 

이런 로딩 화면이 나오면 기다려 줍니다.

접속 이후 위와 같은 창이 뜬다면 확인을 눌러줍니다.

정상 실행이 되었을 때 위와 같은 화면이 나오게 됩니다.

 

6. 시스템 접속 계정 생성

왼쪽 상단의 + 버튼을 누른 뒤 새 데이터베이스 접속 을 클릭해 줍니다.

 

접속이름, 사용자이름, 비밀번호를 입력해줘야 합니다. 임의대로 작성을 해도 되지만 저의 경우에는 접속 이름은 oracle 사용자이름은 SYSTEM, 비밀번호는 Oracle Database Express 설치 시점에 설정한 비밀번호를 입력했습니다.

 

7. 접속 테스트 및 접속 하기

정보를 모두 입력한 이후에는 테스트(T) 버튼을 눌러줍니다. 이후 왼쪽 하단에 '상태: 성공' 이라는 메세지가 뜨면 접속 테스트가 성공했음을 뜻합니다.

 

비밀번호 저장이 필요한 경우 체크해 준 뒤 최종적으로 접속(O)를 클릭하여 오라클에 접속해줍니다.

 

8. 접속 화면 및 USER 확인

접속하면 위와 같은 스크립트 화면을 확인할 수 있습니다. 가운데 워크시트가 쿼리를 작성하는 공간입니다.

워크시트에 'SHOW USER;' 를 작성한 뒤 실행(F9)해주면 스크립트 출력 란에 'USER이(가) "SYSTEM"입니다.' 라는 문구를 확인할 수 있습니다. SYSTEM 계정으로 데이터베이스에 접속했음을 뜻합니다.

9. 실습을 위한 HR 계정 생성

실습을 위해서는 HR 계정을 활성화 해야합니다. 실습에 많이 사용되는 인사 데이터를 제공하는데 잠겨있기 때문에 위와 같이 UNLOCK을 해줘야 합니다.

그런 다음에는 새로운 데이터베이스를 위와 같이 추가해줍니다. 접속이름은 실습용HR, 사용자이름 HR, 비밀번호는 1234로 설정했습니다. 앞선 SYSTEM 계정과 동일하게 테스트 및 접속을 클릭해줍니다.

HR계정에 저장되어 있는 테이블 및 뷰 정보를 위와 같이 확인할 수 있습니다. 앞으로 실습에 활용할 여러 데이터가 담겨있는 것을 알 수 있습니다.

 

10. (참고) HR 계정 언락이 안되는 경우

HR계정 언락 명령어가 안되는 경우가 있습니다. oracle에서 HR계정에 대해 자동으로 권한을 부여해주지 않은 탓이라고 하는데요. 이러한 경우 아래와 같이 수동으로 DB정보를 불러와 주어야 합니다.

 

우선 다음의 깃허브 사이트(https://github.com/oracle/db-sample-schemas/releases/tag/v19.2)에서 데이터 파일을 다운 받은 뒤에 C:\app\user\product\21c\dbhomeXE\demo\schema 경로에 압축을 해제해 줍니다.

 

 

그리고 cmd 창을 실행한 뒤 sqlplus를 실행해주고 SYSTEM 사용자로 로그인 해줍니다.

그리고 위와 같은 명령어를 작성해주어 세션을 변경해줍니다.

human_resources 폴더 밑에 있는 hr_main.sql을 실행해주고 위와 같이 정보들을 입력해줍니다. parameter 4의 경우엔 SYSTEM 계정의 비밀번호를 입력해주고 parameter 6의 경우엔 IP와 포트명을 입력해주어야 합니다.

사용자가 생성되고 권한이 부여된 것을 확인할 수 있습니다.

저의 경우에는 hr_main.sql 실행 시에 위와 같이 sql이 open에 실패했다는 문구가 계속해서 나왔습니다. 그래서 맨 마지막 줄에 작성한 것 처럼 sql 파일 하나씩 그냥 직접 실행해주는 방법으로 최종 완료 할 수 있었습니다. 여기까지 마친 뒤에 다시 9번으로 돌아가서 실행한다면 무난하게 진행이 가능하실 거라고 생각됩니다.

 

이렇게 이번 포스팅에서는 Oracle SQL Developer를 설치하고 실습을 위한 HR 계정을 생성하는 방법까지 알아 봤습니다. 이제 실습을 위한 환경은 어느 정도 마련이 되었으니 다음 부터는 직접 실습을 하며 Oracle SQL의 작동 방법에 대해서 하나씩 진행해봐야 할 것 같습니다. 읽어 주셔서 감사 드립니다.

 

 

[출처]https://mydatanote.tistory.com/5

 

[Oracle] Oracle SQL Developer 설치 및 계정 생성하기

Oracle SQL을 개인용 PC에 설치해서 실습해보기 위해서는 크게 2가지가 필요합니다. 첫 번째는 Oracle Database Express, 두 번째는 Oracle SQL Developer입니다. 지난 글에서 Oracle Database Express를 설치한..

mydatanote.tistory.com

 

 

 


◎샘플 스키마(예제파일) 설치 방법

▶오라클 버전에 맞는 샘플스키마를 해당 폴더에 압축 풀것

db-sample-schemas-21.1.tar

 

 


 

SQL PLUS  작성 내용

 

Microsoft Windows [Version 10.0.19042.1526]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>sqlplus

SQL*Plus: Release 21.0.0.0.0 - Production on 금 2월 25 13:16:45 2022
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

사용자명 입력: SYSTEM
비밀번호 입력:
마지막 성공한 로그인 시간: 금 2월  25 2022 13:12:30 +09:00

다음에 접속됨:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0

SQL> ALTER SESSION SET "_ORACLE_SCRIPT"=true;

세션이 변경되었습니다.

SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
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:
4의 값을 입력하십시오: oraclepw

specify log path as parameter 5:
5의 값을 입력하십시오: D:\Oracle\dbhomeXE\demo\schema\log

specify connect string as parameter 6:
6의 값을 입력하십시오: localhost:1521

DROP USER hr CASCADE
*
1행에 오류:
ORA-01940: 현재 접속되어 있는 사용자는 삭제할 수 없습니다


CREATE USER hr IDENTIFIED BY hr
            *
1행에 오류:
ORA-01920: 사용자명 'HR'(이)가 다른 사용자나 롤 이름과 상충됩니다



사용자가 변경되었습니다.


사용자가 변경되었습니다.


권한이 부여되었습니다.


권한이 부여되었습니다.

연결되었습니다.

권한이 부여되었습니다.

ERROR:
ORA-01017: 사용자명/비밀번호가 부적합, 로그온할 수 없습니다.


경고: 이제는 ORACLE에 연결되어 있지 않습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_cre.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_popul.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_idx.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_code.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_comnt.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_analz.sql"을 열 수 없습니다.
SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
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:
4의 값을 입력하십시오: 1111

specify log path as parameter 5:
5의 값을 입력하십시오: D:\Oracle\dbhomeXE\demo\schema\log

specify connect string as parameter 6:
6의 값을 입력하십시오: localhost:1521

SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
연결되었습니다.

권한이 부여되었습니다.

ERROR:
ORA-01017: 사용자명/비밀번호가 부적합, 로그온할 수 없습니다.


경고: 이제는 ORACLE에 연결되어 있지 않습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_cre.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_popul.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_idx.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_code.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_comnt.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_analz.sql"을 열 수 없습니다.
SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
1의 값을 입력하십시오: SYSTEM

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:
4의 값을 입력하십시오: 1111

specify log path as parameter 5:
5의 값을 입력하십시오: @?/demo/schema/human_resources/hr_main.sql

specify connect string as parameter 6:
6의 값을 입력하십시오:
SP2-0137: DEFINE의 등호 뒤에 값이 필요합니다.

SP2-0556: 부적합한 파일명입니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
연결되었습니다.

권한이 부여되었습니다.

ERROR:
ORA-01017: 사용자명/비밀번호가 부적합, 로그온할 수 없습니다.


경고: 이제는 ORACLE에 연결되어 있지 않습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_cre.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_popul.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_idx.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_code.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_comnt.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_analz.sql"을 열 수 없습니다.
현재 스풀되지 않고 있습니다.
SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
1의 값을 입력하십시오: SYSTEM

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:
4의 값을 입력하십시오: 1111

specify log path as parameter 5:
5의 값을 입력하십시오: D:\Oracle\dbhomeXE\demo\schema\log

specify connect string as parameter 6:
6의 값을 입력하십시오: localhost:1521

SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
연결되었습니다.

권한이 부여되었습니다.

ERROR:
ORA-01017: 사용자명/비밀번호가 부적합, 로그온할 수 없습니다.


경고: 이제는 ORACLE에 연결되어 있지 않습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_cre.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_popul.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_idx.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_code.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_comnt.sql"을 열 수 없습니다.
SP2-0310: 파일 "__SUB__CWD__/human_resources/hr_analz.sql"을 열 수 없습니다.
SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
1의 값을 입력하십시오: 1111

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:
4의 값을 입력하십시오: 1111

specify log path as parameter 5:
5의 값을 입력하십시오: D:\Oracle\dbhomeXE\demo\schema\log

specify connect string as parameter 6:
6의 값을 입력하십시오: localhost:1521

SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
SP2-0640: 연결되지 않았습니다.
연결되었습니다.

권한이 부여되었습니다.

연결되었습니다.

Session altered.


Session altered.

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> @?/demo/schema/human_resources/hr_cre.sql
******  Creating REGIONS table ....

Table created.


Index created.


Table altered.

******  Creating COUNTRIES table ....

Table created.


Table altered.

******  Creating LOCATIONS table ....

Table created.


Index created.


Table altered.


Sequence created.

******  Creating DEPARTMENTS table ....

Table created.


Index created.


Table altered.


Sequence created.

******  Creating JOBS table ....

Table created.


Index created.


Table altered.

******  Creating EMPLOYEES table ....

Table created.


Index created.


Table altered.


Table altered.


Sequence created.

******  Creating JOB_HISTORY table ....

Table created.


Index created.


Table altered.

******  Creating EMP_DETAILS_VIEW view ...

View created.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_popul.sql

Session altered.

******  Populating REGIONS table ....

1 row created.


1 row created.


1 row created.


1 row created.

******  Populating COUNTIRES table ....

1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.

******  Populating LOCATIONS table ....

1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.

******  Populating DEPARTMENTS table ....

Table altered.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.

******  Populating JOBS table ....

1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.

******  Populating EMPLOYEES table ....

1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.

******  Populating JOB_HISTORY table ....

1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


1 row created.


Table altered.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_idx.sql

Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_code.sql

Procedure created.


Trigger created.


Trigger altered.


Procedure created.


Trigger created.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_comnt.sql

Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_analz.sql

PL/SQL procedure successfully completed.

SQL>
SQL> exit
Disconnected from Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0

C:\WINDOWS\system32>sqlplus

SQL*Plus: Release 21.0.0.0.0 - Production on 금 2월 25 13:36:35 2022
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

사용자명 입력: kyu
비밀번호 입력:
ERROR:
ORA-01005: 널 비밀번호가 입력되었습니다. 로그온이 허락되지 않습니다.


사용자명 입력: kyu
비밀번호 입력:
마지막 성공한 로그인 시간: 금 2월  25 2022 13:33:52 +09:00

다음에 접속됨:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0

SQL>
SQL>  ALTER SESSION SET "_ORACLE_SCRIPT"=true;

세션이 변경되었습니다.

SQL>  @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
1의 값을 입력하십시오: 1111

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:
4의 값을 입력하십시오: 1111

specify log path as parameter 5:
5의 값을 입력하십시오: D:\Oracle\dbhomeXE\demo\schema\log

specify connect string as parameter 6:
6의 값을 입력하십시오: localhost:1521

DROP USER hr CASCADE
*
1행에 오류:
ORA-01940: 현재 접속되어 있는 사용자는 삭제할 수 없습니다


CREATE USER hr IDENTIFIED BY 1111
            *
1행에 오류:
ORA-01920: 사용자명 'HR'(이)가 다른 사용자나 롤 이름과 상충됩니다



사용자가 변경되었습니다.


사용자가 변경되었습니다.


권한이 부여되었습니다.


권한이 부여되었습니다.

연결되었습니다.

권한이 부여되었습니다.

연결되었습니다.

Session altered.


Session altered.

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> @?/demo/schema/human_resources/hr_cre.sql
******  Creating REGIONS table ....
CREATE TABLE regions
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE UNIQUE INDEX reg_id_pk
                    *
ERROR at line 1:
ORA-00955: name is already used by an existing object


                 PRIMARY KEY (region_id)
                 *
ERROR at line 3:
ORA-02260: table can have only one primary key


******  Creating COUNTRIES table ....
CREATE TABLE countries
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


                 FOREIGN KEY (region_id)
                 *
ERROR at line 3:
ORA-02275: such a referential constraint already exists in the table


******  Creating LOCATIONS table ....
CREATE TABLE locations
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE UNIQUE INDEX loc_id_pk
                    *
ERROR at line 1:
ORA-00955: name is already used by an existing object


                 PRIMARY KEY (location_id)
                 *
ERROR at line 3:
ORA-02260: table can have only one primary key


CREATE SEQUENCE locations_seq
                *
ERROR at line 1:
ORA-00955: name is already used by an existing object


******  Creating DEPARTMENTS table ....
CREATE TABLE departments
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE UNIQUE INDEX dept_id_pk
                    *
ERROR at line 1:
ORA-00955: name is already used by an existing object


                 PRIMARY KEY (department_id)
                 *
ERROR at line 3:
ORA-02260: table can have only one primary key


CREATE SEQUENCE departments_seq
                *
ERROR at line 1:
ORA-00955: name is already used by an existing object


******  Creating JOBS table ....
CREATE TABLE jobs
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE UNIQUE INDEX job_id_pk
                    *
ERROR at line 1:
ORA-00955: name is already used by an existing object


                 PRIMARY KEY(job_id)
                 *
ERROR at line 3:
ORA-02260: table can have only one primary key


******  Creating EMPLOYEES table ....
CREATE TABLE employees
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE UNIQUE INDEX emp_emp_id_pk
                    *
ERROR at line 1:
ORA-00955: name is already used by an existing object


                     PRIMARY KEY (employee_id)
                     *
ERROR at line 3:
ORA-02260: table can have only one primary key


                 FOREIGN KEY (manager_id)
                 *
ERROR at line 3:
ORA-02275: such a referential constraint already exists in the table


CREATE SEQUENCE employees_seq
                *
ERROR at line 1:
ORA-00955: name is already used by an existing object


******  Creating JOB_HISTORY table ....
CREATE TABLE job_history
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE UNIQUE INDEX jhist_emp_id_st_date_pk
                    *
ERROR at line 1:
ORA-00955: name is already used by an existing object


      PRIMARY KEY (employee_id, start_date)
      *
ERROR at line 3:
ORA-02260: table can have only one primary key


******  Creating EMP_DETAILS_VIEW view ...

View created.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_popul.sql

Session altered.

******  Populating REGIONS table ....
INSERT INTO regions VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.REG_ID_PK) violated


INSERT INTO regions VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.REG_ID_PK) violated


INSERT INTO regions VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.REG_ID_PK) violated


INSERT INTO regions VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.REG_ID_PK) violated


******  Populating COUNTIRES table ....
INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


INSERT INTO countries VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.COUNTRY_C_ID_PK) violated


******  Populating LOCATIONS table ....
INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


INSERT INTO locations VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.LOC_ID_PK) violated


******  Populating DEPARTMENTS table ....

Table altered.

INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


INSERT INTO departments VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.DEPT_ID_PK) violated


******  Populating JOBS table ....
INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


INSERT INTO jobs VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JOB_ID_PK) violated


******  Populating EMPLOYEES table ....
INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


INSERT INTO employees VALUES
*
ERROR at line 1:
ORA-00001: unique constraint (HR.EMP_EMAIL_UK) violated


******  Populating JOB_HISTORY table ....
INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated


INSERT INTO job_history
*
ERROR at line 1:
ORA-00001: unique constraint (HR.JHIST_EMP_ID_ST_DATE_PK) violated



Table altered.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_idx.sql
CREATE INDEX emp_department_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX emp_job_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX emp_manager_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX emp_name_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX dept_location_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX jhist_job_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX jhist_employee_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX jhist_department_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX loc_city_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX loc_state_province_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


CREATE INDEX loc_country_ix
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object



Commit complete.

SQL> @?/demo/schema/human_resources/hr_code.sql

Procedure created.


Trigger created.


Trigger altered.


Procedure created.


Trigger created.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_comnt.sql

Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Commit complete.

SQL> @?/demo/schema/human_resources/hr_analz.sql

PL/SQL procedure successfully completed.

SQL> select * from emploees where rownum=1;
select * from emploees where rownum=1
              *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> select * from employees where rownum=1;

EMPLOYEE_ID FIRST_NAME
----------- ----------------------------------------
LAST_NAME
--------------------------------------------------
EMAIL
--------------------------------------------------
PHONE_NUMBER                             HIRE_DATE    JOB_ID
---------------------------------------- ------------ --------------------
    SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
---------- -------------- ---------- -------------
        100 Steven
King
SKING
515.123.4567                             17-JUN-03    AD_PRES
     24000                                      90


1 row selected.

SQL>
728x90

'Oracle' 카테고리의 다른 글

[ORACLE]SQL 병렬쿼리 활용 조회 성능 향상  (0) 2022.09.26
조건에서 값을 입력받아 특정 데이터 추출하기  (0) 2022.04.04
[오라클]작업 TIP _ 기존 테이블  (0) 2022.03.31
OVER()절  (0) 2022.02.27
ORCLE 문법  (0) 2022.02.26

댓글