Oracle7 Administrator's Reference for UNIX

Contents Index Home Previous Next

Building and Running Demonstrations

Loading PL/SQL Demonstrations

The PL/SQL distribution includes a number of sample programs you can load. Demonstration and message files are in the rdbms directory. Perform the following steps with the Oracle7 Server open and mounted:

	$ cd $ORACLE_HOME/plsql/demo
	$ svrmgrl
	SVRMGR > connect scott/tiger

	SVRMGR > @exampbld

Note: Build the demonstrations under any Oracle account with sufficient permissions. Run the demonstrations under the same account you used to build them.

Running PL/SQL Demonstrations

Table 5 - 1 lists the kernel demonstrations.

Kernel Demonstrations
examp1.sql examp5.sql examp11.sql sample1.sql
examp2.sql examp6.sq examp12.sq sample2.sql
examp3.sql examp7.sql examp13.sql sample3.sql
examp4.sql examp8.sql examp14.sql sample4.sql
Table 5 - 1. PL/SQL Version 2 Kernel Demonstrations

Table 5 - 2 lists the precompiler demonstrations.

Precompiler Demonstrations
examp9.pc examp10.pc sample5.pc sample6.pc
Table 5 - 2. PL/SQL Version 2 Precompiler Demonstrations

To run the kernel demonstrations, invoke SQL*Plus to connect to the kernel, using the same user/password you used to create the demonstrations. Start the demonstration by typing an at sign (@) or the word start before the demonstration name. For example, to start the examp1 demonstration, enter:

$ sqlplus scott/tiger
SQLPLUS > @examp1

To build the precompiler demonstrations, enter:

$ cd $ORACLE_HOME/proc/demo
$ make -f sqlplus.mk demos

If you want to build a single demonstration, enter its name as the argument in the make command. For example, to make the examp9.pc executable, enter:

$ make -f sqlplus.mk examp9

To start the examp9 demonstration from your current shell, enter:

$ examp9

Oracle Call Interface (OCI) Demonstrations

OCI demonstrations must be compiled and linked using oracle.mk in the $ORACLE_HOME/rdbms/admin directory. Use the following commands, depending on the demonstrations you want to build:

For C OCI programs:

$ make -f oracle.mk demos

For COBOL OCI programs:

$ make -f oracle.mk cobdemos

For FORTRAN OCI programs:

$ make -f oracle.mk fordemos

For C++ OCI programs:

$ make -f oracle.mk c++demos

OCI Demonstration Notes

Before running OCI demonstrations:

This is an example from cdemo1:

Connected to ORACLE as SCOTT

Enter employee name (or CR to EXIT): SMITH
Enter employee job: AGENT
Enter employee salary: 3000
Enter employee dept: 30

SMITH added to the SALES department as employee number 7964

Enter employee name (or CR to EXIT):
Exiting...
G'day

SQL*Loader Demonstrations

SQL*Loader demonstrations require that:

To create and run a demonstration:

	$ sqlldr scott/tiger ulcasen

As scott/tiger, run the SQL*Loader demonstrations in the following order:

				$ sqlldr scott/tiger ulcase*

				$ sqlldr scott/tiger ulcase1 DIRECT=true

		  		$ sqlldr scott/tiger ulcase7


Contents Index Home Previous Next