Vous êtes sur la page 1sur 10

Oracle University

Technical Setup Document

Oracle Database 10g: SQL Fundamentals I

Global Course Code: D17108GC21

November 10, 2006

Copyright 2006, Oracle Corporation. All rights reserved.


Overview
Introduction

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.

Software Licenses & Support

Please note the following as it relates to software licenses and support:

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

4. Oracle software CDs required:

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

Oracle SQL Developer 1.0, patch 2 (1.0.0.15.57) -


http://www.oracle.com/technology/software/products/sql/i
ndex.html

Server: Setup Instructions

Hardware Requirements for Database Server

Recommended Hardware Requirements used in our configuration:


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.

System Recommended to use the equivalent of Dell 1650 1.4Ghz x 2


processor(Pentium III) 4Gb memory and 2 - 36gb drives internally.

Operating System Red Hat Enterprise Linux AS 3.0 Update 4 (Kernel 25) with FTP,
VNC, SSH

Physical memory (RAM) 1 GB

Swap Space 2 GB or twice the size of RAM


Disk space 6 GB HDD

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.

3. Configure Linux for Oracle


Requirements:
Create the Linux groups and user account that will be used to install and maintain the Oracle
Database 10g Release 2 software. The user account will be called oracle, and the groups will be
oinstall and dba. Execute the following commands as root:
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle

Set the password on the oracle account:


passwd oracle

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

Make sure the /etc/sysctl.conf has the following:


kernel.sem = 250 32000 100 128
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

4. Install database and middle tier (iSQL*Plus) on the server.


Please refer to the Oracle Database 10g Release 2 Installation Guide for the instructions. Chapter 3 clearly
explains the installation tasks. You need to install the Oracle Home (EE) and create the general purpose
database.

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.

6. Update the tnsnames.ora and listener.ora with your server name.


7. Start the listener.
8. Ensure that the tnsnames.ora is located in
$ORACLE_HOME/network/admin/tnsnames.ora
Ex: $ cat tnsnames.ora >> $ORACLE_HOME/network/admin/tnsnames.ora

Note: The default tablespace is USERS, and temporary tablespace is temp. The password for
sys, and system is oracle.

Software Test Instructions

1. Open SQL*Plus from command prompt by typing sqlplus.


2. Connect to database as ora1/ora1
3. Issue the following: SELECT * from EMPLOYEES;
The query should return 20 rows successfully.
4. Make sure the URL is working to test the Oracle_Home and iSQL*Plus configured correctly.

iSQL*Plus URL : http://<HOSTNAME>:5560/isqlplus


( Note : To start the isqlplus service, type isqlplusctl start, To stop it, type
isqlplusctl stop )
Connect as ora1/ora1 with a connect string as your Oracle sid, such as T1.

5. Issue the following: SELECT * FROM employees;


The query should return 20 rows successfully.
6. Test teach_a, ora1-20 Database users to determine that they contain reduced HR schema:
a. Open SQL*Plus from command prompt by typing sqlplus.
b. Connect to database as ora1/ora1
c. Run confidence.sql

5
Copyright 2006, Oracle Corporation. All rights reserved.
SELECT count(*) FROM tab;
Expected result: 9

SELECT count(*) FROM employees;


Expected result: 20

SELECT count(*) FROM countries;


Expected result: 4

SELECT count(*) FROM regions;


Expected result: 4

SELECT count(*) FROM locations;


Expected result: 5

SELECT count(*) FROM departments;


Expected result: 8

SELECT count(*) FROM jobs;


Expected result: 12

SELECT count(*) FROM job_history;


Expected result: 10

PC Client Workstation: Setup Instructions

Hardware Requirements for Client Workstation


Recommended hardware requirements used in our configuration:

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:

Windows 2000 Service Pack 4 or


Operating System
above

CPU Pentium III 500 MHz or higher

Memory 512 MB RAM or more

Hard Drive 400 MB or greater free

65536 colors, set to at least


Video
1024 X 768 resolution

Monitor 17 1024 x 768 resolution at 70MHz

Ethernet 16 bits 10 Base T twisted pair

Browser Internet Explorer 6.0

Workstation Setup Instructions


The client will have a database installation plus have Oracle Enterprise Manager installed.
1. Please refer to the Oracle Database 10g Release 2 Client Installation Guide for Microsoft Windows for
details.
Note: At the Select Installation Type window, select the Administrator install.
2. Navigate to E:\oracle\ora10g\bin directory (or whichever drive on which you installed the
software), Right-click on sqlplusw.exe and select Create Shortcut, move the shortcut to the
desktop. Have an Internet Explorer icon on desktop.
Software CDs
Oracle Database 10g Release 2 (10.2.0.1.0) for Microsoft Windows
Download and install:
Oracle JDeveloper 10g Release 3 (10.1.3)
(Home Page: http://www.oracle.com/technology/products/jdev/index.html)
Oracle SQL Developer 1.0 , patch 2 (1.0.0.15.57)
(Home Page: http://www.oracle.com/technology/products/database/sql_developer/index.html)
3. Configure Net Service Names
1. Configure the tnsnames.ora by entering the tns entry for the database.
2. Copy the tnsnames.ora to e:\oracle\ora10\network\admin directory (or whichever
drive on which you installed the software),
3. Edit e:\oracle\ora10\network\admin tnsnames.ora and modify it to reflect the
SID you have set up.

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.

On the instructor machine, underneath E:\ labs folder:


Extract the contents of D17108GC21_labs.zip. For example, in the Oracle classroom,
D17108GC21_labs.zip is unzipped to create the following folders and files as:
E:\labs\SQL1
\code_ex
\demos
\lab
\soln

On the student machines, underneath E:\ labs folder:


Unzip the D17108GC21_labs.zip to create the following folders and files:
E:\labs\SQL1
\code_ex
\demo
\labs
\soln

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

Software Test Instructions

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.

Execute the following commands:

SELECT count(*) FROM tab;


Expected result: 9

SELECT count(*) FROM employees;


Expected result: 20

SELECT count(*) FROM countries;


Expected result: 4

SELECT count(*) FROM regions;


Expected result: 4

SELECT count(*) FROM locations;


Expected result: 5

8
Copyright 2006, Oracle Corporation. All rights reserved.
SELECT count(*) FROM departments;
Expected result: 8

SELECT count(*) FROM jobs;


Expected result: 12

SELECT count(*) FROM job_history;


Expected result: 10

Special Directions for the Bundled Course:

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.

Drop the instructor account as:


SQL> drop user teach_a cascade;

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.

Client and Middle-Tier Clean-Up

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.

Vous aimerez peut-être aussi