Guidelines for Installing Oracle HR Sample S

系统 1564 0

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


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论