|
-
Thanks Sam. I thought I had set the SID in my environment but I was wrong. I did that and now I can connect and I get a SQL prompt. When I type that lsnrctl status or lsnrctl start, I get this:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
TNS-12541: TNS:no listener
TNS-12560: TNS: protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS: protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
This is what I have in my listener.ora file:
# LISTENER.ORA Network Configuration File: /u01/app/oracle/product/9.2.0.1.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/9.2.0.1.0)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = O9IDB.testingthisdb.com)
(ORACLE_HOME = /u01/app/oracle/product/9.2.0.1.0)
(SID_NAME = O9IDB)
)
)
And this is what my bash_profile is set to:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export JAVA_HOME=/usr/local/java
export BASH_ENV=$HOME/.bashrc
# !!! Set the following environment variable only for Red Hat 9 !!!
export LD_ASSUME_KERNEL=2.4.1
# Oracle Environment
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/9.2.0.1.0
export ORACLE_SID=O9IDB
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN;
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/network/lib
export LD_LIBRARY_PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/jdbc/lib/classes12.zip:$ORACLE_HOME/jdbc/lib/nls_charset12.zip
# Set shell search paths
export PATH=$PATH:$ORACLE_HOME/bin:/usr/local/jre1.3.1_08/bin:/usr/local/bin:$HOME/bin
unset USERNAME
I tried tnsping and get TNS-12545: Connect failed because target host or object does not exist. Do you have any idea what it might be. I read somewhere that sqlnet.ora should not be in the same directory as listener.ora and tnsnames.ora. I find it very hard to believe but is that true.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|