INSTALLATION INSTRUCTIONS FOR THE STUDENT SAMPLE SCHEMA



Similar documents
Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

Uploads from client PC's to mercury are not enabled for security reasons.

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Using SQL Developer. Copyright 2008, Oracle. All rights reserved.

Browser Client 2.0 Admin Guide

How to use SURA in three simple steps:

Upgrading Centricity Electronic Medical Record Service Packs on Microsoft Windows Server

Migrate Topaz databases from One Server to Another

Improving Your Relationship with SAS Enterprise Guide

4cast Client Specification and Installation

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

The Einstein Depot server

Setting up SQL Translation Framework OBE for Database 12cR1


Monitoring Audit Trails Using Enterprise Manager

SPI Backup via Remote Terminal

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

Lenovo Online Data Backup User Guide Version

Installation and Setup Guide 5.6.3

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

sftp - secure file transfer program - how to transfer files to and from nrs-labs

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

Visual Studio.NET Database Projects

Installation Instruction STATISTICA Enterprise Small Business

How To Restore Your Data On A Backup By Mozy (Windows) On A Pc Or Macbook Or Macintosh (Windows 2) On Your Computer Or Mac) On An Pc Or Ipad (Windows 3) On Pc Or Pc Or Micro

Server Installation: ServerTools

ICE.TCP Pro Update Installation Notes

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.

Creating a Java application using Perfect Developer and the Java Develo...

Global Image Management System For epad-vision. User Manual Version 1.10

Tivoli Access Manager Agent for Windows Installation Guide

Your Archiving Service

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

SQL Server Protection

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

Lab: Data Backup and Recovery in Windows XP

Performing Database and File System Backups and Restores Using Oracle Secure Backup

PROJECTIONS SUITE. Database Setup Utility (and Prerequisites) Installation and General Instructions. v0.9 draft prepared by David Weinstein

Install BA Server with Your Own BA Repository

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Mesa DMS. Once you access the Mesa Document Management link, you will see the following Mesa DMS - Microsoft Internet Explorer" window:

Part 3: Accessing Local drives and printers from the Terminal Server

Best Methods for Oracle

HADS 2.1.0e Installation and migration

Installing Oracle 12c Enterprise on Windows 7 64-Bit

How To Load Data Into An Org Database Cloud Service - Multitenant Edition

Verax Service Desk Installation Guide for UNIX and Windows

User guide. Business

Server & Workstation Installation of Client Profiles for Windows (WAN Edition)

Microsoft OneDrive. How to login to OneDrive:

Using Remote Desktop to access your Office Computer or Faculty Remote Desktop Server August, 2005 This document consists of two main parts and an

Oracle Database Creation for Perceptive Process Design & Enterprise

Server & Workstation Installation of Client Profiles for Windows

Upgrading LytecMD from to 9.4 on Windows Server Best Practices. Revision Date: 7/29/2010 PLEASE READ:

Dell Statistica Statistica Enterprise Installation Instructions

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

Interact for Microsoft Office

Lab - Data Backup and Recovery in Windows XP

Call Recorder Quick CD Access System

Integration Service Database. Installation Guide - Oracle. On-Premises

Contents First Time Setup... 2 Setting up the Legal Vault Client (KiteDrive)... 3 Setting up the KiteDrive Outlook Plugin Using the Legal Vault

Setting Up a Dreamweaver Site Definition for OIT s Web Hosting Server

Sitecore Ecommerce Enterprise Edition Installation Guide Installation guide for administrators and developers

Setting Up the Device and Domain Administration

QACenter Installation and Configuration Guide. Release 4.4.2

Quick Reference Guide Welcome TEST USER

Supplier Directory: User Guide

Installing (1.8.7) 9/2/ Installing jgrasp

Orientation Course - Lab Manual

Backing up and restoring HP Systems Insight Manager 6.0 or greater data files in a Windows environment

NAS 253 Introduction to Backup Plan

Inmagic ODBC Driver 8.00 Installation and Upgrade Notes

Oracle Data Mining. Administrator's Guide 11g Release 2 (11.2) E

Backing Up TestTrack Native Project Databases

Installing VinNOW Client Computers

Deploying BitDefender Client Security and BitDefender Windows Server Solutions

Snow Inventory. Installing and Evaluating

Migrating helpdesk to a new server

Avatier Identity Management Suite

StreamServe Persuasion SP4

OutDisk 4.0 FTP FTP for Users using Microsoft Windows and/or Microsoft Outlook. 5/1/ Encryptomatic LLC

SEER Enterprise Shared Database Administrator s Guide

Novell ZENworks Asset Management 7.5

ESET REMOTE ADMINISTRATOR. Migration guide

