Couldn't start Oracle Listener - Mac OSX

Hi,

I have installed Oracle 10g (10.2.0) on Mac OSX.

After successful installation the wizard prompted to run the following two shell scripts as a root and I am able to start the listener and it worked.

1) /Users/oracle/OracleDB10g/orainstRoot.sh
2) /Users/oracle/product/10.2.0/OracleDB10g_Home\root.sh


But on next day I am unable to start the listener.  I have set the following environment variables in my .bash_profile for the user (oracle) and restarted OS but yet I couldn't start it.

export ORACLE_BASE=/Users/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/Oracle10gDB_Home
export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=Oracle10gDB
PATH=$PATH:/$ORACLE_HOME/bin

I am getting the following error while starting the listener even though I have the DYLD_LIBRARY_PATH set.

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


An early reply is very helpful.

Thanks in advance.

Regards,
Rishi
RishiBangAsked:
Who is Participating?
 
AkenathonConnect With a Mentor Commented:
A couple of ideas: Your PATH has two leading '/' characters, don't know if OSX dislikes them. Also, the script looks correct, but to make sure please use "echo $DYLD_LIBRARY_PATH" (and all the other environment variables), to doublecheck its contents are what they should be, right before invoking lsnrctl. Also, can you invoke other binaries e.g. sqlplus on the same $ORACLE_HOME?
0
 
sweetfa2Commented:
Try

. oraenv

and enter Oracle10gDB when prompted

Then retry lsnrctl start
0
 
RishiBangAuthor Commented:
Hi Akenathon& sweetfa2

Thanks for the quick response.

As you suggested, I have corrected my PATH to remove leading "/".

I have also executed  .oraenv but yet couldn't start the listener.

I have attached my command session so that you can pin point where I am missing out.

But one surprising thing I have found is that my ./bash_profile is not being picked up when I su to oracle user. I am not sure why?

Pls go thru the attached and suggest me.

Thanks,
Rishi MyBashsession.txt
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
sweetfa2Commented:
What is the content of your /etc/oratab file?
0
 
AkenathonConnect With a Mentor Commented:
You need to export ORACLE_OWNER=oracle before sudo root.sh. Quoted:

Running Oracle 10g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= madhukidambi
    ORACLE_HOME=  /Users/oracle/product/10.2.0/OracleDB10g_Home

It should read ORACLE_OWNER=oracle (or whatever OS user you've used to install the DBMS into).

Also, it's not ".oraenv", you need a space after the dot: ". oraenv". Finally, when oraenv asks for your ORACLE_SID, you should answer "Oracle10gDB", without the brackets. Try all these (especially running root.sh after setting ORACLE_OWNER) and see how it goes.
0
 
RishiBangAuthor Commented:
Hi Akenathon & sweetfa2

I have performed all the above steps you have suggested, except one thing.

I have changed the ORACLE_OWNER to oracle and in root.sh and then ran it.

I also have run . oraenv but no luck.

Is there any sequence for the above taks??

FYI I have attached my oratab file.

Thanks,
Rishi

 oratab
0
 
sweetfa2Commented:
Can you provide the output of the following command before and after you run ". oraenv"

env | grep -i oracle

Open in new window

0
 
sweetfa2Connect With a Mentor Commented:
Actually, cut and paste this into a terminal window.

env | grep -i oracle
. oraenv
env | grep -i oracle
ps -ef | grep pmon

Open in new window


and provide the output
0
 
RishiBangAuthor Commented:
Hi sweetfa2,

I have attached the output of the commands you have given.

But only one thing I did is I have changed ORAENV_ASK to NO in the oraenv file.

Thanks,
Rishi OracleEnvIssue
0
 
sweetfa2Commented:
What is on line 103 of oraenv?

Better still, post your whole oraenv
0
 
sweetfa2Connect With a Mentor Commented:
Your oraenv is not correct.  Your path to your dynamic lib that lsnrctl is looking for is bogus.

As a quick fix attempt try this in a terminal session:
sudo mkdir -p /b/227/network
sudo ln -s $DYLD_LIBRARY_PATH /b/227/network/lib
sudo chown -R oracle:dba /b
sudo chmod -R 770 /b

Open in new window

0
 
RishiBangAuthor Commented:
Hi sweetfa2,

I have attached the oraenv.

Meanwhile I will try the commands you have given and let you know.

Thanks,
Rishi oraenv
0
All Courses

From novice to tech pro — start learning today.