cancel
Showing results for 
Search instead for 
Did you mean: 

TNSNAME and LISTENER Configuration for ORACLE DATA GUARD

Former Member
0 Kudos

Dear All Expert,

i would like to ask my problem here, and hope it solved.

i'm planning to configure 2 SAP Instance for Oracle Data Guard, below are my paltform detail:

OS : windows Server 2003

DB : oracle 10G R2

SAP Solution Manager 7.0 EHP4 ( don't bother about this,its only for my testing)

I have 2 system with following detail:

Hostname I : solman

IP : 192.168.1.21

SID : SOM

Hostname II : solman2

IP : 192.168.1.22

SID : SOM

below file listener.ora and tnsnames.ora for solman host

################

  1. Filename......: listener.ora

  2. Created.......: created by SAP AG, R/3 Rel. >= 6.10

  3. Name..........:

  4. Date..........:

  5. @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $

################

ADMIN_RESTRICTIONS_LISTENER = on

LISTENER =

(ADDRESS_LIST =

(ADDRESS =

(PROTOCOL = IPC)

(KEY = SOM.WORLD)

)

(ADDRESS=

(PROTOCOL = IPC)

(KEY = SOM)

)

(ADDRESS =

(COMMUNITY = SAP.WORLD)

(PROTOCOL = TCP)

(HOST = 192.168.1.21)

(PORT = 1527)

)

)

STARTUP_WAIT_TIME_LISTENER = 0

CONNECT_TIMEOUT_LISTENER = 10

TRACE_LEVEL_LISTENER = OFF

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = SOM)

(GLOBAL_DBNAME=SOM_PRD.world)

(ORACLE_HOME = F:\oracle\SOM\102)

)

)

################

  1. Filename......: tnsnames.ora

  2. Created.......: created by SAP AG, R/3 Rel. >= 6.10

  3. Name..........:

  4. Date..........:

  5. @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $

################

SOM.WORLD=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS =

(COMMUNITY = SAP.WORLD)

(PROTOCOL = TCP)

(HOST = solman2)

(PORT = 1527)

)

)

(CONNECT_DATA =

(SID = SOM)

(GLOBAL_NAME = SOM.WORLD)

)

)

SOM_PRD.WORLD=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS =

(COMMUNITY = SAP.WORLD)

(PROTOCOL = TCP)

(HOST = solman)

(PORT = 1527)

)

)

(CONNECT_DATA =

(SID = SOM)

(GLOBAL_NAME = SOM_PRD.WORLD)

)

)

Below file listener.ora and tnsnames.ora for host solman2

################

  1. Filename......: listener.ora

  2. Created.......: created by SAP AG, R/3 Rel. >= 6.10

  3. Name..........:

  4. Date..........:

  5. @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $

################

ADMIN_RESTRICTIONS_LISTENER = on

LISTENER =

(ADDRESS_LIST =

(ADDRESS =

(PROTOCOL = IPC)

(KEY = SOM.WORLD)

)

(ADDRESS=

(PROTOCOL = IPC)

(KEY = SOM)

)

(ADDRESS =

(COMMUNITY = SAP.WORLD)

(PROTOCOL = TCP)

(HOST = 192.168.1.21)

(PORT = 1527)

)

)

STARTUP_WAIT_TIME_LISTENER = 0

CONNECT_TIMEOUT_LISTENER = 10

TRACE_LEVEL_LISTENER = OFF

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = SOM)

(GLOBAL_DBNAME=SOM_PRD.world)

(ORACLE_HOME = F:\oracle\SOM\102)

)

)

################

  1. Filename......: listener.ora

  2. Created.......: created by SAP AG, R/3 Rel. >= 6.10

  3. Name..........:

  4. Date..........:

  5. @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $

################

ADMIN_RESTRICTIONS_LISTENER = on

LISTENER =

(ADDRESS_LIST =

(ADDRESS =

(PROTOCOL = IPC)

(KEY = SOM.WORLD)

)

(ADDRESS=

(PROTOCOL = IPC)

(KEY = SOM)

)

(ADDRESS =

(COMMUNITY = SAP.WORLD)

(PROTOCOL = TCP)

(HOST = solman2)

(PORT = 1527)

)

)

STARTUP_WAIT_TIME_LISTENER = 0

CONNECT_TIMEOUT_LISTENER = 10

TRACE_LEVEL_LISTENER = OFF

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = SOM)

(ORACLE_HOME = F:\oracle\SOM\102)

)

)

Im able to ping IP 192.168.1.21 from 192.168.1.22 and vice versa. But when i'm trying to TNSPING SOM_DRC from SOLMAN and TNSPING SOM_PRD from solman2 , it cannot resolve the GLOBAL_DBNAME from solman and solman2 host. How do i resolve this issue ?

Please Help.

TNS Ping Utility for 64-bit Windows: Version 10.2.0.1.0 - Production on 18-SEP-2

011 17:04:31

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

Used parameter files:

F:\usr\sap\SOM\SYS\profile\oracle\sqlnet.ora

TNS-03505: Failed to resolve name

Edited by: rio_basis on Sep 19, 2011 1:46 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

But when i'm trying to TNSPING SOM_DRC from SOLMAN and TNSPING SOM_PRD from solman2 , it cannot resolve the GLOBAL_DBNAME from solman and solman2 host.

Assuming that you have changed "Global Database Name" in both the servers.