Figure 1: Restore Tab

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

Configuring.NET based Applications in Internet Information Server to use Virtual Clocks from Time Machine

New Online Banking Guide for FIRST time Login

ParishSOFT Remote Installation

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Installation and Configuration Guide for Windows and Linux

ilaw Installation Procedure

Fundamentals of UNIX Lab Networking Commands (Estimated time: 45 min.)

How to FTP (How to upload files on a web-server)

Basic SQL Server operations

Transcription:

INSTALLATION INSTRUCTIONS FOR THE STUDENT SAMPLE SCHEMA PURPOSE This document describes the files and steps used to create the STUDENT schema, which is used for all exercises in the Oracle by Example series. OVERVIEW This document is organized as follows: I. Steps to create the STUDENT account II. Steps to build STUDENT schema objects and load associated data III. Steps to rebuild the objects and data in the STUDENT schema IV. Additional example tables installation instructions V. List of files used in the create and rebuild steps NOTE These instructions will work in Windows and UNIX environments and should work in just about any other OS environment. If you use UNIX, substitute the drive and path names with the appropriate UNIX directory structure. If you use SQL Developer, you will notice that some instructions are slightly different from the SQL*Plus version. The differences are pointed out as you read through this document. I. STEPS TO CREATE THE STUDENT ACCOUNT Before creating the STUDENT schema objects and loading data into them, it is necessary to create the STUDENT account (a schema/place/user in the database that will hold the objects and data). The default account and password used will be STUDENT and learn respectively. Please note starting with Oracle 11g, by default passwords are case-sensitive. The account name is not case-senstive. If a DBA is managing your Oracle database, ask him/her to create an account named STUDENT with a password of learn and proceed with item II. Steps to Build STUDENT Schema Objects and Load Associated Data. If you need to create the account yourself, perform the following steps: 1. Connect to your database as SYSTEM (or any other DBA-type user account) and the appropriate password at the log on screen. This document will describe how to perform this functionality using the SQL*Plus command-line version from the Windows operating system prompt. readme.pdf Page 1 of 7

To invoke SQL*Plus from the command line, use the Windows Start Menu, choose Run and enter cmd (see Figure 1). Figure 1 Windows Run This will invoke the Windows command prompt (see Figure 2). Enter the command sqlplus system. Oracle will prompt you to enter a password. If you have a remote database, you may need to enter a connect string such as sqlplus/system@orcl. Figure 2 SQL*Plus command-line version for Windows If you are unclear how to execute SQL statements or log on with SQL Developer or SQL*Plus, read through the Labs 2.1, 2.2, and 2.3 of the Oracle SQL by Example book. You probably remembered to write down the SYSTEM password when you performed your Oracle database system installation. readme.pdf Page 2 of 7

2. Once you successfully connect to the database with the SYSTEM account, issue the following SQL statement to find the names of the tablespaces in your database (see Figure 3). A tablespace holds database objects within an Oracle database. If you are not familiar with tablespaces right now, don't worry. SELECT tablespace_name FROM dba_tablespaces ORDER BY tablespace_name; Figure 3 SQL*Plus command-line version for Windows 3. After you executed this command, you need to find two particular tablespaces: (a) A tablespace used as the default place to store your objects. The name of this tablespace will vary depending on your operating system platform and your Oracle database version. Your DEFAULT TABLESPACE will have a name similar to one of the following: USERS USER_DATA USR (b) A tablespace known as the TEMPORARY TABLESPACE. Typical names for TEMPORARY TABLESPACEs are: TEMP TEMPORARY TEMPORARY_DATA 4. Once you have found your DEFAULT TABLESPACE and TEMPORARY TABLESPACE names write them down for the next step. Note that the most common two names will be USERS and TEMP. readme.pdf Page 3 of 7

5. Now you are ready to create the STUDENT database account. a. Still logged on as SYSTEM, issue the following statement, substituting the tablespace names from steps 3 (a) and 3 (b): CREATE USER student IDENTIFIED by learn DEFAULT TABLESPACE <name from step 3 (a)> TEMPORARY TABLESPACE <name from step 3 (b)>; b. Your final statement should look similar to the following: CREATE USER student IDENTIFIED by learn DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp; 6. Next you need to give the STUDENT account the ability to use the database. Execute the following statement while connected as the SYSTEM user: GRANT CONNECT, RESOURCE TO student; GRANT SELECT_CATALOG_ROLE TO student; GRANT CREATE VIEW TO student; 7. Now you can test to see if you can connect as the STUDENT account. a. In SQL Developer, establish a connection with the login of student and the password learn. Again, if you re unfamiliar with SQL Developer, please refer to Labs 2.1 2.3 of the Oracle SQL by Example book. b. If you use SQL*Plus, issue the following statement at the SQL> prompt to connect as STUDENT: CONNECT student/learn If you connect to a remote machine, you may need to add the connect string such as @orcl. Execute the SHOW USER command. SHOW USER You should receive this message: USER is "STUDENT" Now you are connected as the STUDENT user. You are ready to proceed to item II. Steps to Build STUDENT Schema Objects and Load Associated Data. II. STEPS TO BUILD STUDENT SCHEMA OBJECTS AND LOAD ASSOCIATED DATA Connect via SQL Developer or SQL*Plus to the database as STUDENT user. Make a note of the directory where you found this readme file you are reading right now. By default, the self-extracting setup.exe file will place this file and all others you need for installation is the C:\guest\schemasetup directory. If you are using SQL Developer, do the following: Click File Open and then click the Browse button to locate in the C:\guest\schemasetup directory the script readme.pdf Page 4 of 7

