Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Establishment of HR sample user for 1Z0-051-Oracle

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Establishment of HR sample user of Oracle

1. Hr users in oracle 11g need to be installed separately, which is troublesome. Many of the learning examples in books are cases of HR users, which are downloaded and released to the $ORACLE_HOME/demo/schema/human_resources/ directory.

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. Execute hr_main.sql under $ORACLE_HOME/demo/schema/human_resources/

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

Note:

1. Before installation, you need to use root users to execute the files under human_resources: chmod 777 *.

2. Five parameters need to be determined before installation. They are:

Password of HR user: dbbocom

Default user space: users. (must be a user space that already exists)

Temporary user space: temp. (must be a user space that already exists)

Password of SYS user: dbbocom

The directory where the log files are stored: $ORACLE_HOME/RDBMS/log

Download address of HR personnel management database:

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

Or:

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.

Check to see if it has been installed correctly

SQL > show user

USER is "HR"

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report