Oracle 11gR2中HR用户安装说明
1.脚本下载: 链接:
1,脚本放在这个目录下
$ORACLE_HOME/demo/schema/human_resources
hr_analz.sql
hr_code.sql
hr_comnt.sql
hr_cre.sql
hr_dn_c.sql
hr_dn_d.sql
hr_drop.sql
hr_idx.sql
hr_main.sql
hr_popul.sql
各个脚本的用途:
2,执行hr_main.sql主脚本,这个脚本会调用其他脚本
[oracle@oracle]$ sqlplus / as sysdba
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
5 rows selected.
SQL> @hr_main.sql
specify password for HR as parameter 1:
Enter value for 1: hr
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 password for SYS as parameter 4:
Enter value for 4: oracle
specify log path as parameter 5:
Enter value for 5: $ORACLE_HOME/demo/schema/log/
....................
3,安装完成后,检查hr用户及该用户下创建的表
SQL> conn hr/hr
Connected.
SQL> SELECT table_name FROM user_tables;
TABLE_NAME
------------------------------
COUNTRIES
JOB_HISTORY
EMPLOYEES
JOBS
DEPARTMENTS
LOCATIONS
REGIONS
7 rows selected.