All scripts necessary to install sample schemas reside in $ORACLE_HOME/demo/schema directory. Before you install sample schemas by running these scripts, follow these guidelines:

  1. You must connect as a system administrator using the SYSDBA privilege.

  2. When prompted to enter a password for the schema, enter a secure password that meets the requirements described in Oracle Database Security Guide.

  3. When prompted for tablespace names while running scripts:

    • Enter an appropriate tablespace name, for example, users as the default tablespace for a schema

    • Enter temp as the temporary tablespace for a schema

  4. When prompted for the log directory name, enter $ORACLE_HOME/demo/schema/log/ or any other existing directory name.

Note:

Make sure that you end the log directory name with a trailing slash, for example, $ORACLE_HOME/demo/schema/log/

Installing the HR Schema

All scripts necessary to create the 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. The following steps provide a summary of the installation process:

  1. Log on to SQL*Plus as SYS and connect using the AS SYSDBA privilege.

    sqlplus connect sys as sysdba
    Enter password: password
  2. To run the hr_main.sql script, use the following command:

    SQL> @?/demo/schema/human_resources/hr_main.sql
    
  3. Enter a secure password for HR

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

    See Also:

    Oracle Database Security Guide for the minimum password requirements

  4. Enter an appropriate tablespace, for example, users as the default tablespace for HR

    specify default tablespace for HR as parameter 2:
    Enter value for 2:
  5. Enter temp as the temporary tablespace for HR

    specify temporary tablespace for HR as parameter 3:
    Enter value for 3:
  6. Enter your SYS password

    specify password for SYS as parameter 4:
    Enter value for 4:
  7. Enter the directory path, for example, $ORACLE_HOME/demo/schema/log/, for your log directory

    specify log path as parameter 5:
    Enter value for 5:

After the hr_main.sql script runs successfully and the HR schema is installed, you are connected as the user HR. To verify that the schema was created, use the following command:

SQL> SELECT       table_name FROM user_tables;

Running hr_main.sql accomplishes the following tasks:

  1. Removes any previously installed HR schema

  2. Creates the user HR and grants the necessary privileges

  3. Connects as HR

  4. Calls the scripts that create and populate the schema objects

Guidelines for Installing Oracle HR Sample Schemas的更多相关文章

  1. Oracle Database Sample Schemas

    本文在Creative Commons许可证下发布 最近在钻研Oracle 11gR2,写SQL缺乏Demo表,研究他家的官方资料时发现一块甲骨文已经给我们准备Sample Schemas.比如说SC ...

  2. Oracle 11g R2 Sample Schemas 安装

    最近准备对之前学习SQL*Loader的笔记进行整理,希望通过官方文档中的示例学习(Case Studies)来进行,但是官方文档中示例学习相关的脚本文件在数据库软件安装完成之后默认并没有提供,而是整 ...

  3. Installing Oracle Database 12c Release 2(12.2) RAC on RHEL7.3 in Silent Mode

    概要 在RHEL7静默方式安装oracle database 12.2 RAC. 一.环境配置 1. 配置hosts文件 cp /etc/hosts /etc/hosts_$(date +%Y%d%m ...

  4. Oracle HR 例子用户的建立 10g,11g均可

    Oracle HR 例子用户的建立 10g,11g均可 先将附件(见文章尾部)上的 10 个 .sql 文件放入这个路径中 : $ORACLE_HOME/demo/schema/human_resou ...

  5. Installing Oracle and ArcSDE on separate servers

    http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002n0000000q000000

  6. Create PDB with Sample schemas in 12C

    查看: SQL> select * from ( 2 select username, account_status from dba_users order by created desc) ...

  7. 如何补装oracle的sample schema

    SQL>@ORACLE_HOME/rdbms/admin/utlsampl.sql; 似乎不够完整,等待补充.

  8. oracle官方文档12c对应关系

    ADDCI Oracle® Database Data Cartridge Developer's Guide 12c Release 1 (12.1) E15882-05 ADFNS Oracle® ...

  9. 【数据泵】EXPDP导出表结构

    [数据泵]EXPDP导出表结构(真实案例) BLOG文档结构图         因工作需要现需要把一个生产库下的元数据(表定义,索引定义,函数定义,包定义,存储过程)导出到测试库上,本来以为很简单的, ...

随机推荐

  1. java并发编程:线程安全管理类--原子操作类--AtomicLong

    可以用原子方式更新的 long 值.有关原子变量属性的描述,请参阅 java.util.concurrent.atomic 包规范.AtomicLong 可用在应用程序中(如以原子方式增加的序列号), ...

  2. winform学习目录

    Winform混合式开发框架的特点总结 伍华聪 2016-02-26 10:47 阅读:1966 评论:2     代码生成工具Database2Sharp中增加视图的代码生成以及主从表界面生成功能  ...

  3. django-pure-pagination使用方法

    1.pip install django-pure-pagination  安装包. 2.加入app: 'pure_pagination', 3.在view中写入分布逻辑. try: page = r ...

  4. 谈一谈手机WebApp的fixed属性(手机上的固定栏)【转】

    1.iphone/android原生app常见结构 似乎,所有的手机应用,都遵循这样的布局:固定的顶部+固定的底部+可滚动在中间区域.这种“雷同”的模式让人恶心,却不得不承认这是一种很规矩却又很实用的 ...

  5. 《转》深入理解Activity启动流程(四)–Activity Task的调度算法

    本文原创作者:Cloud Chou. 出处:本文链接 本系列博客将详细阐述Activity的启动流程,这些博客基于Cm 10.1源码研究. 深入理解Activity启动流程(一)--Activity启 ...

  6. udev学习笔记汇总

    1.什么是udev udev--就是动态设备管理 udev 能够处理设备事件.管理设备文件的权限.在/dev目录中创建额外的符号链接.重命名网络接口,等等. 内核通常仅根据设备被发现的先后顺序给设备文 ...

  7. Telnet远程重启路由器TP-LINK

    突然断网,以前房东的路由器管理页面可以打开,今天突然间就打不开了.ping了下,可以ping通,于是就想起了房东的路由器是TP-LINK的 可以 telnet登陆的.每次,断网,我都会重启房东的路由器 ...

  8. HTML表单 在提交之前 验证表单数字合法性

    function checkform(){ if(!isNumeric($('.apply_money').val())){ alert("必须是数字"); return fals ...

  9. zookeeper命名服务

    zookeeper概念 zooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,底层组成单元是znode,对于zookeeper来说,所有的功能都是基于znode来实现的,因此有万物皆节点 ...

  10. 从 FastAdmin 项目上学了什么?

    从 FastAdmin 项目上学了什么? 接触到 FastAdmin 我学了好多,自己记录一下 Xmind git 系统学习了 Javascript jQuery 重新开始玩 ThinkPHP 开始记 ...