ray_apps_blog

April 12, 2009

How to install Oracle Database 10g on Mac OS X Intel

Filed under: mac,oracle — Raimonds Simanovskis @ 3:48 pm

UPDATE: Created instructions how to install Oracle 10g on Mac OS X Snow Leopard

Couple days ago Oracle developers on Mac OS X received Easter present – finally Oracle Database 10g was released for Mac OS X 10.5 Intel platform. This download includes installation guide for Mac OS X but as any Oracle installation guide it is quite long and contains a lot of unnecessary information for first time install as well as does not contain some necessary information.

Therefore I am posting here my shorter tutorial how to install it. And this tutorial is targeted to developers who want to install local Oracle database for development needs on their MacBook, iMac or Mac Pro.

Initial preparation

If you are a developer then I suppose you already have Xcode tools installed which are required also for Oracle installation. And I tried these steps on Mac OS X latest version 10.5.6.

Then you need to create oracle user as well as increase default kernel parameters. Open Terminal and switch to root user:

sudo -i

Create oinstall group and oracle user (I used group and user number 600 to ensure that they do not collide with existing groups and users):

dscl . -create /groups/oinstall
dscl . -append /groups/oinstall gid 600
dscl . -append /groups/oinstall passwd "*"
dscl . -create /users/oracle
dscl . -append /users/oracle uid 600
dscl . -append /users/oracle gid 600
dscl . -append /users/oracle shell /bin/bash
dscl . -append /users/oracle home /Users/oracle
dscl . -append /users/oracle realname "Oracle software owner"
mkdir /Users/oracle
chown oracle:oinstall /Users/oracle

Change password for oracle user:

passwd oracle

Change default kernel parameters:

vi /etc/sysctl.conf

and enter values recommended by Oracle:

kern.sysv.semmsl=87381
kern.sysv.semmns=87381
kern.sysv.semmni=87381
kern.sysv.semmnu=87381
kern.sysv.semume=10
kern.sysv.shmall=2097152
kern.sysv.shmmax=2197815296
kern.sysv.shmmni=4096
kern.maxfiles=65536
kern.maxfilesperproc=65536
net.inet.ip.portrange.first=1024
net.inet.ip.portrange.last=65000
kern.corefile=core
kern.maxproc=2068
kern.maxprocperuid=2068

After this reboot your computer so that these new kernel parameters would be taken into effect. After reboot open again Terminal and now login as oracle user:

su - oracle

Set shell settings in .bash_profile

vi .bash_profile

and enter

export DISPLAY=:0.0
export ORACLE_BASE=$HOME
umask 022
ulimit -Hn 65536
ulimit -Sn 65536

As you see I prefer to install all Oracle related files under home directory of oracle user therefore I am setting ORACLE_BASE to home directory. And also include ulimit settings – I forgot to do this initially and got strange TNS service errors because of that.

Now execute this script so that these settings are applied to current shell:

. ./.bash_profile

Now download db.zip installation archive and place it somewhere and unzip it:

mkdir Install
cd Install
# download db.zip to this directory
unzip db.zip
cd db/Disk1

Now you are ready to start installation:

./runInstaller

Installation

In installation wizard I selected the following options:

  • Advanced Installation – so that I can change some default options
  • Standard Edition – as I don’t need additional features of Enterprise Edition
  • Create Database / General Purpose
  • Global database name: orcl, SID: orcl
  • Character set: UTF-8 AL32UTF8
  • Create database with sample schemas
  • Selected “Use the same password for all the accounts” – do not specify default “manager” password as it will not be allowed :)
  • Password Management – selected this to unlock necessary sample accounts (e.g. HR schema account that I use as default test schema)

At the end of installation you will be instructed to run one shell script from root.
Hopefully installation will complete successfully.

Additional oracle user settings

If you will use oracle user later then add the following lines to .bash_profile of oracle user:

export ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=ORCL
PATH=$PATH:$ORACLE_HOME/bin

After this relogin as oracle user and verify listener status:

lsnrctl status

and if it is down then start it with

lsnrctl start

and verify if you can connect to Oracle database with sample user (that I unlocked during installation)

sqlplus hr/hr@orcl

If it fails then do some investigation :)

Change listener to listen on localhost

As I need this Oracle database just as local development database on my computer then I want to change the listener so that it would listen just on localhost port 1521:

vi $ORACLE_HOME/network/admin/listener.ora

and change the contents of the file to:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /Users/oracle/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = /Users/oracle/oracle/product/10.2.0/db_1)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

Then also change ORCL alias definition in $ORACLE_HOME/network/admin/tnsnames.ora to:

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

After this change restart listener and try to connect with sqlplus to verify that these changes are successful.

Automatic startup of Oracle database

If you want that Oracle database is started automatically when your computer is booted then you need to create the following startup script. Start terminal and switch to root.

At first edit /etc/oratab and change N to Y at the end of line for ORCL database – this will be used by dbstart utility to find which databases should be started automatically.

Then create startup script for Oracle database:

mkdir /Library/StartupItems/Oracle
cd /Library/StartupItems/Oracle
vi Oracle

and enter the following:

#!/bin/sh
# Suppress the annoying "$1: unbound variable" error when no option
# was given
if [ -z $1 ] ; then
  echo "Usage: $0 [start|stop|restart] "
  exit 1
fi
# source the common startup script
. /etc/rc.common
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for the installation
ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_HOME DYLD_LIBRARY_PATH
# change the value of ORACLE to the login name of the
# oracle owner at your site
ORACLE=oracle
PATH=$PATH:$ORACLE_HOME/bin
# Set shell limits for the Oracle Database
ulimit -Hu 2068
ulimit -Su 2068
ulimit -Hn 65536
ulimit -Sn 65536
StartService()
{
  ConsoleMessage "Starting Oracle Databases"
  su $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
}
StopService()
{
  ConsoleMessage "Stopping Oracle Databases"
  su $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
}
RestartService()
{
  StopService
  StartService
}
RunService "$1"

and then make this script executable

chmod a+x Oracle

and in addition create properties file:

vi StartupParameters.plist

with the following contents:

{
  Description     = "Oracle Database Startup";
  Provides        = ("Oracle Database");
  Requires        = ("Disks");
  OrderPreference = "None";
}

Now you can verify that these scripts are working. Open new terminal and try

sudo /Library/StartupItems/Oracle/Oracle stop

to stop the database and

sudo /Library/StartupItems/Oracle/Oracle start

to start again the database. And later you can reboot your computer also to verify that Oracle database will be started automatically.

Hide oracle user from login window

After computer reboot you probably noticed that now you got oracle user in initial login window. To get rid of it execute this from terminal:

sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add oracle

What next?

Now when you have Oracle database installed you would need some development tools that you could use to access the database. Here are some links:

Please comment if you find any issues with Oracle Database 10g installation using this tutorial.

Advertisements

