[20200825]手工安裝HR schema.txt

lfree發表於2020-08-25

[20200825]手工安裝HR schema.txt

--//我的測試環境沒有HR schma,有時候測試需要,需要使用它.不知道為什麼我安裝沒有把它選上.好像現在已經無法選上.
--//手工安裝看看.

1.環境:
SYS@test01p> @ ver1
PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

2.安裝HR;
d:\tmp> sqlplus sys/xxxx@test01p as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Aug 25 20:47:48 2020
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SYS@test01p> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
Enter value for 1: btbtms

specify default tablespeace for HR as parameter 2:
Enter value for 2: users

specify temporary tablespace for HR as parameter 3:
Enter value for 3: temp

specify log path as parameter 4:
Enter value for 4: d:\tmp
....

3.檢查:
HR@test01p> select * from tab ;
TNAME                TABTYPE  CLUSTERID
-------------------- ------- ----------
COUNTRIES            TABLE
DEPARTMENTS          TABLE
EMPLOYEES            TABLE
EMP_DETAILS_VIEW     VIEW
JOBS                 TABLE
JOB_HISTORY          TABLE
LOCATIONS            TABLE
REGIONS              TABLE
8 rows selected.

HR@test01p> select * from jobs;
JOB_ID     JOB_TITLE                           MIN_SALARY MAX_SALARY
---------- ----------------------------------- ---------- ----------
AD_PRES    President                                20080      40000
AD_VP      Administration Vice President            15000      30000
AD_ASST    Administration Assistant                  3000       6000
FI_MGR     Finance Manager                           8200      16000
FI_ACCOUNT Accountant                                4200       9000
AC_MGR     Accounting Manager                        8200      16000
AC_ACCOUNT Public Accountant                         4200       9000
SA_MAN     Sales Manager                            10000      20080
SA_REP     Sales Representative                      6000      12008
PU_MAN     Purchasing Manager                        8000      15000
PU_CLERK   Purchasing Clerk                          2500       5500
ST_MAN     Stock Manager                             5500       8500
ST_CLERK   Stock Clerk                               2008       5000
SH_CLERK   Shipping Clerk                            2500       5500
IT_PROG    Programmer                                4000      10000
MK_MAN     Marketing Manager                         9000      15000
MK_REP     Marketing Representative                  4000       9000
HR_REP     Human Resources Representative            4000       9000
PR_REP     Public Relations Representative           4500      10500
19 rows selected.

--//做一個記錄!!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2714670/,如需轉載,請註明出處,否則將追究法律責任。

相關文章