English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to create sample tables - I remember that we can create tables like emp, department, salary with preloaded data for learning purposes.

I do not remember the way to create those tables. Anyone can help on this? Thanks!

2006-09-03 04:17:04 · 4 answers · asked by NickJr 2 in Computers & Internet Software

I recently installed Oracle Express edition in my personal computer and want to try few things. I need sample tables and data in them.

2006-09-03 04:18:51 · update #1

4 answers

They come installed when you installed the database. They are in the HR schema. If you query the dba_users table, you'll probably find an hr user. At least I think that's what the user id is. If you log in via that you can access the schema.

However, if it's not installed, follow these instructions:

Installing the Human Resources (HR) Schema

All scripts necessary to create this schema reside in $ORACLE_HOME/demo/schema/human_resources.

You need to call only one script, hr_main.sql, to create all objects and load the data. Running hr_main.sql accomplishes the following tasks:

Prompts for passwords and tablespace names used within the scripts.

Removes any previously installed HR schema.

Creates the user HR and grants the necessary privileges.

Connects as HR.

Calls the scripts that create and populate the schema objects.



All of this can also be found in Oracle Database Documentation.

2006-09-04 09:12:15 · answer #1 · answered by hatezfate 2 · 0 0

You are talking about creating the schema scott (scott/tiger).

You must connect as a DBA user who is allowed to create another user, such as system or sys. You will then run the script
/rdbms/admin/utlsampl.sql

The value for ORACLE_HOME will vary depending on your operating system, e.g. may be like :
/opt/app/oracle/product/9.2.0 on a unix box or
d:\oracle\ora92

let's say that you can see the script utlsampl.sql and you have your own user account, but can't create a new user... Copy the script to a temporary location and comment out the portion that refers to creating a user. To comment out a line of SQL place 2 consecutive hyphens at the beginning of the line. For example :

-- create user scott identified by tiger
--- default tablespace ...


Copy the rest of the commands (beginning with create table) into your SQL editor and run them, so now the tables (emp, department, etc) will be in your schema. Always check that none of your objects are created in the system tablespace

(select segment_name,tablespace
from dba_segments where owner='')

Good Luck!

2006-09-05 10:00:23 · answer #2 · answered by xamayca.com 4 · 0 0

An Oracle database is a decision of archives taken care of as a unit. the objective of a database is to save and retrieve appropriate information. A database server is the main to fixing the themes of understanding administration. in maximum situations, a server reliably manages a multitude of archives in a multiuser environment so as that many clientele can concurrently get entry to the comparable archives. All it fairly is executed mutually as handing over severe overall performance. A database server additionally prevents unauthorized get entry to and can supply powerful recommendations for failure restoration. Oracle Database is the 1st database designed for business enterprise grid computing, the main versatile and least high priced thank you to regulate information and purposes. business enterprise grid computing creates super swimming pools of industry-widely used, modular storage and servers. With this shape, each and each new gadget might properly be in the present day provisioned from the pool of aspects. there is not any want for height workloads, because of the fact potential might properly be actual further or reallocated from the source swimming pools as needed.

2016-11-06 08:22:23 · answer #3 · answered by pachter 4 · 0 0

they come when installed.. with option sample data checked..

2006-09-03 04:33:57 · answer #4 · answered by deval_agrifarman 6 · 0 0

fedest.com, questions and answers