O'Reilly Databases

oreilly.comSafari Books Online.Conferences.

We've expanded our coverage and improved our search! Search for all things Database across O'Reilly!

Search Search Tips

advertisement
AddThis Social Bookmark Button

Listen Print Discuss Subscribe to Databases Subscribe to Newsletters

Installing Oracle 9i on Mac OS X, Part 3
Pages: 1, 2, 3, 4

Create the file /Library/StartupItems/Oracle/StartupParameters.plist from the information located within Listing #2. This file has been configured for an Oracle database startup by specifying a "Late" startup sequence to SystemStarter in order to ensure that any other necessary operating system resources are available by the point in time when the database is started. This file has been written in the newer XML format as recommended in the Mac OS X for UNIX Geeks book (p. 40).



Startup scripts may be tested without restarting the server by passing the "-nd" parameters to the SystemStarter: /sbin/SystemStarter ND.

This test helps you ensure that you haven't accidentally named the startup script incorrectly or made a serious typo in the writing of the plist file. If SystemStarter can't find the startup script, it will give a continuous list of "Waiting for Oracle 9.2.0 Database Server" error messages.

Listing #2 -- filename: /Library/StartupItems/Oracle/StartupParameters.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Oracle 9.2.0 Database Server</string>
<key>Provides</key>
<array>
<string>Oracle 9.2.0 Database</string>
</array>
<key>Requires</key>
<array>
<string>Disks</string>
</array>
<key>Uses</key>
<array>
<string>Disks</string>
<string>Network</string>
<string>NFS</string>
</array>
<key>OrderPreference</key>
<string>Late</string>
</dict>
</plist>

Install Tasks

From this point forward during the install process, you want to be logged into the oracle UNIX account. Copy the oracle installation file macosx_920_dev_rel.tar.gz either from the OTN Web site or from a CD (if you created one) to the location where you are going to place your Oracle Home directory. In this example, this would be the top level of the /Volumes/u01 directory. Uncompress and untar the file.

oracle% cd /Users/oracle
oracle% gunzip macosx_920_dev_rel.tar.gz
oracle% tar xvf macosx_920_dev_rel.tar

The resulting orahome directory will contain the Oracle binary software. In a regular UNIX installation, this step would only have been reached after running the Oracle Universal Installer and waiting for all of the files to be copied and linked.

Rename the orahome directory with the name you want to use for your Oracle Home directory, which will be v920 in this example.

oracle% mv orahome v920

Create the /etc/oratab Oracle startup configuration file. This file provides configuration info for the dbstart and dbshut scripts to indicate which database instances should be started/stopped by these scripts. Having a "Y" in the last column permits the dbstart/dbshut scripts to start or stop the database. This can be useful if you have multiple database instances installed on the same server, but you only want some instances to be started manually by the DBA. The contents of this file are in the format $ORACLE_SID:$ORACLE_HOME:<N|Y>. For this installation example, the contents are as follows:

prod1:/Users/oracle/v920:Y

It is not mandatory for you to use the Oracle-supplied $ORACLE_HOME/bin/dbstart and dbshut scripts to start or stop your database. If you don't want to use this mechanism, you can customize the Oracle startup script to simply use SQL/Plus to start up or shut down the database directly. However, this is the method commonly used by Oracle DBAs, so I prefer to use it to make my database installs more familiar for any other DBA who needs to administer the server.

Use the following file listings to create the /Users/oracle/network/admin/tnsnames.ora, /Users/oracle/network/admin/sqlnet.ora, /Users/oracle/network/admin/listener.ora, and /Users/oracle/network/admin/initprod1.ora files. The tnsnames.ora file provides configuration for software to communicate with the database that is being installed. This file should be copied to client computers after installing the Oracle client software CD. Since this CD does not yet exist for Mac OS X, you would need to install the actual database binary files just as was done here on the server itself. This way, remotely-connected client applications will be able to use Oracle's Net8 software or JDBC drivers to connect to the database. Once the database has been installed and created, you can test connectivity to the server with the command tnsping PROD1.

The sqlnet.ora and listener.ora files are used to configure the listener program on the database server. The initprod1.ora file provides the initial configuration for the server when it starts up, unless the server finds an spfile in the same directory.

Listing #3 -- filename: $ORACLE_HOME/network/admin/tnsnames.ora

PROD1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = g4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod1)
)
)

Listing #4 -- filename: $ORACLE_HOME/network/admin/sqlnet.ora

NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME)

Listing #5 -- filename: $ORACLE_HOME/network/admin/listener.ora

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = g4)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = g4)(PORT = 2481))
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /Users/oracle/v920)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = PROD1)
(ORACLE_HOME = /Users/oracle/v920)
(SID_NAME = prod1)
)
)

