D17108GC21 Setup
D17108GC21 Setup
D17108GC21 Setup
Thank you for choosing Oracle University. This document contains course specific information only. It
does not describe the steps to install and replicate the technical environment for which this course was
designed. Before proceeding, you may find it helpful to print this document for ease of reference.
This is the setup document for the course Oracle Database 10g: SQL Fundamentals I. Instructions are
provided to set up the server, database accounts, client, middle tier, and class files. Overall, one database
on the server is recommended. The sample schema shipped with the database is used for this course and
cloned for several users using scripts provided. iSQL*Plus is set up on middle tier as an interface to the
server data. The database and midtier server setup is based on Oracle Database 10g for Linux. The
client/middle tier software is based on Oracle Database 10g for Windows 2000/NT.
Configurations
This class setup employs a Client/Server architecture (Linux server, windows client). The database and the
middle tier (iSQL*Plus) are installed on the Linux server. Each student requires one desktop Microsoft
Windows PC.
Please be sure to thoroughly test your configuration and discuss this in detail with your Oracle University
Representative.
Oracle University does not provide product software or licenses for on-site training events.
This document assumes possession of all applicable Oracle software and associated licenses.
It is not possible to provide a complete and thorough installation guide in this document,
though effort is made to include important directions to follow when performing the
installation. Customers with product installation issues should open a Technical Assistance
Request (TAR) with Oracle World Wide Support for resolution.
Software installation documents can be found at:
http://www.oracle.com/technology/documentation/index.html
Required Files
1. This setup document
2. The lab files contained in D17108GC21_labs.zip. If you are missing all or part of these files,
please contact your Oracle University Representative
3. The course specific setup files, including files required to reside on the server contained in
D17108GC21_setup_files.zip
setup1.sql
hr_popul.sql
hr_main.sql
hr_idx.sql
hr_cre.sql
2
Copyright 2006, Oracle Corporation. All rights reserved.
hr_drop.sql
hr_comnt.sql
hr_code.sql
del_data.sql
creteach_a.sql
create_users1-20.sql
create_tables.ql
confidence.sql
dis_trigger.sql
user_drop.sql
Name Part #
Oracle 10g Database Release 2 (10.2.0.1.0) Enterprise B24219-01
Edition
-
Oracle JDeveloper 10g Release 3 (10.1.3)
http://www.oracle.com/technology/software/products/jdev/
index.html
Operating System Red Hat Enterprise Linux AS 3.0 Update 4 (Kernel 25) with FTP,
VNC, SSH
For this course, the Middle Tier server resides on the Database server, which is explained above.
Set up Instructions
You need to configure Linux for Oracle and install the database and middle tier (iSQL*Plus) on a
Linux server. It is recommended that you refer to the installation documents for details. The
3
Copyright 2006, Oracle Corporation. All rights reserved.
installation documents are available at: http://www.oracle.com/pls/db102/homepage
1.You need to install software and configure the network on the CLASSROOM SERVER.
2. Obtain all the zip files as specified in the Required Files section above. The files for the classroom
setup contain both scripts for running on the Classroom Server, as well as files for the Classroom
Workstations. You may want to extract the zip files to a windows machine and ftp and/or copy files as
necessary.
Make sure the .bash_profile contain the following entries. You can customize the SID to fit
your environment.
umask022
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386:
$ORACLE_HOME/jdk/jre/lib/i386/server:
$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATH
PATH=$ORACLE_HOME/bin:$PATH
exportPATHLD_LIBRARY_PATH
exportORACLE_BASEORACLE_HOMEORACLE_SID
4
Copyright 2006, Oracle Corporation. All rights reserved.
Make sure of the following during the installation:
Installation Type Enterprise Edition is selected.
Create a starter database and General Purpose is selected.
Note: iSQL*Plus will be installed and configured with port 5560 automatically. Once configured, it can be
accessed in the browser by typing the URL: <http://Hostname:5560/isqlplus, where
Hostname is the hostname you set up.
The following course specific parameters need to be set in the init.ora file:
query_rewrite_enabled = TRUE
5. Install Courseware on the Server Side. In this phase you will run the scripts to create the user accounts
and tables for the course.
1. Shutdown the database.
2. Unzip the D17108GC21_setup_files.zip file supplied into users home directory. This
zip file has all the setup files for SQL Fundamentals I
3. Start the database using course specific init.ora.
4. Unlock system user account. Ensure that the system user password is oracle.
5. For SQL Fundamentals I:
Run the script setup1.sql. This file will create 20 user accounts named ora1 through
ora20 and an instructor account as teach_a
All the student user accounts ora1 through ora20 and the instructor account teach_a are
created with reduced HR schema.
It is important to note that the scripts specify pathing. If you need to adjust path names, edit the
files.
Note: The default tablespace is USERS, and temporary tablespace is temp. The password for
sys, and system is oracle.
5
Copyright 2006, Oracle Corporation. All rights reserved.
SELECT count(*) FROM tab;
Expected result: 9
6
Copyright 2006, Oracle Corporation. All rights reserved.
If you are not using the same platform (system and operating system) as described in this table, please
consult the installation guide for your specific platform.
Each student (student group) requires 1 desktop that meet the following requirements:
7
Copyright 2006, Oracle Corporation. All rights reserved.
4. Install Courseware on Client machines. All code examples, demos, labs, and solution files are placed on
each CLASSROOM WORKSTATION during the course setup. A folder structure is created that is course
specific. The following folder structure is an example of a typical Client/Server course.
For the client side courseware files, use the zip file D17108GC21_labs.zip.
Non-Oracle software: Prior to starting the install, have Internet Explorer 6.0.2800.1106, WinZip,
Notepad or WordPad available, and create desktop shortcuts for each.
Also recommended:
telnet software-Optional
Microsoft word-Viewer
Microsoft PowerPoint-Viewer
FTP software-Optional
Start Internet explorer and type the IP address provided for the database as URL. This opens iSQL*Plus
login screen. Connect using any username and password (example ora7/ora7). Connect
string should match the Oracle SID you created in a step as mentioned earlier in this document.
8
Copyright 2006, Oracle Corporation. All rights reserved.
SELECT count(*) FROM departments;
Expected result: 8
This course is comprised of two modules. The first module is Oracle Database 10g: SQL Fundamentals I.
The second module is Oracle Database 10g: SQL Fundamentals II. For the first module, Student User
accounts ora1-20 need to be used. For the second module, Student User accounts ora21-40 need to be
used.
teach_a is the account that should be used by the Instructor for SQL Fundamentals I and teach_b is
the account that should be used by the Instructor for SQL Fundamentals II
Clean Up
Server Clean-Up
1. To remove courseware, delete every ora user you created as such:
SQL> drop user ora1 cascade;
You can run the hr_drop.sql file provided to you in the D17108GC21_setup_files.zip to
have all the users dropped programmatically.
Run user_drop.sql if you want to drop each user individually.
2. To remove the database, insert the Oracle Database 10g CD and select deinstall.
3. To remove course specific files, delete the directories code_ex, demo, labs, and soln.
1. To remove the database, insert the Oracle Database 10g CD and select deinstall.
2. To remove course specific files, delete the directories code_ex, demo, labs, and soln.
9
Copyright 2006, Oracle Corporation. All rights reserved.
We hope your Oracle University training experience was a positive one! For information on additional
training services please visit us at http://education.oracle.com. We look forward to serving you again in
the future.
Glossary of Terminology
Application Server Middle Tier in a 3-Tier or N-Tier architecture. Could consist of the Oracle HTTP
Server, iSQL*Plus, Forms Service, Reports Service and Discoverer Server.
Client Workstation The computer where client software is installed. Client software might include
SQL*Plus, Oracle Forms and Reports Developer, Oracle Designer, JDeveloper, Procedure Builder and an
HTML browser. In a 3-Tier or N-Tier architecture this would be the Client Tier. In the training
environment, this is sometimes known as the student machine.
Database - Collection of data that is treated as a unit. The purpose of a database is to store and retrieve
related information. The database consists of operating system files: data files, control files and redo log
files.
Database Instance - Every time a database is started, a system global area (SGA) is allocated and Oracle
background processes are started. The system global area is an area of memory used for database
information shared by the database users. The combination of the background processes and memory
buffers is called an Oracle instance.
Database Server - Computer where database is created. In a 3-Tier or N-Tier architecture this would be
the Database Tier.
DMP files files created buy the Oracle Export utility. These DMP files are then used by the Oracle
Import utility to import a database, a specific database users objects or a specific set of tables.
Intelligent Agent (IA) - A process running on the server that accepts and runs job requests from the
Oracle Enterprise Manager Console.
Oracle Enterprise Manager (OEM) - a Graphical User Interface tool used to manage oracle databases.
OEM Repository - database that stores information about resources managed through OEM.
Oracle Management Server - provides a scaleable middle tier for processing system management tasks.
It is the optional middle tier of Oracle Enterprise Manager (OEM) n-tier architecture.
ORACLE_HOME - operating system variable that points to the directory where oracle has been installed
ORACLE_SID operating system variable that determines the instance an Oracle application connects
to by default.
iSQLPlus Oracle tool for SQL and PL/SQL application development
10
Copyright 2006, Oracle Corporation. All rights reserved.