Oracle database tips logo
Article categories | Blog and News Page | SQL | SQL*Plus | DBA Scripts | Standby dbs | Database Links | Techno webcasts | Oracle Magazine | Free IT Magazines | Oracle Database Hosting Companies | Site Search |
RSS
XML RSS
What is this?
AddThis Feed Button

Social Bookmarking


Free Linux Manuals !


A Newbie's Getting Started Guide to Linux



The GNU/Linux Advanced Administration
-- FREE --
IT Magazine
Subscriptions

Oracle Magazine Oracle Magazine Contains technology strategy articles, sample code, tips, Oracle and partner news, how-to articles for developers and DBAs

WebSite Magazine WebSite Magazine Practical advice, helpful tools and insights for website owners

Dr Dobb's Journal Dr Dobb's Journal enables coders to write the most efficient programs and help in daily programming quandaries

DM Review DM Review is recognized as the premier business intelligence, analytics and data warehousing publication
Various other Free IT magazine subscriptions
NoAdware Free Trial

NoAdware Remove
harmful
adware,
spyware,
trojans,
dialers
and worms!
- Featured ebook -

Database Normalization
by Alf Pedersen

Database Normalization ebook Understand and master how to normalize a database using methods richly documented with graphical ERD and server diagram examples

How to create scott and run the
oracle sqlplus demo table creation script.



Create scott and run the oracle sqlplus demo table creation script
by following the instructions below.

Scott is the standard example schema used to run queries and scripts to show how Oracle works.

Scott schema creation.

Create the scott user on your database if it does not already exist.

Connect to the database as a dba user, like sys or system.

SQL> create user scott identified by tiger
default tablespace users temporary tablespace temp profile default;

User created.

SQL> grant connect, resource to scott;

Grant succeeded.

SQL> alter user scott account unlock;

User altered.



Demobuild execution.

The script to create the tables (demobld.sql) is located in
%oracle_home%\sqlplus\demo\demobld.sql
or
$ORACLE_HOME/sqlplus/demo/demobld.sql,
for either windows or unix.

Depending on which version of Oracle you use, it will create the following tables:

  • EMP

  • DEPT

  • BONUS

  • SALGRADE

  • DUMMY

How to run it:

SQL> connect scott/tiger
Connected.

SQl> @?/sqlplus/demo/demobld.sql
Building demonstration tables. Please wait.
Demonstration table build is complete.




To drop the demo tables, run the demodrop.sql script in the same directory.




Return from oracle sqlplus demo table back to oracle-sqlplus-tutorials.