Set up Oracle 10g on Tiger
This describes how I set up Oracle 10g on OSX Tiger for development use.
Sergio has an excellent instruction on how to install Oracle 10g on Panther. However because the Oracle requires gcc 3.3 and Tiger uses gcc 4 by default. Some hacks are in order.
Following Sergio's instruction to prepare Oracle installation environment. Issue the following commands as root before launch installer.
sudo nicl . -append /groups/admin users oracle sudo gcc_select 3.3Then launch the Oracle installer. The installation will fail towards the end complaining lost TNS when running database creation wizard. Simply abort and do following extra steps.
Step 1: Firstly, set up $ORACLE_HOME and $PATH in your .bash_profile. By default, the ORACLE_HOME is at "/Volumes/u01/app/oracle/product/10.1.0/db_1" if you follow Sergio's instruction. While logged in as oracle, add following two lines to .bash_profile, adjust the ORACLE_HOME value as necessary.
export ORACLE_HOME="/Volumes/u01/app/oracle/product/10.1.0/db_1" export PATH=$PATH:~/bin:$ORACLE_HOME/binIssue following command to activate new settings.
cd . .bash_profile
Step 2: Relink Oracle libraries.
cd $ORACLE_HOME/lib mv libnnz10.dylib libnnz10.dylib.ori relink all mv libnnz10.dylib.ori libnnz10.dylib
Step 3: Run 'dbca' to create a database. What to do when dbca does not start?
Step 4: Run '$ORACLE_HOME/root.sh'. This script will appear hang at end and displaying a message "Expecting the CRS daemons to be up within 600 seconds." The CRS is only available on OSX Server so simply Ctrl-C terminate the process.
Step 5: Download Oracle startup and stop script and extract it to 'oracle' user home. Now you can start and stop Oracle instance by running 'startup.sh' and 'stop.sh' respectively.
Step 6: If your machine has a fixed IP, you probably don't need to perform this step. Since I run Oracle on my powerbook and I am only going to use this Oracle for development purpose, I change listener.ora and tnsnames.ora under $ORACLE_HOME/network/admin to make it work with dynamic ip like 192.168.0.1 and only connectable from localhost.
My listener.ora looks like:
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = test1) (ORACLE_HOME = /Volumes/u01/app/oracle/product/10.1.0/db_1) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) ) )
And my tnsnames.ora looks like:
TEST1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test1) ) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
One final point, Oracle 10g has its own JDBC driver. Drivers for Oracle 9 won't work with 10g.
Update (Tue Jul 26 08:48:23 PDT 2005): how to start isqlplus.
Comments
I can bring up ORCL via the .sh scripts but that's about it at the moment.
Isn't the database intrinsicly tied to the hostname upon creation time? ie. I used 10.0.0.3 as my /etc/host address but I'm thinking I should just use localhost instead but I think that means installing running dbca again.
Cheers.
Question: where do I need to setup the dbstart and dbstop scripts? How can I automate this process? Do I need to set them up in root under /var/opt/oracle in oratab file? Thanks.
After so many years being a DBA and a MacUser to have both worlds together is a dream come true.
Thanks a million
Oracle should be totally ashamed for their negligence of OS X.
satejano@earthlink.net
...
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
...
Adding to inittab
Checking the status of Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
Giving up: Oracle CSS stack appears NOT to be running.
./root.sh: line 788: /System/Library/StartupItems/OracleCRS: is a directory
Oracle CSS service would not start as installed
Automatic Storage Management(ASM) cannot be used until Oracle CSS service is started
What will be the impact of this - at first glance, the DB's up and running ?
Has anybody patched this script yet for Tiger 10.4.4 server ?
Thx,
peter 'at' goedtkindt 'dot' name
macdba "at" quentin "dot" org "dot" uk
Frustrating or what.
So in oracle/product/10.1.0/db_1 you will have a folder either called [a ip address]_[oracle database sid] or [dns name of m/c]_[oracle database sid], I can not remember how I found out what it called the m/c, I think I just guessed, but I put a sym link to the current folder with the name I found that it was looking for.
Could you be more specifics please? Where did you put your link, and what did it point to?
I've followed all instructions but can't get the installer to run.
Before you start emctl, you first have to startup your instance.
Make sure you have the em db(web)console stopped, after that use:
sqlplus
-login as sys/ as sysoper
-type your pwd
startup
:)
after that you can startup em.
>>>>>>>>>>>>>>>>
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/OraInstall2006-08-14_11-53-23PM. Please wait ...Oracle Universal Installer, Version 10.1.0.3.0 Production
Copyright (C) 1999, 2004, Oracle. All rights reserved.
Can't connect to window server - not enough permissions.
172.16.1.37:0.0
172.16.1.37:0.0
Unable to start an interactive install session because of the following error:Can't connect to window server - not enough permissions. The DISPLAY environment variable should be set to {hostname or IP address}:{screen}, where the {screen} is usually '0.0'.
Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
- For csh: % setenv DISPLAY 192.168.1.128:0.0
- For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
Use the following command to see what shell is being used:
echo $SHELL
Use the following command to view the current DISPLAY environment variable setting:
echo $DISPLAY
- Make sure that client users are authorized to connect to the X Server.
To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
% xhost +
To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':
% {full path to xclock... see below}
If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
Typical path for 'xclock': ''
>>>>>>>>>>>>
X is running and I can get xclock, xeyes, etc. to run. I have seen something regarding AWT headless requirements but I do not see the Java call in any script to alter the JVM parameters.
Any help is greatly appreciated.
Bill
It is a bit of a cheat, however.
I installed parallels and a windows application within it. I gave the windows pc in parallels a fixed IT address.
I then installed oracle on the windows pc in parallels.
I can then access oracle from OSX Using JDBC and tools such as jdeveloper and aqua data studio.
I can also run applications in OSX that access oracle over JDBC connections.
Still no sign of native ORACLE on MAc OSX INTEL 'though. Shame !
have a look on the product matrix, and it clearly shows that after 10.1 NOTHING is planned.
that's oracles "code" for dropped
DO NOT abort step 4
Step 4: Run '$ORACLE_HOME/root.sh'. This script will appear hang at end and displaying a message "Expecting the CRS daemons to be up within 600 seconds." The CRS is only available on OSX Server so simply Ctrl-C terminate the process.
let it run, as the script sets the execute flags on some oracle files, (the agents) AFTER the 600second bullshit has timed out
Anyone have an idea?
r,
Gus
gspier@chiliad.com
Our only real hope for installing Oracle natively on OSX is to go with a Linux version and ride the coattails of BSD Linux Compat, which I don't really know anything about (other than that it exists).
For now I'm going to install Linux under Parallels (which is only $80 and runs things at realtime speeds because it's Intel-native code) and go with it. I think, when it comes to Oracle, we're in an icky position.
WARNING!!!
This has been mentioned above in a previous post, but I can't stress enough how important this is:
DO NOT ABORT STEP 4!!!
root.sh still has some things to do after the 600 seconds passes. If it doesn't do them, you _will_ encounter problems down the road!
I REPEAT: DO NOT ABORT STEP 4!!
WARNING!!
BEWARE!!