Create hr users and tables

Source: Internet
Author: User

By default, hr users and tables are not created. You can create a table by using dbca or script.

Now I create hr users and tables in script Mode

1. Obtain the hr user script from the Internet

2. Add the script to the $ Oracle_HOME/demo/schema/human_resources directory.

Hr_anz. 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

Put the preceding script in the $ ORACLE_HOME/demo/schema/human_resources directory.

  1. Cd $ ORACLE_HOME/demo/Schema/Human_resources
  2. [Root @ IM-8-201 human_resources] # sqlplus sys/sysAsSysdba @ hr_main. SQL
  3. SQL * Plus: Release 10.2.0.4.0-ProductionOnTue Nov 15 21:40:44 2011
  4. Copyright (c) 1982,200 7, Oracle.AllRights Reserved.
  5. ConnectedTo:
  6. OracleDatabase10g Enterprise Edition Release 10.2.0.4.0-64bit Production
  7. WithThe Partitioning, OLAP, Data MiningAnd RealApplication Testing options
  8. SpecifyPassword ForHRAsParameter 1:
  9. Enter valueFor1: hr
  10. SpecifyDefaultTablespeaceForHRAsParameter 2:
  11. Enter valueFor2:User
  12. SpecifyTemporaryTablespaceForHRAsParameter 3:
  13. Enter valueFor3:Temp
  14. SpecifyPassword ForSYSAsParameter 4:
  15. Enter valueFor4: sys
  16. Specify log pathAsParameter 5:
  17. Enter valueFor5:/home/oracle
  18. ..............................
  19. PL/SQLProcedureSuccessfully completed.
  20. PL/SQLProcedureSuccessfully completed.
  21. SQL>
3. Verification
  1. SQL>SelectTable_nameFromUser_tables;
  2. TABLE_NAME
  3. ------------------------------
  4. REGIONS
  5. LOCATIONS
  6. Administrative ments
  7. JOBS
  8. EMPLOYEES
  9. JOB_HISTORY
  10. COUNTRIES
  11. 7RowsSelected.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.