Solved

Couldn't start Oracle Listener  - Mac OSX

Posted on 2010-11-25
12
1,306 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
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
 
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

617 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