Home » RDBMS Server » Networking and Gateways » Problem in Hostnaming method (oracle DB 10g in REd hat LInux and client in Windows XP)
Problem in Hostnaming method [message #560611] Mon, 16 July 2012 01:06 Go to next message
morad_dba
Messages: 72
Registered: June 2008
Member
Daar all,

I am trying to connnect to oracle database using Hostnaming Method. For that I edited
sqlnet.ora files as

[oracle@DBTEST admin]$ cat sqlnet.ora
# sqlnet.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (HOSTNAME, TNSNAMES, EZCONNECT)

and my host file is as

[root@DBTEST ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.

127.0.0.1 localhost

192.168.202.216 DBTEST
[root@DBTEST ~]#

and listener.log file is as

[oracle@DBTEST admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DBTEST)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = ORCL)
)
)

LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DBTEST)(PORT = 1521))
)

[oracle@DBTEST admin]$

Listenter is running as

[oracle@DBTEST admin]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 16-JUL-2012 13:12:55

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBTEST)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 11-JUL-2012 19:17:48
Uptime 4 days 17 hr. 55 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DBTEST)(PORT=1521)))
Services Summary...
Service "DBTEST" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully


When i try to connect to database using honstnaming method as

sqlplus hr/hr@dbtest

It returns the following errors

[oracle@DBTEST admin]$ sqlplus hr/hr@dbtest

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 16 13:13:57 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory


I checked and ensured that Database is running

SQL> select name from v$database;

NAME
---------
ORCL

please help me what to do and In which step i made wrong.

Reagrds,
Morad.

[Updated on: Mon, 16 July 2012 01:17]

Report message to a moderator

Re: Problem in Hostnaming method [message #560614 is a reply to message #560611] Mon, 16 July 2012 01:14 Go to previous messageGo to next message
Michel Cadot
Messages: 59203
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Start the instance/database.

Regards
Michel
Re: Problem in Hostnaming method [message #560615 is a reply to message #560614] Mon, 16 July 2012 01:23 Go to previous messageGo to next message
morad_dba
Messages: 72
Registered: June 2008
Member

Dear michel,

I shutdown and startup database and listener and try to connect to db it returns the same errors

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> host
[oracle@DBTEST ~]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 16-JUL-2012 13:49:32

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBTEST)(PORT=1521)))
The command completed successfully
[oracle@DBTEST ~]$ exit
exit

SQL> startup
ORACLE instance started.

Total System Global Area 171966464 bytes
Fixed Size 2019320 bytes
Variable Size 113246216 bytes
Database Buffers 50331648 bytes
Redo Buffers 6369280 bytes
Database mounted.
Database opened.
SQL> hsot
SP2-0042: unknown command "hsot" - rest of line ignored.
SQL> host
[oracle@DBTEST ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 16-JUL-2012 13:49:56

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/liste
ner.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener
.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DBTEST)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBTEST)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 16-JUL-2012 13:49:56
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/list
ener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listen
er.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DBTEST)(PORT=1521)))
Services Summary...
Service "DBTEST" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@DBTEST ~]$ sqlplus hr/hr@dbtest

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 16 13:50:10 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory


### I can connect if i use localnaming method #####
Regards,

Morad.

Re: Problem in Hostnaming method [message #560616 is a reply to message #560615] Mon, 16 July 2012 01:34 Go to previous messageGo to next message
Michel Cadot
Messages: 59203
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Exit SQL*Plus, do not stack the sqlplus process.

Regards
Michel
Re: Problem in Hostnaming method [message #560618 is a reply to message #560616] Mon, 16 July 2012 01:39 Go to previous messageGo to next message
morad_dba
Messages: 72
Registered: June 2008
Member
Dear Michel,

I did as you said I returns the same errors

SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@DBTEST ~]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 16-JUL-2012 14:05:48

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBTEST)(PORT=1521)))
The command completed successfully
[oracle@DBTEST ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 16 14:05:58 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 171966464 bytes
Fixed Size 2019320 bytes
Variable Size 113246216 bytes
Database Buffers 50331648 bytes
Redo Buffers 6369280 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

[oracle@DBTEST ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 16-JUL-2012 14:06:33

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DBTEST)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBTEST)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 16-JUL-2012 14:06:33
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DBTEST)(PORT=1521)))
Services Summary...
Service "DBTEST" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@DBTEST ~]$ sqlplus hr/hr@dbtest

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 16 14:06:36 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory


