1 / 86

Oracle Database Administration

Oracle Database Administration. Session 3 Installation. Announcements. The TA sessions will be held at 53 Church St., Room 202 The first TA session starts tonight 7:35PM, after class. Online TA session Thursday nights 7:30PM to 9:30PM Web site http://www.courses.harvard.edu/ext/22750.

pilis
Download Presentation

Oracle Database Administration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Oracle Database Administration Session 3 Installation

  2. Announcements • The TA sessions will be held at 53 Church St., Room 202 • The first TA session starts tonight 7:35PM, after class. • Online TA session Thursday nights 7:30PM to 9:30PM • Web site http://www.courses.harvard.edu/ext/22750

  3. The OFA Standard

  4. Oracle Directory Structure

  5. Files • Datafiles contain the actual data stored in a database • The Parameter file contain the initialization parameters used to create the memory area it will use, to manage the database • Control files map the physical files of the database to the logical tablespaces and online redo logs. It helps ensure the database remains consistent

  6. Files • Redo files contain enough information to allow Oracle to reconstruct or back out a transaction, if the database should shutdown before these changes have been written to the disk • INSERT, UPDATE, DELETE, CREATE, ALTER, or DROP operations generate redo • Alert and Trace files contain information on the health of the database and provides warnings when problems occur

  7. Files • Backup files contain copies of the database files and can be used to recover the database. • The standard convention for file extensions or endings to file names are • data files .dbf • control files .ctl • redo log files .dbf (some use .rdo) • parameter file .ora

  8. Datafiles and Tablespaces

  9. Oracle’s “Logical” World • A Tablespace is a logical division of a database. • Each tablespace is made up of one or more datafiles. • A datafile belongs to one tablespace

  10. Oracle’s “Logical” World • A tablespace can belong to only one database • There must be at least two tablespaces SYSTEM and SYSAUX to create a database • Other include USERS, UNDO, TOOLS, etc.

  11. Undo segments • Undo segments hold the before image of the data in a transaction • As a program begins to change the data in the database, Oracle changes the physical blocks that contain that information. • Before changing the data block buffers in the SGA or writing to disk, Oracle takes a copy of this data in an undo segment

  12. Tablespace Examples • System holds all objects owned by the sys user • SYSAUX is an auxiliary tablespace to the SYSTEM tablespace • Rollback (RBS) (undo) is used to store the rollback segments • Temp (Temporary) is used for sort functions.

  13. Tablespace Examples • Users is the default space for user accounts • Tools should be the default space for the system user, after database creation. • Data holds the ‘real’ application data • Index holds the index data for the application

  14. System Requirements • Memory minimum of 1024M required for Oracle11g installation • /usr/sbin/prtconf | grep “Memory size” • Disk space of approx 3.3GB needed for the Oracle11g Enterprise Edition • 400MB swap minimum • /usr/sbin/swap –l • 400MB free space in the /tmp directory • df -k /tmp

  15. Operating System Requirements • O/S Solaris 9 or 10 • uname -r • O/S kernel patch set version for the specific O/S version • /bin/isainfo -kv

  16. Operating System Requirements • We need a native window manager or some xterm emulation software. Character mode installs are not supported in 9i or 10g • The Oracle Universal Installer (OUI) is java based

  17. Operating System Requirements • The Java Runtime Environment (JRE) is shipped with Oracle10g and 11g • To determine your operating system information, use the following commands • uname –a for system information • showrev –p for patch levels

  18. Root Level Setup • Configure the Kernal • Create the mount points • /u01 • /u02 • /u0?? • Create the dba group • Create the Oracle user

  19. Kernel Parameters • These are the kernel parameters for Oracle11g • All are found in the /etc/system file • For Solaris you can also use /etc/project • Shared Memory is a region that can be shared between different processes • shmmax 4GB (max) (4294967295) • shmmni 100

  20. Kernel Parameters • SHMMAX - kernel parameter controlling maximum size of one shared memory segment • SEMMNI - kernel parameter controls the maximum number of semaphore sets. Semaphores in Unix are allocated in sets of 1 to SEMMSL. • SEMMSL - kernel parameter controls the maximum number of semaphores in a semaphore set. • SEMMNS - kernel parameter controls the maximum number of semaphores in the system

  21. Kernel Parameters • What is a Semaphore • http://en.wikipedia.org/wiki/Semaphore_(programming) • http://searchenterpriselinux.techtarget.com/sDefinition/0,,sid39_gci212959,00.html • Semaphores • semmni 100 • semmsl 256 • semmns 256

  22. Kernel Parameters • ipcs: The ipcs utility provides information about active inter-process communication facilities • man ipcs • ipcrm: Can be used to remove a message queue, semaphore set, or shared memory ID • man ipcrm

  23. Oracle Requirements • Oracle 11g cannot be installed into an older oracle_home, that contains Oracle Software earlier than 11g

  24. Unix Account • The DBA Unix group • The Oracle Unix account • Set umask to 022, sets the file creation mask • Set the DISPLAY variable DISPLAY=ora256.dce.harvard.edu:0.0 (Another example DISPLAY=128.103.81.222:0.0) export DISPLAY

  25. Unix Account • ORACLE_BASE is the directory at the top of the Oracle Software and administrative file structure. The OFA-recommended value is {mount_point}/app/oracle • ORACLE_HOME is the directory that contains the Oracle software for a given release. $ORACLE_BASE/product/release_version is the OFA standard

  26. Unix Account • NLS_LANG is required if creating a database using a character set different than US7ASCII (the default) • ORA_NLS10 is required if creating a database with a storage character set other than US7ASCII.

  27. Unix Account • To update the current session • . ./.profile for Bourne or Korn • To get the disk space available use the following • df –k | cat • To describe the environment and list the variables • env

  28. Example Profile • # Local .profile • # Set Environment • set -a • EDITOR=vi • TERM=vt100 • # Set Oracle Environment • ORACLE_BASE=/export/home/oracle • ORACLE_HOME=$ORACLE_BASE/product/10.0.1test • TNS_ADMIN=$ORACLE_HOME/network/admin • ORACLE_TERM=vt100 • LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH: • TMPDIR=/tmp • # Set Path Search Directories • PATH=$ORACLE_HOME/bin:$PATH: • set +a • umask 022

  29. Installation • Mount the CD • This usually mounts automatically to /cdrom/oracle10g • If not, login as root • su root • mkdir cdrom • Manually mount the CD • mount –r –F hsfs device_name /cdrom

  30. Installation • For 11g when codeset downloaded from Oracle website and expanded • 11g/database • solaris.sparc64_11gR1_database.zip 2GB

  31. Installation • Start the OUI as the Oracle user • Go to the CD-ROM mount point • cd /cdrom/oracle10g • Start the OUI • ./runInstaller &

  32. Inventory • Orainventory is a repository of all installed Oracle products • Make it Oracle Home specific • /var/opt/oracle for Sun Solaris • oraInst.loc • /etc for HPUX, AIX

  33. Inventory • #Oracle Installer Location File Location • inst_group=dba • #inventory_loc=/u01/app/oracle/oraInventory • inventory_loc=/u01/app/oracle/product/oraInventory

More Related