Solved

Couldn't start Oracle Listener  - Mac OSX

Posted on 2010-11-25
12
1,135 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:RishiBang
  • 6
  • 4
  • 2
12 Comments
 
LVL 11

Accepted Solution

by:
Akenathon earned 250 total points
ID: 34213171
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
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34214598
Try

. oraenv

and enter Oracle10gDB when prompted

Then retry lsnrctl start
0
 

Author Comment

by:RishiBang
ID: 34214852
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
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34214866
What is the content of your /etc/oratab file?
0
 
LVL 11

Assisted Solution

by:Akenathon
Akenathon earned 250 total points
ID: 34215259
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
 

Author Comment

by:RishiBang
ID: 34222309
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 17

Expert Comment

by:sweetfa2
ID: 34223271
Can you provide the output of the following command before and after you run ". oraenv"

env | grep -i oracle

Open in new window

0
 
LVL 17

Assisted Solution

by:sweetfa2
sweetfa2 earned 250 total points
ID: 34223278
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
 

Author Comment

by:RishiBang
ID: 34223723
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
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34223747
What is on line 103 of oraenv?

Better still, post your whole oraenv
0
 
LVL 17

Assisted Solution

by:sweetfa2
sweetfa2 earned 250 total points
ID: 34223759
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
 

Author Comment

by:RishiBang
ID: 34225237
Hi sweetfa2,

I have attached the oraenv.

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

Thanks,
Rishi oraenv
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now