默认情况下是不创建hr用户和表的,我们可以通过dbca和script两种方式创建,我们这里通过script方式创建现在我通过script方式创建hr用户和表
1、从网上得到hr用户的脚本2、把脚本放入$Oracle_HOME/demo/schema/human_resources目录
hr_analz.sql hr_comnt.sql hr_dn_c.sql hr_drop.sql hr_main.sql
hr_code.sql hr_cre.sql hr_dn_d.sql hr_idx.sql hr_popul.sql
把以上脚本放入$ORACLE_HOME/demo/schema/human_resources目录中
- cd $ORACLE_HOME/demo/schema/human_resources
- [root@IM-8-201 human_resources]# sqlplus sys/sys as sysdba @hr_main.sql
-
- SQL*Plus: Release 10.2.0.4.0 - Production on Tue Nov 15 21:40:44 2011
-
- Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
-
-
- Connected to:
- Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
-
- specify password for HR as parameter 1:
- Enter value for 1: hr
-
- specify default tablespeace for HR as parameter 2:
- Enter value for 2: user
-
- specify temporary tablespace for HR as parameter 3:
- Enter value for 3: temp
-
- specify password for SYS as parameter 4:
- Enter value for 4: sys
- specify log path as parameter 5:
- Enter value for 5:/home/oracle
- ..............................
- PL/SQL procedure successfully completed.
-
-
- PL/SQL procedure successfully completed.
-
- SQL>
3、验证 - SQL> select table_name from user_tables;
-
- TABLE_NAME
- ------------------------------
- REGIONS
- LOCATIONS
- DEPARTMENTS
- JOBS
- EMPLOYEES
- JOB_HISTORY
- COUNTRIES
-
- 7 rows selected.
Oracle执行计划 讲解(二)Linux下C连接MySQL数据库方法相关资讯 Oracle基础教程
- Oracle块编程返回结果集详解 (11/10/2013 10:45:58)
- Oracle基础教程之设置系统全局区 (08/22/2013 14:24:00)
- Oracle基础教程知识点总结 (06/18/2013 07:43:32)
| - Oracle基础教程之tkprof程序详解 (10/22/2013 11:49:50)
- Oracle基础教程之sqlplus汉字乱码 (07/18/2013 16:30:00)
- Oracle 管理之 Linux 网络基础 (02/16/2013 18:37:35)
|
本文评论 查看全部评论 (0)