named createstudent.sql. Open the file, which brings it into the worksheet. Then click the Run Script icon or F5 to run the script (see Figure 4). Figure 4 The createstudent.sql script within SQL Developer s worksheet If you using SQL*Plus rather than SQL Developer and using the C:\guest\schemasetup directory, issue this command at the SQL> prompt: Figure 5 Executing the script from the SQL*Plus command prompt After the script completes (approximately 3-5 minutes), it will show a list of counts representing the number of rows it created for each table. Compare that list on screen with the following list. The two lists should match. If you used SQL Developer, you may need to scroll all the way to the bottom of the screen to see the result. Count of COURSE Table: 30 Count of ENROLLMENT Table: 226 Count of GRADE Table: 2004 Count of GRADE_CONVERSION Table: 15 Count of GRADE_TYPE Table: 6 Count of GRADE_TYPE_WEIGHT Table: 300 Count of INSTRUCTOR Table: 10 Count of SECTION Table: 78 Count of STUDENT Table: 268 Count of ZIPCODE Table: 227 readme.pdf Page 5 of 7

III. STEPS TO REBUILD THE STUDENT SCHEMA This step will rebuild the objects in the STUDENT schema. You may wish to perform this step if you want to return the STUDENT schema objects to their pristine state. This is especially useful after you have worked through the chapters that focus on data manipulation. For example, if you have just been working on DELETing data, you may wish to restore that data to practice SELECTing the data. Caution: Running this script removes the objects and then creates the objects and reinserts the data! Connect to the database as student/learn. A common place that you may have your script is C:\guest\schemasetup. If you are logged into the database with SQL Developer, use the Open button to locate the rebuildstudent.sql script. Load the script into the Workspace area and press the Run Script icon. If you are using SQL*Plus and the C:\guest\schemasetup directory, issue the following at the SQL*Plus prompt: @C:\guest\schemasetup\rebuildStudent.sql When the rebuildstudent.sql script has completed, it will show a list of counts representing the number of rows it created for each table. Compare that list on screen with the following list. The two lists should match. Count of COURSE Table: 30 Count of ENROLLMENT Table: 226 Count of GRADE Table: 2004 Count of GRADE_CONVERSION Table: 15 Count of GRADE_TYPE Table: 6 Count of GRADE_TYPE_WEIGHT Table: 300 Count of INSTRUCTOR Table: 10 Count of SECTION Table: 78 Count of STUDENT Table: 268 Count of ZIPCODE Table: 227 IV. ADDITIONAL EXAMPLE TABLES INSTALLATION INSTRUCTIONS The Oracle SQL by Example, 4th edition, contains additional example tables that help illustrate extra functionality and concepts. If you want to try out some of these exercises in the book, I suggest you install these tables in the STUDENT schema. In SQL Developer: To run the script sql_book_add_tables.sql In SQL*Plus: At the SQL prompt, issue the following command: @C:\guest\schemasetup\sql_book_add_tables.sql If you want to remove these tables from the schema, run the drop_extra_tables.sql script. readme.pdf Page 6 of 7

V. LIST OF FILES IN THE ZIP FILE The following is a list of the files included in the downloaded zipped file. File Name createstudent.sql dropstudent.sql readme.pdf rebuildstudent.sql AppendixD.pdf sql_book_add_tables.sql drop_extra_tables.sql Description The primary script that creates the objects in the STUDENT schema. A script that drops STUDENT objects. This is the file you are currently reading containing installation instructions. The script to run for recreating and reloading the STUDENT schema tables. This file graphically displays the STUDENT schema diagram; you need Adobe Acrobat to view it. This script creates additional example tables not created by the createstudent.sql script. This script drops the additional example tables created by the sql_book_add_tables.sql script. readme.pdf Page 7 of 7