viernes, 6 de julio de 2007

Connection to database Oracle 10G

Product : Oracle 10G.
Part Involved : Log in
Summary : Can not log in to database.
Scenario : Your connection to database is refused, the problem become from LAN issues ?
Company : National Institute of Cancer sickness of Peru (INEN).
Reference Date : June 2006.

This subject involved to know additional knowledge from Oracle plattform in order to discard suppose Oracle problems and focused on LAN issues.

1.- The client computer has a file called tnsnames.ora saving the profile of the strings of connections of every database available into networking infrastructure configured.

2.- Next lines belongs to a sample of tnsnames.ora file
#tnsnames.ora Network Configuration File:
D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

ORCL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=707-03)(PORT=1521)
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME= sw1)
)
)

BD=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.16.100)(PORT=1521)
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME= sw1)
)
)


EXTPROC_CONNECTION_DATA=
(DESCRIPTION=
(ADDRESS_LIST=

(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))
)
(CONNECT_DATA=
(SID=PLSExtProc)
(PRESENTATION= RO)
)
)


3.- SERVICE_NAME is the name of the Oracle instance while ORCL and BD are the strings of connections to database, then from DOS windows execute next command directed to the strings of connection :
C:\> tnsping bd
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-JUL-2007 17:51:29
Copyright (c) 1997,2005, Oracle. All rights reserved.
Archivos de parametros utilizados:
D:\Oracle\product\10.2.0\db_1\network\admin\sqlnet.ora

Adaptador TNSNAMES utilizado para resolver el alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.16.100)(PORT = 1521)(CONNECT_DATA = (SERVER=DEDICATED) (SERVICE_NAME = sw1)))
Realizado correctamente (10 mseg)

C:\>
This is a example that connection from your computer and database is working.

4.- Now try with next command :
C:\> ping 192.168.16.100

5.- If you have answer from ping command and not from tnsping command then the Oracle listener is down. Later I will take this issue.

No hay comentarios: