Oracle建立HR模式
官方帮助
写道
Installing the HR Schema
All scripts necessary to create Human Resource (HR) schema reside in $ORACLE_HOME/demo/schema/human_resources.
You need to call only one script, hr_main.sql, to create all the objects and load the data. Running hr_main.sql accomplishes the following tasks:
1.Prompts for passwords and tablespace names used within the scripts
2.Removes any previously installed HR schema
3.Creates the user HR and grants the necessary privileges
4.Connects as HR
5.Calls the scripts that create and populate the schema objects
For a complete listing of the scripts and their functions, refer to Table 4-1.
A pair of optional scripts, hr_dn_c.sql and hr_dn_d.sql, is provided as a schema extension. To prepare the HR schema for use with the directory capabilities of Oracle Internet Directory, run the hr_dn_c.sql script. If you want to return to the initial setup of the HR schema, then use the hr_dn_d.sql script to undo the effects of the hr_dn_c.sql script.
The hr_drop.sql script is used to drop the HR schema.
?
翻译
?
$ORACLE_HOME/demo/schema/human_resources下面的所有sql脚本对于创建HR模式都是必须的。
你只需要调用hr_mian.sql就可以建立所有的对象并且添加数据,运行hr_main.sql脚本完成下面的任务:
1 填写脚本中需要的密码和表空间
2 移除以前安装的HR模式
3 创建HR用户并赋予相应权限
4 连接到HR
5 调用创建和移植模式对象的脚本
完整的脚本和函数列表,可以参考Table4-1
hr_drop.sql脚本用来移除HR模式。
?
简单的创建方式
1 下载human_resources.zip
2 解压到%ORACLE_HOME%/demo/schema/human_resources/目录下
3 在sys或system用户下运行hr_main.sql脚本,在PL/SQL Developer工具下即用导入sql文件方式:tools菜单-->import tables菜单项-->sql inserts选项卡-->import file选中hr_main.sql-->import
4 输入必要地参数
?
下面是我自己个人的一些设置:
hr用户密码:hr
表空间:users
<