Just try adding/changing below parameters in DR server. (If I am not wrong, it is "solman2")

In listener.ora
(GLOBAL_DBNAME=SOM_DRS.world)

You haven't paste "tnsnames.ora" content from DR server (solman2).

I can not see "SOM_DRS.world" mentioned anywhere...

Regards.

Rajesh Narkhede

Former Member
0 Kudos

Hi Rajesh

You haven't paste "tnsnames.ora" content from DR server (solman2).

I can not see "SOM_DRS.world" mentioned anywhere...

I'm sorry, i was wrong paste listener.ora. here is below tnsnames.ora for solman2



################
# Filename......: tnsnames.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
################
SOM.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST = 
        (ADDRESS = 
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = solman2)
          (PORT = 1527)
        )
    )
    (CONNECT_DATA =
       (SID = SOM)
       (GLOBAL_NAME = SOM.WORLD)
    )
  )
SOM_PRD.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST = 
        (ADDRESS = 
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = solman)
          (PORT = 1527)
        )
    )
    (CONNECT_DATA =
       (SID = SOM)
       (GLOBAL_NAME = SOM_PRD.WORLD)
    )
  )

Former Member
0 Kudos

Hi,

Change the listener.ora of both servers as below.

Host: Solman

tnsnames.ora

################
# Filename......: tnsnames.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
################
SOM.WORLD=
(DESCRIPTION =
(ADDRESS_LIST = 
(ADDRESS = 
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = solman1)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = SOM)
(GLOBAL_NAME = SOM.WORLD)
)
)
SOM_DRS.WORLD=
(DESCRIPTION =
(ADDRESS_LIST = 
(ADDRESS = 
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = solman2)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = SOM)
(GLOBAL_NAME = SOM_DRS.WORLD)
)
)

Host: Solman2

tnsnames.ora

################
# Filename......: tnsnames.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
################
SOM.WORLD=
(DESCRIPTION =
(ADDRESS_LIST = 
(ADDRESS = 
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = solman2)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = SOM)
(GLOBAL_NAME = SOM.WORLD)
)
)
SOM_PRD.WORLD=
(DESCRIPTION =
(ADDRESS_LIST = 
(ADDRESS = 
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = solman1)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = SOM)
(GLOBAL_NAME = SOM_PRD.WORLD)
)
)

Restart Listener service and then try TNSPING from both the servers.

For Details refer below link:

[http://www.oracle-base.com/articles/9i/DataGuard.php#SetupPrimaryDatabase|http://www.oracle-base.com/articles/9i/DataGuard.php#SetupPrimaryDatabase]

Regards.

Rajesh Narkhede

Former Member
0 Kudos

Hi Rajesh,

I already set both tnsnames.ora for both server as below

SOLMAN (192.168.1.21)


################
# Filename......: tnsnames.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
################
#SOM.WORLD=
SOM.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST = 
        (ADDRESS = 
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = solman)
          (PORT = 1527)
        )
    )
    (CONNECT_DATA =
       (SID = SOM)
       (GLOBAL_NAME = SOM.WORLD)
    )
  )

SOM_DRC=
  (DESCRIPTION =
    (ADDRESS_LIST = 
        (ADDRESS = 
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = 192.168.1.22)
          (PORT = 1527)
        )
    )
    (CONNECT_DATA =
       (SID = SOM)
       (GLOBAL_NAME = SOM_DRC.WORLD)
    )
  )

SOLMAN2 (192.168.1.22)


################
# Filename......: tnsnames.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
################
SOM.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST = 
        (ADDRESS = 
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = solman2)
          (PORT = 1527)
        )
    )
    (CONNECT_DATA =
       (SID = SOM)
       (GLOBAL_NAME = SOM.WORLD)
    )
  )

SOM_PRD=
  (DESCRIPTION =
    (ADDRESS_LIST = 
        (ADDRESS = 
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = 192.168.1.21)
          (PORT = 1527)
        )
    )
    (CONNECT_DATA =
       (SID = SOM)
       (GLOBAL_NAME = SOM_PRD.WORLD)
    )
  )

and im still unable to TNSPING solman2 from solman altough i reload the listener, the result when i'm trying tnsping as below:


C:\Documents and Settings\somadm>tnsping som_drc

TNS Ping Utility for 64-bit Windows: Version 10.2.0.1.0 - Production on 02-OCT-2
011 04:51:02

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

Used parameter files:
F:\usr\sap\SOM\SYS\profile\oracle\sqlnet.ora

TNS-03505: Failed to resolve name

C:\Documents and Settings\somadm>

i won't be able to set

LOG_ARCHIVE_DEST_STATE_2=enable

oracle parameter as this tnsping issue cannot be resolved.

Thanks in advance

Former Member
0 Kudos

Hi All,

i've found the answer,

i checked to TNS_ADMIN environtment variable, it pointed to F:\usr\sap\SOM\SYS\profile\oracle it never been works, until i configured this initialization parameters. previously i configure the initialization parameters on this path :F:\oracle\SOM\102\database

the problem is i configure wrong in used initializatino parameters.

Now i can TNSPING solman2 oracle instance and otherwise

Thanks for all contribute in this thread, very appreciate it.

Former Member
0 Kudos

What is the service name that you configured for Data guard?

Here I can see only one entry in listener.ora file.

Regards,

Nick Loy