Listing #6 -- filename: $ORACLE_HOME/dbs/initprod1.ora

###########################################
# Miscellaneous
###########################################
compatible=9.2.0.0.0

###########################################
# Network Registration
###########################################
instance_name = prod1
db_name = prod1
service_names = prod1

###########################################
# Archive
###########################################
log_archive_dest_1='LOCATION=/Volumes/archive'
log_archive_format=prod1_%t_%s.arc
log_archive_start=true

###########################################
# Cache and I/O
###########################################
db_block_size=16384
# small system - db_block_size=4096
# medium system - db_block_size=8192
# large system - db_block_size=16384

db_cache_size=1638400
# small system - db_cache_size=10000000
# medium system - db_cache_size=50000000
# large system - db_cache_size=10000000000

###########################################
# Cursors and Library Cache
###########################################

open_cursors=100
# small system - open_cursors=100
# medium system - open_cursors=300
# large system - open_cursors=600

###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=/Volumes/u01/bdump
core_dump_dest =/Volumes/u01/cdump
timed_statistics =FALSE
user_dump_dest =/Volumes/u01/udump
#max_dump_file_size = 10000 # limit trace file size to 5M each
###########################################
# Distributed, Replication and Snapshot
###########################################

remote_login_passwordfile=EXCLUSIVE
# Global Naming -- enforce that a dblink has same name as the db it connects to
# global_names = false

# The following parameters are needed for the Advanced Replication Option
# Job Queue Processes is also used when gathering Oracle 9i system statistics
job_queue_processes = 2
#distributed_transactions = 500
#open_links = 16
#aq_tm_processes=1

###########################################
# File Configuration
###########################################
control_files=("/Volumes/u01/prod1/control01.ctl", "/Volumes/u02/prod1/control02.ctl", "/Volumes/u03/prod1/control03.ctl")

# UTL_FILE_DIR is used by various utilities
# including log_miner to allow pl/sql to read/write
# data to the hard drive
UTL_FILE_DIR=/Volumes/backup/oracle_utl_file_dir
###########################################
# MTS
###########################################
# Uncomment the following line when your listener is configured for SSL
# (listener.ora and sqlnet.ora)
# dispatchers = "(PROTOCOL=TCPS)(SER=MODOSE)", "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.GiopServer)", "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.SGiopServer)"
dispatchers="(PROTOCOL=TCP)(SER=MODOSE)", "(PROTOCOL=TCP)(PRE=oracle.aurora.server.GiopServer)", "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)"

###########################################
# Pools
###########################################

java_pool_size =150000000
# small system - java_pool_size=25000000
# medium system - java_pool_size=50000000
# large system - java_pool_size=100000000

large_pool_size =10000000
# small system - shared_pool_size= 10000000
# medium system - shared_pool_size=100000000
# large system - shared_pool_size=500000000

shared_pool_size=150000000
# medium system - shared_pool_size=25000000
# large system - shared_pool_size=60000000

dml_locks= 100
# small system - dml_locks= 100
# medium system - dml_locks= 500
# large system - dml_locks=2000

log_buffer= 3000
# small system - log_buffer=512000
# medium system - log_buffer=1024000
# large system - log_buffer=5120000

###########################################
# PL/SQL Native Compilation Parameters
###########################################
plsql_compiler_flags = 'INTERPRETED'
#plsql_native_c_compiler = '/usr/local/bin/gcc' # this parameter is specified in makefile
plsql_native_library_dir = '/Users/oracle/v920/plsql_compiled_code'
plsql_native_library_subdir_count = 1000
#plsql_native_linker = '/usr/local/bin/ld' # this parameter is specified in makefile
plsql_native_make_file_name = '/Users/oracle/v920/plsql/spnc_makefile.mk'
plsql_native_make_utility = 'gmake'
###########################################
# Processes and Sessions
###########################################
processes=50
parallel_automatic_tuning = true
# small system - processes=50
# medium system - processes=1000
# large system - processes=10000

###########################################
# Redo Log and Recovery
###########################################
fast_start_mttr_target=300

###########################################
# Resource Manager
###########################################
resource_manager_plan=SYSTEM_PLAN

###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
sort_area_size=524288
# small system - sort_area_size= 50000
# medium system - sort_area_size=256000
# large system - sort_area_size=524288

###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_tablespace=undotbs



Pages: 1, 2, 3, 4

Next Pagearrow




Tagged Articles

Be the first to post this article to del.icio.us

Sponsored Resources

  • Inside Lightroom

Related to this Article

Understanding Oracle Clinical Understanding Oracle Clinical
by Joan M. Johnson
May 2007
$9.99 USD

Inside SQLite Inside SQLite
by Sibsankar Haldar
April 2007
$9.99 USD

Advertisement
O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com