104 Comments

  1. I thought Macbooks and iMacs are all 32bit, and Orcl DB is for 64bit

    Comment by Mike — April 13, 2009 @ 7:22 pm

  2. MacBooks and iMacs use 64-bit Intel Core2 processors and Mac OS X 10.5 (aka Leopard) is 64-bit operating system – so basically there is no major architecture differences between MacBooks / iMacs and Xservers. And therefore there is no problem to run Oracle 64-bit DB on my MacBook Pro :)

    Comment by Raimonds Simanovskis — April 13, 2009 @ 9:31 pm

  3. My mistake, never looked into new(er then mine) models. I’m still on a Intel Core Duo processor iMac (one of the first Intel generations).
    If it didn’t run this fine, I’d be on a 64bit system obviously…

    Comment by Mike — April 13, 2009 @ 11:19 pm

  4. Hi.,
    Install oracle 10g on mac 0s 10.5.
    After installation when I chcked listener status it shows dyld:library not loaded /b/227/network/lib/libnnz10. dylib.

    Whats the reason for it ??
    Can you explain the solution. I took help of ur document for installation.

    Regards,
    Shyam

    Comment by Shyam Singh — April 16, 2009 @ 1:18 pm

  5. You need to set DYLD_LIBRARY_PATH environmental variable to point to Oracle shared libraries, as I wrote in my tutorial please set:

    export ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
    export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib

    Comment by Raimonds Simanovskis — April 16, 2009 @ 11:20 pm

  6. Hi,

    Thanks for you short guide, oracle installations guides are very long !!!, one question, i will install Oracle on my mac book pro, i have Leopard but not is a server version, do you know if can i install Oracle 10g in it, not in a server version?

    Tanks in advance.

    Comment by Yeray Santana Borges — April 17, 2009 @ 10:48 pm

  7. This guide saved me a great deal of time. Thanks!

    I just like to point out the following:

    export ORACLE_SID=ORCL

    What worked for me is ‘orcl’ (all letters in lower case). I was getting errors when it was ORCL (all upper case).

    Comment by Joben Ilagan — April 18, 2009 @ 2:57 am

  8. Sorry, please ignore my last statement. I forgot to perform the changes needed in tnsnames.ora.

    Comment by Joben Ilagan — April 18, 2009 @ 3:41 am

  9. Hi Raimonds Simanovskis,
    I installed oracle with the reference of your documents. I set the path in .bash_profile as
    export ORACLE_HOME=
    /Users/oracle/oracle/product/10.2.0/db_1
    export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib

    but when I typed sqlplus in the terminal IT shows dyld: library not loaded
    reason : image not found.

    What can be another possible reason ??

    Thanks,
    Shyam

    Comment by Shyam Singh — April 18, 2009 @ 6:08 am

  10. @Yeray – yes, you can install it on normal MacBook Pro with normal Mac OS X Leopard client version.

    @Shyam
    After you changed your .bash_profile you either need to log out and log in (so that .bash_profile is executed) or you can execute it in current shell with

    . ~/.bash_profile

    and then try sqlplus. You can also do

    echo $DYLD_LIBRARY_PATH

    to verify that this environment variable is set in your current shell.

    Comment by Raimonds Simanovskis — April 18, 2009 @ 11:42 am

  11. Hello Raimonds,
    I have the same problem as Shyam.

    Working with LD_LIBRARY_PATH is fine only when you invoke the tools as user “oracle”. If you want to use them as a different user (i.e. from your own account) then it fails.

    It seems that DYLD_LIBRARY_PATH is suddenly “lost” when sqlplus reaches the stage when it load $ORACLE_HOME/bin/oracle.
    You can clearly observe this by setting DYLD_PRINT_LIBRARIES=1 in your environment.

    This file has the setuid bit, and I guess this behavior is for obvious security reasons (just write your own shared lib and wupti, privilege gained !!!)

    The only way I managed to get this to work was to create the expected “/b/227” subtree and make some links… as shown below.
    If you know a better way, please let me know. This one is not perfect, but it works ;-)…

    Pom:~ phil$ ls -lR /b
    total 0
    drwxr-xr-x 8 root admin 272 18 Apr 21:25 227
    -rw-r–r– 1 root admin 0 18 Apr 21:20 THIS IS A WORKAROUND TO MAKE ORACLE WORK

    /b/227:
    total 0
    drwxr-xr-x 3 root admin 102 18 Apr 21:14 has
    drwxr-xr-x 3 root admin 102 18 Apr 21:14 network
    drwxr-xr-x 3 root admin 102 18 Apr 21:14 opsm
    drwxr-xr-x 3 root admin 102 18 Apr 21:13 rdbms
    drwxr-xr-x 3 root admin 102 18 Apr 21:25 sqlplus

    /b/227/has:
    total 8
    lrwxr-xr-x 1 root admin 44 18 Apr 21:14 lib -> /Users/oracle/oracle/product/10.2.0/db_1/lib

    /b/227/network:
    total 8
    lrwxr-xr-x 1 root admin 44 18 Apr 21:14 lib -> /Users/oracle/oracle/product/10.2.0/db_1/lib

    /b/227/opsm:
    total 8
    lrwxr-xr-x 1 root admin 44 18 Apr 21:14 lib -> /Users/oracle/oracle/product/10.2.0/db_1/lib

    /b/227/rdbms:
    total 8
    lrwxr-xr-x 1 root admin 44 18 Apr 21:13 lib -> /Users/oracle/oracle/product/10.2.0/db_1/lib

    /b/227/sqlplus:
    total 8
    lrwxr-xr-x 1 root admin 44 18 Apr 21:25 lib -> /Users/oracle/oracle/product/10.2.0/db_1/lib

    Comment by Philippe Causse — April 19, 2009 @ 3:12 pm

  12. Errata… Of course in post #11, it’s DYLD_LIBRARY_PATH and not LD_LIBRARY_PATH. Just a typo. The contents is still valid!

    Comment by Philippe Causse — April 19, 2009 @ 3:13 pm

  13. Thanks for the great help!

    The installation process gets hung in the creation of the Oracle Database Configuration Assistant step. It indicates it is in progress but eventually times out.

    Any suggestions?

    Comment by Ernie Svehla — April 19, 2009 @ 5:04 pm

  14. @Philippe – I am not using $ORACLE_HOME/lib libraries from other users.
    Already previously I installed Oracle Instant Client (http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html) under /usr/local/oracle and other users uses this client to connect to database.

    @Ernie – hard to tell without seeing any error messages. The only thing I can suggest is to check kernel setting preconditions that I mentioned (and do reboot after changing them).

    Comment by Raimonds Simanovskis — April 19, 2009 @ 7:16 pm

  15. Hello again ;-)

    @Raimonds – Yeps. Same for me here ! Having oracle client in /usr/local/ohome… but it lacks the imp and exp commands!
    I have Perl’s DBD::Oracle built against this as well (btw, I noticed that the Oracle client is a 32bits app… the server is 64bits !!!)
    Agree with you, no troubles using the Instant Client binaries… None of them have a setuid bit neither, and I guess that’s the reason why the DYLD_LIBRARY_PATH works in this case.

    Comment by Philippe Causse — April 19, 2009 @ 9:50 pm

  16. I followed this tutorial line by line, but couldn’t install, it is failing on linking.

    $ lsnrctl start runs fine but

    $ sqlplus / as sysdba I always get ORA-12547: TNS:lost contact

    $ env
    ORACLE_BASE=/opt/oracle
    ORACLE_HOME=/opt/oracle/product/10.2.0.4
    ORACLE_HOSTNAME=localhost
    ORACLE_SID=ORCL
    DYLD_LIBRARY_PATH=/opt/oracle/product/10.2.0.4/lib

    $ sw_vers
    ProductName: Mac OS X
    ProductVersion: 10.5.6
    BuildVersion: 9G55

    $ relink all
    – Linking OIFCFG tool
    gcc -arch x86_64 -o oifcfg -L/opt/oracle/product/10.2.0.4//lib/ -L/opt/oracle/product/10.2.0.4/lib/ -L/lib /opt/oracle/product/10.2.0.4/srvm/lib/prifcg.o /opt/oracle/product/10.2.0.4/srvm/lib/sprifcg.o /opt/oracle/product/10.2.0.4/srvm/lib/prifutl.o /opt/oracle/product/10.2.0.4/srvm/lib/prifcmn.o -lcore10 -lhasgen10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -locr10 -locrb10 -locrutl10 -lhasgen10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclntsh -lskgxn2 -lcore10 `cat /opt/oracle/product/10.2.0.4/lib/sysliblist` -lclntsh -lclntsh -lskgxn2 `cat /opt/oracle/product/10.2.0.4/lib/sysliblist` -L/opt/oracle/product/10.2.0.4/lib -lm `cat /opt/oracle/product/10.2.0.4/lib/sysliblist` -lm -lm
    mv -f /opt/oracle/product/10.2.0.4/bin/oifcfg /opt/oracle/product/10.2.0.4/bin/oifcfg0
    mv oifcfg /opt/oracle/product/10.2.0.4/bin/oifcfg
    make: *** No rule to make target `install’. Stop.
    chmod 755 /opt/oracle/product/10.2.0.4/bin
    make -f /opt/oracle/product/10.2.0.4/sysman/lib/ins_sysman.mk relink_sharedobj SHAREDOBJ=libnmemso
    /usr/bin/cc -arch x86_64 -DSS_64BIT_SERVER -DORAX86_64 -DBIT64 -DMACHINE64 -DSLS8NATIVE -DSLU8NATIVE -m64 -o /opt/oracle/product/10.2.0.4/sysman/lib/libnmemso.dylib -dynamiclib -L/opt/oracle/product/10.2.0.4/lib/ -L/opt/oracle/product/10.2.0.4/sysman/lib/ -L/opt/oracle/product/10.2.0.4/lib/stubs/ -L/opt/oracle/product/10.2.0.4/lib -L/opt/oracle/product/10.2.0.4/sysman/lib/ -Wl,-rpath,/opt/oracle/product/10.2.0.4/lib/:/opt/oracle/product/10.2.0.4/sysman/lib/ /opt/oracle/product/10.2.0.4/sysman/lib/libnmem.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmer.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmeu.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmt.a /opt/oracle/product/10.2.0.4/sysman/lib/libnml.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmee.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmefmgr.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmevr.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmehu.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmehl.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmepm.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmedc.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmedt.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmedm.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmedr.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmeb.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmec.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmesched.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmectl.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmejc.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmej.a -L/opt/oracle/product/10.2.0.4/jdk/jre/Libraries/client -L/opt/oracle/product/10.2.0.4/jdk/jre/Libraries -ljvm -lverify -Wl,-rpath,/opt/oracle/product/10.2.0.4/lib/:/opt/oracle/product/10.2.0.4/sysman/lib/:/opt/oracle/product/10.2.0.4/jdk/jre/Libraries/client:/opt/oracle/product/10.2.0.4/jdk/jre/Libraries /opt/oracle/product/10.2.0.4/sysman/lib/libnmeclumgr.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmecluster.a /opt/oracle/product/10.2.0.4/sysman/lib/libnmexml.a -lxml10 -lcore10 -lnls10 -lunls10 -lclntsh -lnnz10 -lpthread -lnsl -lm -ldl -L/opt/oracle/product/10.2.0.4/lib `cat /opt/oracle/product/10.2.0.4/lib/sysliblist` -L/opt/oracle/product/10.2.0.4/lib -lm
    ld: library not found for -ljvm
    collect2: ld returned 1 exit status
    make[1]: *** [/opt/oracle/product/10.2.0.4/sysman/lib/libnmemso.dylib] Error 1
    make: *** [libnmemso] Error 2

    Would anybody know what I could be doing wrong here?

    Comment by Alessandro Oliveira — April 20, 2009 @ 8:06 am

  17. I got ORA-12547 error when I didn’t increase the number of file descriptors with ulimit before installation. Have you set these before running installation?

    ulimit -Hn 65536
    ulimit -Sn 65536

    Relinking from command line was also failing for me – I recommend remove all software and do installation from scratch and verify that you do all preconditions (set kernel parameters, reboot, set and execute .bash_profile for oracle user).

    Comment by Raimonds Simanovskis — April 20, 2009 @ 9:55 am

  18. Hi Raimonds,
    I uninstalled oracle and remove home directory etc. again started installation from scratch but facing the same problem as Alessandro Oliveira is facing.

    Did you install oracle database on mac os 10.5 ??
    if yes, then how !! give me updated installation doc.

    Thank you,
    Shyam

    Comment by Shyam S Singh — April 20, 2009 @ 12:08 pm

  19. Yes, I installed on Mac OS X 10.5.6 and did documented everything I did in this tutorial.
    As I wrote the only issue initially was ORA-12547 error which I solved with setting “ulimit -Hn 65536” and “ulimit -Sn 65536” before doing the installation.

    Hard to tell what could be wrong on your computer :(

    Comment by Raimonds Simanovskis — April 20, 2009 @ 12:59 pm

  20. after configuring correctly

    ulimit -Hn 65536
    ulimit -Sn 65536

    It worked!

    Thanks Raimonds for your help!

    Comment by Alessandro Oliveira — April 20, 2009 @ 4:43 pm

  21. Raimonds,
    I configured .bash_profile and save it.
    After that I restart the system but again face the same problem.

    Comment by Shyam S Singh — April 21, 2009 @ 12:11 pm

  22. Hi Raimonds,
    Your installation document is well but it impacts more when it is published with all steps screen shots.

    So, if possible please do it because in terminal screen shots many commands can be show at the same time.

    Comment by Shyam Singh — April 21, 2009 @ 12:42 pm

  23. @Shyam

    Please look at other tutorials which also have some screenshots
    http://ronr.blogspot.com/2009/04/how-to-install-oracle-10204-on-intel.html
    http://www.pythian.com/news/1937/quick-install-guide-for-oracle-10g-release-2-on-mac-os-x-leopard-intel

    Maybe you will find some clues about what is wrong with your installation.
    And take a look at http://download.oracle.com/docs/cd/B19306_01/install.102/b25286/pre_install.htm#BABCHAED – there is description how to verify that your current kernel parameter values are correct.

    Comment by Raimonds Simanovskis — April 21, 2009 @ 1:35 pm

  24. @ Raimonds,
    Today I explore oracle installation doc of oracle to install database on mac os 10.5.

    One place it ask for “Setting Shell Limits for the oracle User” and the path is “cd /System/Library/StartupItems/IPServices” but IPServices file not found.

    Now what to do ??

    2. I installed oracle but one error shows in configuration Assistants screen that oracle Net Configuration assistant “failed”.
    Can you suggest ??

    Comment by Shyam Singh — April 22, 2009 @ 2:43 pm

  25. @ Raimonds,

    as you have said that you have installed oracle on mac os 10.5.6.
    Can you send me the installation log file on my email id shyam.singh@rsg.co.in.

    Thanks.

    Comment by Shyam Singh — April 23, 2009 @ 11:34 am

  26. Hi,

    How to set the display for oracle user on MAC. I have already done the export DISPLAY=”localhost:0.0″ in .bash_profile for oracle user
    this is not working. However i am able to see the xclock from other base user.But not able to see from root as well as oracle user.

    Comment by Rajendra Prasad — April 23, 2009 @ 1:41 pm

  27. Thanks for the article. I’m now developing with Oracle 10g on my macbook Pro and loving it! I had been wanting this for a long long time!

    Comment by James — April 23, 2009 @ 5:26 pm

  28. @Rajendra

    I set
    export DISPLAY=:0.0
    and it was OK for oracle installer.

    I also cannot open xclock, but no problems with Oracle installer.

    Comment by Raimonds Simanovskis — April 23, 2009 @ 7:23 pm

  29. hello to you, I tried to install Intel Oracle10GR2 for Mac yesterday, and after installation everything was good, I could connect and disconnect me without problem this morning when I try to connect I get the following message :

    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Mac OS X Error: 2: No such file or directory

    – I think I have ever seen on windows this type of message, and the resolve needed to stop and restart services Oracle but I do not know how to do it under Mac OS X.

    thank you

    Comment by Youssef — April 24, 2009 @ 8:21 pm

    • Youssef,

      I noticed you had the same problem that I am currently having…that is:

      thunderhawk:admin oracle$ sqlplus system@orcl

      SQL*Plus: Release 10.2.0.4.0 – Production on Fri May 15 18:59:09 2009

      Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

      Enter password:
      ERROR:
      ORA-01034: ORACLE not available
      ORA-27101: shared memory realm does not exist
      Mac OS X Error: 2: No such file or directory

      How did you get sqlplus to finally work. I am out of gas trying to figure this out!…help?

      Comment by Michael Morin — May 16, 2009 @ 2:06 am

      • Hi~!

        I have same problem and same Error messages.

        How solved ….?

        Comment by maru — April 5, 2010 @ 3:58 pm

  30. @Youssef : To install oracle database on mac os which installation doc. you used ??
    1. After Configuration of all parameters did you check xclock, logged in theough Oracle . ??

    I tried much but not success so far.

    Comment by RSG_Shyam — April 25, 2009 @ 7:39 am

  31. @Youssef

    I described in section “Automatic startup of Oracle database” how to create script for starting Oracle database.

    Comment by Raimonds Simanovskis — April 26, 2009 @ 3:48 pm

  32. it’s ok now,
    tnks

    Comment by youssef — April 27, 2009 @ 2:46 pm

  33. I used listener.ora and tnsnames.ora as above but I got
    SQL> conn / as sysdba
    ERROR:
    ORA-12547: TNS:lost contact

    tnsping is OK. Can anyone help me out?

    Comment by ern — April 28, 2009 @ 1:43 pm

  34. I got ORA-12547 error when I didn’t increase the number of file descriptors with ulimit before installation. Have you set these before running installation?

    ulimit -Hn 65536
    ulimit -Sn 65536

    Comment by Raimonds Simanovskis — April 28, 2009 @ 6:36 pm

  35. Thank you.
    I added them in the /etc/rc.sh and rebooted my macbook before the installation. But now I think it didn’t work. The official installation guide metions IPServices also. I didn’t find that in Leopard(10.5.6). So I suppose that’s the reason. I’ll add these two commands to my .bash_profile.

    Comment by ern — April 29, 2009 @ 3:17 pm

  36. I would like to know how to access the oracle DB with the web interface, which port to use ??

    thank you

    Comment by youssef — May 4, 2009 @ 3:59 pm

  37. What you mean by web interface? Oracle Application Express (APEX) and iSQL*Plus are currently unsupported for Mac OS X (see http://download.oracle.com/docs/cd/B19306_01/relnotes.102/b25285/toc.htm#BABIJEFG).

    If you still need APEX then use this install guide http://www.pythian.com/news/2014/installing-apex-on-oracle-10gr2-on-mac-os-x-leopard-intel

    Comment by Raimonds Simanovskis — May 4, 2009 @ 6:11 pm

  38. sorry for my message, I think it was not clear, for web interface I wanted to say: the possibility of using isqlplus on a browser, which facilitates the display as for example on windows:
    http://localhost:5560/isqlplus

    I hope this is unambiguous now
    Thank you very much

    Comment by Youssef — May 4, 2009 @ 10:50 pm

  39. is possible to have oracle enterprise manager on leopard?

    Comment by sanselme — May 4, 2009 @ 11:17 pm

  40. plz give notes oninstallation of oracle 10g 0nwindow 2000 with server and internet
    thanks
    deepak

    Comment by deepak — May 9, 2009 @ 9:13 am

  41. Dear Raimonds, I was referring to another quick install guide by Alex Gorbachev @ http://tinyurl.com/quickinstallmac and when I try to start lsnrctl post installation.. I get the error Image not found.. I have no clue how to TS this, I want to try to uninstall and start from scratch with your given steps, however I dont know how to uninstall the previous installations

    Comment by Ankur — May 15, 2009 @ 12:39 am

  42. Hello,

    I followed the installation to a tee…however I get the following errors with the listener!

    thunderhawk:~ oracle$ more .bash_profile
    export DISPLAY=:0.0
    export ORACLE_BASE=$HOME
    export ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
    export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
    export ORACLE_SID=ORCL
    PATH=$PATH:/$ORACLE_HOME/bin
    umask 022
    ulimit -Hn 65536
    ulimit -Sn 65536
    —–
    thunderhawk:~ mmorin$ su – oracle
    Password:
    thunderhawk:~ oracle$ ./lsnrctl status
    -bash: ./lsnrctl: No such file or directory
    thunderhawk:~ oracle$ lsnrctl status

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 14-MAY-2009 22:27:24

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))(PORT=1521))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    MacOS X Server Error: 2: No such file or directory
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost))(PORT=1521))
    TNS-01103: Protocol specific component of the address is incorrectly specified
    TNS-12533: TNS:illegal ADDRESS parameters
    TNS-12560: TNS:protocol adapter error
    TNS-00503: Illegal ADDRESS parameters

    thunderhawk:~ oracle$ lsnrctl start

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 14-MAY-2009 22:28:02

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Starting /Users/oracle/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait…

    TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
    System parameter file is /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Log messages written to /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))(PORT=1521))
    TNS-01150: The address of the specified listener name is incorrect
    TNS-01153: Failed to process string: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost))(PORT=1521))

    Listener failed to start. See the error message(s) above…

    thunderhawk:~ oracle$

    I’ve edited the listener.ora to include localhost rather than the IP address…could this be my problem?…I have the latest Leopard on an IMac. Note…its not the server version?…any help from anyone?

    Comment by Michael Morin — May 15, 2009 @ 5:36 am

  43. You have a misplaced parenthesis. The PORT specification is part of an address description.
    Change to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=localhost) (PORT=1521) ) …[rest]…

    And it should work.

    Cheers,
    /Phil

    Comment by Philippe Causse — May 15, 2009 @ 6:12 am

  44. I updated my listener.ora thanks to Philippe Causse and tnsnames.ora…logout as oracle and log back in as oracle and issue the lsnrtcl status command and get the following:

    hunderhawk:oracle oracle$ lsnrctl status

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 14-MAY-2009 23:47:37

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    MacOS X Server Error: 2: No such file or directory
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    MacOS X Server Error: 61: Connection refused
    ………..
    My listener.ora looks like this:

    thunderhawk:admin oracle$ more listener.ora
    # listener.ora Network Configuration File: /Users/oracle/oracle/product/10.2.0/d
    b_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /Users/oracle/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    )
    (SID_DESC =
    (SID_NAME = orcl)
    (ORACLE_HOME = /Users/oracle/oracle/product/10.2.0/db_1)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    )
    )
    ………

    My tnsnames.ora looks like this:
    thunderhawk:admin oracle$ more tnsnames.ora
    # tnsnames.ora Network Configuration File: /Users/oracle/oracle/product/10.2.0/d
    b_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )
    ………..

    Does anyone have a clue? My install went fine…is it because I am not running the Server version of Leopard?…advise?

    Comment by Michael Morin — May 15, 2009 @ 6:56 am

    • Did you do “lsnrctl start” ?

      /Phil

      Comment by Philippe Causse — May 15, 2009 @ 8:47 am

  45. Hi..,

    I am trying to install oracle database 10.2 on mac os 10.5.4.

    I followed you installation doc and completed below steps:

    In installation wizard I selected the following options:
    0. Advanced Installation – so that I can change some default options
    0. Standard Edition – as I don’t need additional features of Enterprise Edition
    0. Create Database / General Purpose
    0. Global database name: orcl, SID: orcl
    0. Character set: UTF-8 AL32UTF8
    0. Create database with sample schemas

    after specify database storage option window I get Error ORA-12547 TNS lost contact Error. with two option retry and ignore.

    I selected retry but again shows the same error. if ignored it it moved forward but showed same error many times.

    At last, password management window it didn’t showed any database installed.

    Can any one suggest ??

    -Shyam

    Comment by Shyam — May 15, 2009 @ 9:09 am

  46. Thanks to Phillipe Causse, I was finally able to get the Listener to start. This blog is a great resource to have. My kudos to all.

    thunderhawk:~ oracle$ lsnrctl start

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 15-MAY-2009 10:14:11

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Starting /Users/oracle/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait…

    TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
    System parameter file is /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Log messages written to /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    ————————
    Alias LISTENER
    Version TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
    Start Date 15-MAY-2009 10:14:11
    Uptime 0 days 0 hr. 0 min. 0 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Listener Log File /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening Endpoints Summary…
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary…
    Service “PLSExtProc” has 1 instance(s).
    Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
    Service “orcl” has 1 instance(s).
    Instance “orcl”, status UNKNOWN, has 1 handler(s) for this service…
    The command completed successfully

    Comment by Michael Morin — May 15, 2009 @ 5:18 pm

  47. New Question:

    Now that the Listener started…I try to start the database and get:

    hunderhawk:bin oracle$ dbstart
    ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
    Usage: //Users/oracle/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME

    and when I issue the sqlplus at the command prompt I get:

    hunderhawk:bin oracle$ sqlplus

    SQL*Plus: Release 10.2.0.4.0 – Production on Fri May 15 10:29:19 2009

    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

    Enter user-name: oracle
    Enter password:
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Mac OS X Error: 2: No such file or directory

    Enter user-name:
    ——

    Any leads as to why the dbstart command did not work?…and how I get sqlplus to work for me?…I thank you all in advance.

    Comment by Michael Morin — May 15, 2009 @ 5:31 pm

    • Solution to problem:

      thunderhawk:db_1 oracle$ sqlplus / as sysdba

      SQL*Plus: Release 10.2.0.4.0 – Production on Fri May 15 20:14:23 2009

      Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

      Connected to an idle instance.

      SQL> startup
      ORACLE instance started.

      Total System Global Area 612368384 bytes
      Fixed Size 2085872 bytes
      Variable Size 167775248 bytes
      Database Buffers 436207616 bytes
      Redo Buffers 6299648 bytes
      Database mounted.
      Database opened.
      SQL>

      Comment by Michael Morin — May 16, 2009 @ 5:16 am

    • dbstart can be used directly from the command line to start oracle, if the Y flag in oratab is set:

      sudo vim /etc/oratab

      # Change N to Y at end of line:
      orcl:/Users/oracle/oracle/product/10.2.0/db_1:Y

      oracle$ dbstart $ORACLE_HOME
      Processing Database instance “orcl”: log file /Users/oracle/oracle/product/10.2.0/db_1/startup.log

      oracle$ sqlplus scott/tiger@orcl

      SQL*Plus: Release 10.2.0.4.0 – Production on Wed Jul 1 21:50:44 2009

      Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

      Connected to:
      Oracle Database 10g Release 10.2.0.4.0 – Production

      SQL>

      Comment by Steven Trevor — July 2, 2009 @ 3:52 am

  48. Hello Raimonds,
    I have posted my issues many times on this blog but still I am facing the same problem.
    I configured all related files as:

    I login through oracle and find that /etc.sysctl.conf is configured as :

    kern.sysv.semmsl=87381
    kern.sysv.semmns=87381
    kern.sysv.semmni=87381
    kern.sysv.semmnu=87381
    kern.sysv.semume=10
    kernel.sysv.shmall=2097152
    kernel.sysv.shmmax=2147483648
    kernel.sysv.shmmni=4096
    kern.maxfiles=65536
    kern.maxfilesperproc=65536
    net.inet.ip.portrange.first=1024
    net.inet.ip.portrange.last=65000
    kern.corefile=core
    kern.maxproc=2068
    kern.maxprocperuid=2068

    anything wrong here ??

    @@@ .bash_profile is configured as:

    umask 022
    export ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
    export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
    export ORACLE_SID=rsg
    PATH=$PATH:/$ORACLE_HOME/bin

    AND THE OUTPUT OF configToolFailedCommands.bak as:

    # Copyright (c) 1999, 2008, Oracle. All rights reserved.
    /Users/oracle/oracle/product/10.2.0/db_1/bin/netca /orahome
    /Users/oracle/oracle/product/10.2.0/db_1 /orahnam OraDb10g_home1
    /instype typical /inscomp client,oraclenet,javavm,server,ano /insprtcl tcp
    /cfg local /authadp NO_VALUE /nodeinfo NO_VALUE /
    responseFile /Users/oracle/oracle/product/10.2.0/db_1/network/install/netca_typ.rsp

    /Users/oracle/oracle/product/10.2.0/db_1/bin/dbca -progress_only
    -createDatabase -templateName General_Purpose.dbc -gdbName sairam -sid sairam
    -sysPassword 05dddb58689a67a438b5d73019b1139092 -systemPassword
    05dddb58689a67a438b5d73019b1139092 -sysmanPassword 0550a235685a2de0d510be58bcfc1b1b74
    -dbsnmpPassword 05173f47687a4a4207fff300304b6a077d -emConfiguration NONE
    -datafileJarLocation /Users/oracle/oracle/product/10.2.0/db_1/assistants/dbca/templates
    -datafileDestination /Users/oracle/oracle/product/10.2.0/oradata/
    -responseFile NO_VALUE -characterset AL32UTF8
    -obfuscatedPasswords true -sampleSchema true -oratabLocation
    NO_VALUE -recoveryAreaDestination NO_VALUE

    /Users/oracle/oracle/product/10.2.0/db_1/bin/isqlplusctl start

    Please suggest where is the problem ??

    Thanks a lot.

    Comment by RSG_Shyam — May 20, 2009 @ 11:56 am

  49. @Raimonds When I checked the ulimit at command following information are showing:

    oracle:~ oracle$ ulimit -a

    core file size (blocks, -c) 0
    data seg size (kbytes, -d) 6144
    file size (blocks, -f) unlimited
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 65536
    pipe size (512 bytes, -p) 1
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 266
    virtual memory (kbytes, -v) unlimited

    ————————————-
    oracle:~ oracle$ ulimit -Sa
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) 6144
    file size (blocks, -f) unlimited
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 65536
    pipe size (512 bytes, -p) 1
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 266
    virtual memory (kbytes, -v) unlimited

    ————————————
    oracle:~ oracle$ ulimit -Ha
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) unlimited
    file size (blocks, -f) unlimited
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 65536
    pipe size (512 bytes, -p) 1
    stack size (kbytes, -s) 65532
    cpu time (seconds, -t) unlimited
    max user processes (-u) 532
    virtual memory (kbytes, -v) unlimited

    Comment by RSG_Shyam — May 21, 2009 @ 9:20 am

  50. Hi…,

    Can anyony tell me where I am wrong to install oracle database 10.2 on mac on 10.5.server.
    I am getting Error ORA-12547 TNS Lost contact.

    I have configured files as below:

    @Alex: I fixed ulimit issue and now by .bash_profile looks like that

    1. .bash_profile:

    ulimit -Hu 512
    ulimit -Su 512
    ulimit -Hn 10240
    ulimit -Sn 10240

    umask 022
    export ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
    export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
    export ORACLE_SID=rsg
    PATH=$PATH:/$ORACLE_HOME/bin

    2. /etc/sysctl.conf:

    kern.sysv.semmsl: 87381
    kern.sysv.semmns: 87381
    kern.sysv.semmni: 87381
    kern.sysv.semmnu: 87381
    kern.sysv.semume: 10
    kern.sysv.shmall: 2097152
    kern.sysv.shmmax: 4194304
    kern.sysv.shmmni: 4096
    kern.maxfiles: 12288
    kern.maxfilesperproc: 10240
    net.inet.ip.portrange.first: 49152
    net.inet.ip.portrange.last: 65535
    kern.corefile: /cores/core.%P
    kern.maxproc: 1024
    kern.maxprocperuid: 512

    3. /etc/hosts :

    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ##
    192.168.1.133 localhost

    #127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost

    4. oracle:~ root# hostname
    oracle.rsg.com

    5. Environment Looks :

    oracle:~ oracle$ env
    MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/man
    TERM=xterm-color
    SHELL=/bin/bash
    USER=oracle
    ORACLE_SID=rsg
    PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin://Users/oracle/oracle/product/10.2.0/db_1/bin
    PWD=/Users/oracle
    SHLVL=1
    HOME=/Users/oracle
    DYLD_LIBRARY_PATH=/Users/oracle/oracle/product/10.2.0/db_1/lib
    ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
    _=/usr/bin/env

    Now, how to move ??

    Comment by RSG_Shyam — May 25, 2009 @ 7:43 am

  51. If you are Oracle customer then I suggest that you report TAR to Oracle support.
    It seems that you have some specific issue and it will be hard to diagnose it here.

    Other suggestion would be to try it on another Mac if you have such opportunity :) Then you will find if this particular issue with your current Mac.

    Comment by Raimonds Simanovskis — May 25, 2009 @ 10:13 am

  52. This would work for me if I had a Mac computer

    Comment by yusuf bilir — May 27, 2009 @ 9:20 am

  53. Hi.,

    I have installed oracle software 10.2 on mac 10.5 server.

    I created database through dbca but tnsnames.ora and listener.ora files not get created as its location e.g /Users/oracle/oracle/product/10.2.0/db_a/network/admin.

    I created both files and configured it.

    Now, when I start listener by using:

    oracle:~ oracle$ lsnrctl start

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 27-MAY-2009 15:16:07

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    TNS-01106: Listener using listener name LISTENER has already been started

    [B]when try to start database: it shows [/B]

    dbstart
    ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
    Usage: //Users/oracle/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME
    Processing Database instance “rsg”: log file /Users/oracle/oracle/product/10.2.0/db_1/startup.log
    Processing Database instance “rsg”: log file /Users/oracle/oracle/product/10.2.0/db_1/startup.log

    [B]when try to connect it :[/B]

    oracle:~ oracle$ sqlplus hr/hr@rsg

    SQL*Plus: Release 10.2.0.4.0 – Production on Wed May 27 15:16:56 2009

    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

    ERROR:
    ORA-28547: connection to server failed, probable Oracle Net admin error

    B]when try to connect it by other user:[/B]

    Enter user-name: hr
    Enter password:
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Mac OS X Error: 2: No such file or directory

    Enter user-name:

    Can you tell me the problem and where is it ??

    Comment by RSG_Shyam — May 27, 2009 @ 12:13 pm

  54. I’m a newcomer with mac and I want to install the oracle database 10 on my new iMac (10.5.7).
    I installed all Xcode tools and managed to create the oracle user as described above.
    When I come to the part of vi /etc/sysctl.conf nohting is displayed. I only get the message “/etc/sysctl.conf” [New File]
    What did I do wrong?

    Comment by Fons — June 1, 2009 @ 12:08 pm

  55. /etc/sysctl.conf should be new file – this file is used to override default kernel parameters, by default there is no such file.

    Just enter the parameters I mentioned and save and reboot computer.

    Comment by Raimonds Simanovskis — June 1, 2009 @ 3:13 pm

  56. The install went fine, I can start and stop the instance without any problems, (only when I su – oracle), I can use sqlplus to perform all database operations (creating tables, procedures etc) However when I try to use any other tools i:e SQLDeveloper, or NavCat Developer, I get a:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    01034. 00000 “ORACLE not available”

    The funny thing though, SQL Developer actually conntected fine a few times (even navicat), but after I tried to use the tools on a different day, it seems to give me the error above (the problem seems to be an intermitting problem), I can’t seem to get sqldeveloper or navicat to to work anymore.. (SQLplus is the only tool that will work)

    any suggestions?

    Comment by lionel joens — June 2, 2009 @ 3:40 am

  57. Probably some kernel parameters are still too low and some Oracle processes are not started.
    The only suggestion I can give is to delete everything that you installed and try to do it one more time _exactly_ following my instructions :)

    Comment by Raimonds Simanovskis — June 5, 2009 @ 3:03 pm

  58. @Raimonds:

    I want to import data from file maker to oracle.

    In file maker we can export data in .csv format.

    Is there any way to handle this issue. how to import data from File maker to oracle.

    Comment by RSG_Shyam — June 11, 2009 @ 1:05 pm

    • Download SQL Developer from the OTN site for Mac and create the file structure for the import…then use the import tool within SQL Developer. I’ve actually had better luck importing an .xls (spreadsheet) file rather than a .cvs. The tool works great. Good luck.

      Comment by Michael Morin — June 11, 2009 @ 4:58 pm

  59. @Michael:

    Did you work for it ever.
    I have downloaded sqlDeveloper and installed it. but what file structure you are talking abt. can you brief it pl.

    Comment by RSG_Shyam — June 12, 2009 @ 7:22 am

    • .xls is simply an Excel spreadsheet format. You can also use .csv which is ascii format. The spreadsheet seems to work better in SQL Developer. So create a blank datafile with all the appropriate fields and then import…note that all fields should be describe in the same manner both in the xls file and the newly created file for the import to work.

      Comment by Michael Morin — June 25, 2009 @ 8:30 pm

  60. can I install Oracle on Mac OS X Server in the same way as it was described in this ticket?

    thanks

    Comment by youssef — June 22, 2009 @ 11:49 pm

  61. I already startup the Database, the listener. But when I try to connect from other computer client, an ORA-12541: TNS:no listener
    The host is reached thru ping, tnsping throws the same ORA.

    Here is the output of my server (iMac)
    iMac:etc oracle$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.4.0 – Production on Mon Jun 22 22:17:58 2009

    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

    Connected to an idle instance.

    SQL> startup
    ORACLE instance started.

    Total System Global Area 612368384 bytes
    Fixed Size 2085872 bytes
    Variable Size 167775248 bytes
    Database Buffers 436207616 bytes
    Redo Buffers 6299648 bytes
    Database mounted.
    Database opened.
    SQL> quit
    Disconnected from Oracle Database 10g Release 10.2.0.4.0 – Production
    iMac:etc oracle$ lsnrctl start

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 22-JUN-2009 22:18:41

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Starting /Users/oracle/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait…

    TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
    System parameter file is /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Log messages written to /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    ————————
    Alias LISTENER
    Version TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
    Start Date 22-JUN-2009 22:18:41
    Uptime 0 days 0 hr. 0 min. 0 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Listener Log File /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening Endpoints Summary…
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary…
    Service “PLSExtProc” has 1 instance(s).
    Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
    Service “WIREX” has 1 instance(s).
    Instance “WIREX”, status UNKNOWN, has 1 handler(s) for this service…
    The command completed successfully

    Comment by Horacio — June 23, 2009 @ 5:22 am

  62. Problem Solved. I change the port to 10210 and works. Don`t know why the Listener didn`t throw a Warning or error, but works. If you know please share with men.

    Comment by Horacio — June 23, 2009 @ 6:04 am

  63. hi all

    I tried to install oracle on MacOSX Server, everything went well (I think) but at the end when I try to run sqlplus I get:

    -bash: //Users/oracle/oracle/product/10.2.0/db_1/bin/sqlplus: Bad CPU type in executable
    can you help me plz

    thanks

    Comment by youssef — June 24, 2009 @ 2:07 am

    • have you fixed the “Bad CPU type” problem? I ran into the same issue and wondering if there is any solution.

      Comment by wdz — July 28, 2010 @ 6:18 pm

  64. Hello,

    Is it possible to install Apps into this database environment on an Intel Mac? Can you point me to any related documents or posts please?

    Currently have an Apps install running in a Parallels VM, which is running Oracle Enterprise Linux. Would like to have it running as Mac native if possible.

    Thank you,

    Peter.

    Comment by Peter — June 25, 2009 @ 3:03 pm

  65. Hello,
    I had followed your tutorial completely, but got error when trying to OUI
    ERROR: No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
    Please help

    Comment by Zbu — June 26, 2009 @ 4:59 am

  66. by following this guide at the beginning, I change the Lištná just to listen on localhost, now I want to change it to connect to my database from another machine,
    thank you to tell me what should I change

    Comment by youssef — June 26, 2009 @ 2:41 pm

  67. Having an issue with autostart, have tested on the command line before doing a restart and found the following. The dbstart and dbshut commands work from the oracle owners command line. However the script /Library/StartupItems/Oracle
    asks for a password each time it is run, it is also run from the oracle owners command line. Is this password request stopping the script from completing at start up.

    Comment by Rob — August 3, 2009 @ 3:23 pm

  68. Hi Raimonds, Great guide, thanks for taking the time to post it. I’m trying to install 10g R2 client on my Macbook (10.5 Leopard on Core 2 Duo, so 64-bit) using the client downloaded from http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10204macsoft_x86-64.html. I get an error saying Unable to find make utility in location: /usr/bin/make (and I can see that it’s not at that location). This brings me to a halt with Retry and Ignore options not helping and Cancel being the only option left. I can’t seem to find much info on make for mac os. Any ideas?
    Thanks,
    Jim

    Comment by jimothyg — August 4, 2009 @ 8:53 am

  69. @Jim

    Have you installed XCode development tools? You need to install them from Mac OS X installation DVD (or you can also download from http://developer.apple.com/technology/Xcode.html). They also install all necessary standard Unix development utilities (gcc, make etc.) which are necessary for compiling additional software.

    Comment by Raimonds Simanovskis — August 6, 2009 @ 9:35 pm

  70. Hi,

    Thank you for such great documentation this is great. Just a minor nitpcik. Under the section Additional oracle user settings the .bash_profile statement:

    PATH=$PATH:/$ORACLE_HOME/bin

    should be (no leading slash in front of the variable)

    PATH=$PATH:$ORACLE_HOME/bin

    Again many thanks for such a great HOW TO.

    Comment by Claude Devarenne — August 17, 2009 @ 7:51 pm

  71. Thanks, fixed the mistake.

    Comment by Raimonds Simanovskis — August 18, 2009 @ 12:37 am

  72. Anyone tried running native Oracle on a Snow Leopard build yet? I’m wondering if all will remain copacetic when I inevitably upgrade…

    Comment by Christopher R. Murphy — August 27, 2009 @ 9:53 pm

  73. The first issue with Snow Leopard is that the runInstaller script is pointing to the 1.4.2 JDK, which at least on my Mac Mini, appears to have been removed (if it was ever there) after upgrading to 10.6.

    After tweaking the JAVA_HOME variable in the script to reference the 1.5.0 path, I get the following:
    Starting Oracle Universal Installer…

    No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-08-28_11-53-28PM. Please wait …macsmacmini:Disk1 oracle$ Fri Aug 28 23:53:30 macsmacmini.local java[4460] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    Exception in thread “main” java.lang.InternalError: Can’t connect to window server – not enough permissions.
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1878)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1779)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1045)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
    at sun.awt.DebugHelper.(DebugHelper.java:29)
    at java.awt.Component.(Component.java:560)

    I’m not game to upgrade my MacBook Pro which has Oracle working flawlessly until I see things work on the Mini…

    Comment by Macca — August 28, 2009 @ 4:04 pm

    • I have Oracle up and running on my IMac with Mac OS X 10.5.8 which I obtain from my Apple Protection Plan. I would like to assume that Apple will upgrade me to Snow Leopard but I have not received any messages lately. I think it is important to upgrade Mac OS X at suggested intervals as to not experience bumps in the road for your apps especially Oracle.

      I think I am going to hold off for now since Snow Leopard just came out…perhaps some of these Oracle issues will be addressed down the road.

      Comment by Michael Morin — August 28, 2009 @ 7:20 pm

  74. Progress…

    Running a remote “ssh -X” session from my macbook didn’t help (which normally works as I’ve done Oracle installs on Solaris this way), so I logged into the desktop and was almost able to launch the installer. This time it barfed on an UnsatisfiedLink, as the JVM’s in 10.6 default to 64bit, and the installer relies on 32bit JNI calls.

    Using “./runInstaller -J-d32” will get things going – the status screen is showing “Install Successful” and is currently linking away.

    Comment by Macca — August 28, 2009 @ 4:50 pm

    • Macca,

      Thanks for the trailblazing and posting your experience here! Please keep them coming as you continue, for good or bad. I’ll update my own blog post about installing Oracle natively if you’re successful (or not).

      -Chris

      Comment by Christopher R. Murphy — August 28, 2009 @ 6:09 pm

  75. I am trying to install oracle database on mac snow leopard.
    I have completed all pre installation task. Now trying to install.
    I am getting following error:-

    No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-08-31_10-22-39AM. Please wait …The Java RunTime Environment was not found at /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/java. Hence, the Oracle Universal Installer cannot be run.
    Please visit http://www.javasoft.com and install JRE version 1.3.1 or higher and try again.
    : No such file or directory

    Can you help me in this regard.

    –SD

    Comment by SD — August 31, 2009 @ 7:29 am

    • You need to edit the runInstaller file, changing the reference to /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2 to /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0

      As I noted in my earlier post, you also need to use the -J-d32 flag.

      Unless you are comfortable with setting up the TNS listener, as well as creating a database manually, I don’t recommend proceeding, as the netca and dbca tools do not work.

      Comment by Macca — August 31, 2009 @ 12:07 pm

  76. For the record, native Oracle installed in Leopard, then upgraded to Snow Leopard works fine. See above if you’re installing native Oracle on Snow Leopard.

    Comment by Christopher R. Murphy — August 31, 2009 @ 11:37 pm

  77. Oracle Installation on snow leopard:

    I edit the runInstaller file as suggested by you and started installation.

    I selected to install “oracle Software only” at the point to reach 79% of installation I got following errors:

    Error in invoking target ‘all_no_orcl ipc_g ihsodbc32’ of makefile ‘Users/oracle/oracle/product/10.2.0./db_1/rdbms/lib/ins_rdbms.ml’. See ‘Users/oracle.oraInventory/logs/installActions2009-09-01_05-55-43PM.log’ for details.

    I retried to install but got the same error.

    Now, what to do next ?

    please provide any document, if you have.

    Thanks.

    Comment by SD — September 1, 2009 @ 9:34 am

  78. I have installed oracle database 10.2 on mac 10.5..7.
    Everything went well but when I try to check listener status. it is showing below error:-

    bash-3.2$ lsnrctl start
    dyld: Library not loaded: /b/227/network/lib/libnnz10.dylib
    Referenced from: /Users/oracle/oracle/product/10.2.0/db_1/bin/lsnrctl
    Reason: image not found

    can you suggest how to move forward ?

    Thanks.

    Comment by NetraPal — September 1, 2009 @ 1:46 pm

    • @NetraPal:

      did you set the DYLD_LIBRARY_PATH above? And does the library it was looking for really exists and does not have the file size = 0? Did you installed XCode properly?

      Comment by Nat — September 2, 2009 @ 6:51 am

  79. @Macca: May I ask, after Oracle showed Installed Successfully, were you be able to start oracle server on Snow Leopard?

    I had the same problem as @SD (comment #77). Aftre checking the trace file and dump file, I have an assumption that the problem is the format of the compiled objects or 64-bit gcc version compatibility, which caused by XCode gcc or new kernel doesn’t work with oracle. Therefore they cannot be linked into the dynamic library.

    According to @Chris Murphy, upgrading from Leopard works. Unfortunately, according to Apple’s release notes, XCode 3.1.3 in Leopard won’t install in Mac OS X 10.6, so now I’m creating a testing environment with Leopard 10.5.8 on another hard drive, and then will install Oracle which is mounted in Snow Leopard drive.

    I’ll post the result of the test. But I don’t think this would be a good solution for most users

    Nat.

    Comment by Nat — September 1, 2009 @ 5:48 pm

  80. Here is the updates on installing Oracle on newly installed Snow Leopard. A bit cheat and tricky but at least my oracle works, dbca, netca, emca, all work.

    I did install Mac 10.5.8/XCode 3.1.3 on another (thumb) drive, and created a soft link of oracle target installation to the drive in Snow Leopard. Then, installed oracle as usual, using customized installation in my case but any of them should work fine. (of course, runInstaller, GUI thru ‘su – oracle’ via remote X11, etc.. worked right out-of-the-box). I didn’t create a database yet.

    Then, I booted with Snow Leopard, and run $ORACLE_BASE/oraInventory/orainstRoot.sh and $ORACLE_HOME/root.sh to create necessary files and fix the permission.

    Next, I modified $ORACLE_HOME/inventory/Templates/jdk/copyJDK.sh to use all Java framework 1.5.0 instead of 1.4.2. Also at line #43, change ‘java -Xbootclasspath…’ to ‘java -d32 -Xbootclasspath…’.

    Then, remove the entire $ORACLE_HOME/jdk and run the ‘copyJDK.sh `echo $ORACLE_HOME` to re-create/copy the correct java library. This will solve not only DBCA, but also NETCA, EMCA and everything else GUI using java.

    (Optional) for command line version, you will also have to modify several files in $ORACLE_HOME/oui because they don’t use the above jdk link in $ORACLE_HOME.

    After that, I have to log on to workstation using ‘oracle’ user. (Running Oracle GUI using remote X11 still doesn’t work even after I was using new jnilib/jdk from Snow Leopard). Then, I could run ‘dbca’ to create database, and ‘netca’ to create listener.

    If I have time, I might try installing from Snow Leopard and XCode 3.2 and modify the make file to have GCCVERSION set to 4. The culprit is indeed the incompatibility of object files to bind/link to the libraries that oracle use. XCode 3.2 comes with gcc 4.2.1 while XCode 3.1.3 comes with gcc 4.0.1. Also XCode version is fixed with Mac OS X version, so we can’t just install XCode 3.1.3 on Snow Leopard.

    Anyone interested to pursue on this? I would love to hear the result.

    Phewww… and it’s supposed to be a short updates.

    Nat.

    Comment by Nat — September 2, 2009 @ 6:55 am

    • Nat,

      Sorry for the late reply – I gave up on the clean install once Chris posted that he had an upgraded system working, as that was all I really needed. Looks like you’ve got it sorted anyway, so well done!

      Macca.

      Comment by Macca — September 3, 2009 @ 2:05 am

  81. Nat,

    Thanks for your comments. I plan to upgrade to Snow Leopard this weekend and then hopefully I can also contribute to patching of Oracle DB installation to get it even more simpler on Snow Leopard :)

    Comment by Raimonds Simanovskis — September 3, 2009 @ 1:22 am

    • If you want to try out, I tried another approach by using gcc 4.0.1, same version as Xcode 3.1.3/OSX 10.5.8, and modified several scripts and makefiles to use the correct java and compiler/linker version. It didn’t work. I noticed that the compiler and linker 4.0.1 were used but the problem still remained. I haven’t got time to look into it much.

      One thing is, the bothering /oracle/product/10.2.0/db_1/hs/lib32/hsodbc.o wasn’t even there in the working oracle config from XCode 3.1.3/OSX 10.5.8. And I don’t think it is even needed in the first place. In fact, they weren’t even in the installation log.

      Nat.

      Comment by Nat Mongkolprasit — September 3, 2009 @ 7:21 pm

  82. @Nat,

    Thanks Nat. It is running successfully.

    Comment by Netrapal — September 3, 2009 @ 1:09 pm

    • You’re welcome! I’m glad it worked for you.

      Comment by Nat Mongkolprasit — September 3, 2009 @ 7:40 pm

  83. Hi there,

    I have an X11 issue with Snow Leopard. Followed all the suggestion for X11 setting,

    > DISPLAY:localhost:0.0; export DISPLAY
    > xhost +
    and thru X11 preference, I checked “Allow connections from network clients” and unchecked “Authenticate connections”

    I did check the runInstaller to point to “1.5.0” instead. and using Using “./runInstaller -J-d32″ to run, but no luck still got following exception.
    OUI-10025:Unable to start an interactive install session because of the following error:Can’t connect to window server – not enough permissions.

    Any clue?

    Comment by Ruly — September 9, 2009 @ 10:39 am

  84. Hi All,

    Have you any document on Oracle database installation on snow leopard.
    Please provide link.

    Comment by Shyam — September 11, 2009 @ 11:21 am

  85. I have the same problem that Ruly haves, any clue yet of how to fix it?

    Comment by Marvin — September 13, 2009 @ 4:04 am

  86. Based on comments by Nat and others I created new instructions how to install Oracle database 10g on Mac OS X Snow Leopard

    Comment by Raimonds Simanovskis — September 14, 2009 @ 12:36 am

  87. For installation, it might be better to do JAVA_ARCH=i386; export JAVA_ARCH before running the installer. That should make netca work properly when launched from within the installer.

    Comment by ebraekke — November 27, 2009 @ 1:28 pm

  88. Hi All,

    first of all, ray, thank you very much for this wirteup and the collection of additional tips, tricks and workarounds.

    I really wanted to understand why running Java Apps trough ssh X11 forwarding does not work, and the answer seems to be really simple: Because it’s not implemented. The Mac OS X bundled java (for me) does not even try to contact the X Server, it simply tries to contact the local window manager (which fails), and that’s it. The picture gets a little clearer when trying to start a demo app:

    apex:~ root# /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java -jar /tmp/SwingSet2.jar
    Wed Dec 16 13:07:12 apex.XXX.de java[8387] : 3891612: (connectAndCheck) Untrusted apps are not allowed to connect to or launch Window Server before login.
    Exception in thread “main” java.lang.InternalError: Can’t connect to window server – not enough permissions.

    The first error message is explained well in the docs.

    The solution to the issue is simple: Use a java runtime with X11 support. One resource I’ve found is this: http://landonf.bikemonkey.org/static/soylatte/ Please note the license requirements on the site.

    I will try to raise awareness within Apple for the popular demand for a Mac OS X bundled java release with X11 support.

    Nils

    Comment by Nils Goroll — December 16, 2009 @ 2:24 pm

  89. Hello,

    I tried to install Oracle on my local box, which I use everywhere and I did not get static IP, but without a static IP I cannot connect to Oracle from other boxes.

    Of course in most of all cases you don’t get this problem, because any real DB server should have a static IP, but I have spent a day to fix this problem and probably it will be useful for somebody else.

    And thanx for this article, without that I did not have any chance to run DB (I’m a Java developer, not Oracle DBA).

    Regards,
    Ian

    Comment by Ian Lipliavyi — April 11, 2010 @ 9:42 pm


RSS feed for comments on this post.

Blog at WordPress.com.

%d bloggers like this: