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. HDU 2577 分情况多维DP

    How to Type Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

  2. Hibernate批量处理数据、[HQL连接查询]

    一.批量处理操作 批量处理数据是指在一个事务场景中处理大量数据.在应用程序中难以避免进行批量操作,Hibernate提供了以下方式进行批量处理数据: (1)使用HQL进行批量操作 数据库层面 (2)使 ...

  3. jquery属性值选择器

    $("[attribute|='value']") 选择指定属性值等于给定字符串或改字符串为前缀(该字符串后跟一个连字符“-”)的元素. attribute: 一个属性名 valu ...

  4. vue2 简单的留言板

    没有写样式,只是写个功能 <template> <div class="headers"> <div class="form"&g ...

  5. 【javascript基础】之【__lookupSetter__ 跟 __lookupSetter__】

    描述: 返回getter setter所定义的函数 语法: obj.__lookupGetter__(sprop) 参数: getter setter中定义的字符串属性 注意:这不是标准的方法,ecm ...

  6. [批处理]自动修改本机IP地址

    前言 抱着笔记本经常到处跑的人,今天回宿舍上网,明天去机房上网,后面去办公室上网,每到一个地方,都要更换一次IP网关掩码 如果都是DHCP还好,关键是为了组织为了方便管理这些地方都是使用的静态IP,所 ...

  7. [批处理]Oracle启动助手

    前段日子开始学Oracle数据库,但是由于Oracle数据库的服务启动时间很长 所以机房的里面所有电脑的Oracle服务全部是被禁用的 所以每次上机使用的时候都要先进服务管理,然后把禁用更改为手动模式 ...

  8. ubuntu修改分辨率

    ubuntu分辨率真是坑爹,不知什么原因,ubuntu分辨率一下子变了,通过,显示->分辨率,都改不过来... 无奈,有重装系统的冲动,从网上找了很多方法,都不管用,有一次,在这里 sudo g ...

  9. 20155239 2016-2017-2 《Java程序设计》第8周学习总结

    教材学习内容总结 - NIO 在Java1.4之前的I/O系统中,提供的都是面向流的I/O系统,系统一次一个字节地处理数据,一个输入流产生一个字节的数据,一个输出流消费一个字节的数据,面向流的I/O速 ...

  10. swift3.0  代码创建经典界面的九宫图--优化篇

    在上一篇只是简单实现了九宫图效果,本章需要形成APP界面九宫图效果 override func viewDidLoad() { super.viewDidLoad() createnine() } / ...