Solved

Couldn't start Oracle Listener  - Mac OSX

Posted on 2010-11-25
12
1,155 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Via a live example, show how to take different types of Oracle backups using RMAN.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

911 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

23 Experts available now in Live!

Get 1:1 Help Now