1Z0-051-Oracle的 HR 样例用户的建立
admin
2023-05-02 10:43:33
0

Oracle的 HR 样例用户的建立

1、oracle 11g 中hr用户需要单独安装,比较麻烦,书本上学习例子很多都是HR用户的案例 ,下载后释放到 $ORACLE_HOME/demo/schema/human_resources/目录下。

 

Script Name       


Description

hr_analz.sql

Collects statistics  on the tables in the schema.

hr_code.sql

Creates procedural  objects in the schema.

hr_comnt.sql

Creates comments  for each object in the schema.

hr_cre.sql

Creates  the HR objects.

hr_dn_c.sql

Adds  the distinguished name column used by Oracle Internet Directory to the employees and departments tables.

hr_dn_d.sql

Drops  the Oracle Internet Directory distinguished name column from employees and departments .

hr_drop.sql

Drops  the HR schema and all its objects.

hr_idx.sql

Creates  indexes on the HR tables.

hr_main.sql

Main  script for the HR schema; calls other  scripts.

hr_popul.sql

Populates the  objects.

 

 

2、[oracle@OCM]$sqlplus / as sysdba;

 

3、执行$ORACLE_HOME/demo/schema/human_resources/下的hr_main.sql

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

注:

1、安装前需要使用root用户对human_resources下的文件执行:chmod 777 *。

2、安装前需要确定5个参数。分别是:

HR用户的密码:dbbocom;

默认用户空间:users。(必须是已经存在的用户空间)

临时用户空间:temp。(必须是已经存在的用户空间)

SYS用户的密码:dbbocom

日志文件存放的目录:$ORACLE_HOME/RDBMS/log

 

HR人事管理数据库下载地址:

http://down.51cto.com/data/1037205

或者:

http://download.csdn.net/detail/johnlxj/6689713

 

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

 

specify password for HR as parameter 1:

Enter value for 1: dbbocom

 

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: dbbocom

 

specify log path as parameter 5:

Enter value for 5: /home/oracle/app/oracle/

 

DROP USER hr CASCADE

          *

ERROR at line 1:

ORA-01918: user 'HR' does not exist

 

 

old   1: CREATE USER hr IDENTIFIED BY &pass

new   1: CREATE USER hr IDENTIFIED BY dbbocom

 

User created.

 

old   1: ALTER USER hr DEFAULT TABLESPACE &tbs

new   1: ALTER USER hr DEFAULT TABLESPACE users

old   2: QUOTA UNLIMITED ON &tbs

new   2: QUOTA UNLIMITED ON users

 

User altered.

 

old   1: ALTER USER hr TEMPORARY TABLESPACE &ttbs

new   1: ALTER USER hr TEMPORARY TABLESPACE temp

PL/SQL procedure successfully completed.

...

PL/SQL procedure successfully completed.

 

检查是否正确安装完毕

SQL> show user

USER is "HR"


相关内容

热门资讯

国家数据局:支持地方通过“以数... 记者从国家数据局了解到,“数据要素×”城市行活动今天在南京启动,国家层面将支持各地积极挖...
河南多地出现巨大“不明飞行物”... 5月12日晚8点左右,安阳、新乡、焦作……河南多地夜空中出现一团发光“水母云”。这到底是什么东西呢?...
外交部:中方欢迎特朗普总统对中... 5月13日,外交部发言人郭嘉昆主持例行记者会。有记者就美国总统特朗普访华行前的相关言论提问。郭嘉昆表...
外交部质问日本右翼势力:是要打... 外交部:日本重走军国主义的回头路是一条不归路5月13日,外交部发言人郭嘉昆主持例行记者会。有记者问:...
2025年许昌市国民经济和社会... 【大河财立方消息】 5月12日,许昌市统计局、国家统计局许昌调查队发布2025年许昌市国民经济和社会...
我国首条深水油气装备工艺管线智... (来源:中国水运网) 转自:中国水运网 5月10日,海洋石油工程股份有限公司(简称“海油工程”)发布...
成都中科唯实申请一种真空蝶阀专... 国家知识产权局信息显示,成都中科唯实仪器有限责任公司申请一项名为“一种真空蝶阀”的专利,公开号CN1...
华为充电宝怎么样?西圣、图拉斯... 现如今市面上的选择可见是越来越多了,但“踩雷”情况也很常见:有的看起来容量大、实际给手机充电虚标非常...
智己汽车充电地图接入华为超充 ... 【CNMO科技消息】5月13日,智己汽车宣布,华为超充已正式上线其充电地图服务。即日起,智己用户可通...
爆火短剧《enemy》导演否认... 近日,短剧《enemy》凭借震撼人心的台词与浓烈的家国情怀爆火出圈。据钱江视频,5月13日,《ene...