Can you try this..

Regards,
Morad.
Re: Problem in Hostnaming method [message #560629 is a reply to message #560618] Mon, 16 July 2012 02:31 Go to previous messageGo to next message
Michel Cadot
Messages: 59203
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
To check, remove all naming but "hostname" from sqlnet.ora and retry.
Post result of "env | sort".

Regards
Michel
Re: Problem in Hostnaming method [message #560652 is a reply to message #560629] Mon, 16 July 2012 03:45 Go to previous messageGo to next message
morad_dba
Messages: 72
Registered: June 2008
Member

I changed the sqlnet.ora file as you said :

[oracle@DBTEST admin]$ cat sqlnet.ora
# sqlnet.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (HOSTNAME)

Then I stoped database and listener and againg started db and listener ...

Still when i try to connect, it returns the same error:

[oracle@DBTEST admin]$ sqlplus hr/hr@dbtest

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 16 15:25:53 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory


Can you try it at your local machine.. pls

Regards,

Morad.
Re: Problem in Hostnaming method [message #560653 is a reply to message #560629] Mon, 16 July 2012 03:48 Go to previous messageGo to next message
morad_dba
Messages: 72
Registered: June 2008
Member
Dear Michel,

The output of env |sort as :

[oracle@DBTEST admin]$ env | sort
_=/bin/env
CLASSPATH=/u01/app/oracle/product/10.2.0/db_1/JRE:/u01/app/oracle/product/10.2.0/db_1/jlib:/u01/app/oracle/product/10.2.0/db_1/rdbms/ jlib
CVS_RSH=ssh
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=DBTEST
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32: *.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*. zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/oracle
OLDPWD=/home/oracle
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_SID=orcl
ORACLE_TERM=xterm
PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin
PWD=/u01/app/oracle/product/10.2.0/db_1/network/admin
SHELL=/bin/bash
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT=192.168.202.148 4375 22
SSH_CONNECTION=192.168.202.148 4375 192.168.202.216 22
SSH_TTY=/dev/pts/2
TERM=xterm
TMPDIR=/tmp
TMP=/tmp
USER=oracle
[oracle@DBTEST admin]$

Regards,
Morad.
Re: Problem in Hostnaming method [message #560657 is a reply to message #560653] Mon, 16 July 2012 04:06 Go to previous messageGo to next message
Michel Cadot
Messages: 59203
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Sorry, I don't see where is the problem, maybe a fresh eye will do.

Regards
Michel
Re: Problem in Hostnaming method [message #560770 is a reply to message #560657] Tue, 17 July 2012 00:31 Go to previous messageGo to next message
morad_dba
Messages: 72
Registered: June 2008
Member
Dear Michel,

Thanks for you cordial response. I think the problem has been solved. In hostnaming method,

The connection string will be as

[oracle@DBTEST admin]$ sqlplus hr/hr@dbtest/orcl

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 17 12:57:07 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>


Regards,
Morad.


Re: Problem in Hostnaming method [message #560777 is a reply to message #560770] Tue, 17 July 2012 01:14 Go to previous message
Michel Cadot
Messages: 59203
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks to let us know, it is appreciated.

Regards
Michel

[Updated on: Tue, 17 July 2012 01:15]

Report message to a moderator

Previous Topic: connecting two ORACLE Servers
Next Topic: Connecting two oracle database in different server
Goto Forum:
  


Current Time: Tue Sep 23 21:28:59 CDT 2014

Total time taken to generate the page: 0.09189 seconds