VirtualBox Configuration - Oracle Linux Server - Oracle 11g

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

Hello everyone,

I created a virtual machine with VirtualBox using the Oracle Linux Server 6.3 operating system and installed and configured Oracle 11G on MV.

I would like to access the database that is in the MV through Windows 7 (host operating system) by tnsnames.ora? But I can not, I'm just able to access the data bunch server through Putty.

Someone from the forum ever tried to do this?


Att,
User avatar
gpereira
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 61
Joined: Sat, 10 Dec 2011 10:56 am
Gustavo Antonio Pereira
OCA Oracle Database 10g Administrator Certified Associate

Hello friend,

accessing via Putty, I believe you are connecting on the Linux machine and accessing the local bank.

For remote access, via network, you need to first configure and verify that your Lister is working.

Lister, nothing else is that a GATWAY for Oracle instance of all non-local connections, that is, without it a remote connection is not possible.

Your configuration and "status" can be checked through Enterprive Manager, if you like to put your hand on the dough, via commands.

Your physical location is now located in: [ORACLE_HOME] /network/admin.

To check your Lister status, locally on the server: lsnrctl status

To check to start your Lister, locally on the server: lsnrctl start]

However, first step is the configuration of your Lister for remote access and warranty that it is configured and performing normal.

Case Lister is configured correctly and now wants to leave for the remote connection step, comes the question .. Are you trying to connect to Oracle for any specific software?

If SQLPlus, try first connection as follows (easy connection):

Select all

CONNECT [USER]/[PASS]@[HOSTNAME]:[PORTA_LISTNER]/[SERVICENAME]
In this way, it ensures that the connection is established No need for TNSNAMES configuration.

Working, can then start for TNSNAMES configuration, where you will only give a nickname for remote connection, making the connection string easy.


Hugs.
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

Speech Gustavo,

In case my listener is working correctly:

Select all

[oracle@user-pc1 ~]$ lsnrctl status 
 
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 09-OCT-2012 14:52:30 
 
Copyright (c) 1991, 2009, Oracle.  All rights reserved. 
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=user-pc1.oracle)(PORT=1521))) 
STATUS of the LISTENER 
------------------------ 
Alias                     LISTENER 
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production 
Start Date                09-OCT-2012 14:50:25 
Uptime                    0 days 0 hr. 2 min. 5 sec 
Trace Level               off 
Security                  ON: Local OS Authentication 
SNMP                      OFF 
Listener Parameter File   /home/oracle/product/11.2.0/db_1/network/admin/listener.ora 
Listener Log File         /home/oracle/diag/tnslsnr/user-pc1/listener/alert/log.xml 
Listening Endpoints Summary... 
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=user-pc1.oracle)(PORT=1521))) 
Services Summary... 
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... 
The command completed successfully
from the local machine, when I I give a ping, it also works correctly:

Select all

C:\Users\user>ping 172.16.1.147 
 
Disparando 172.16.1.147 com 32 bytes de dados: 
Resposta de 172.16.1.147: bytes=32 tempo=1ms TTL=64 
Resposta de 172.16.1.147: bytes=32 tempo<1ms TTL=64 
Resposta de 172.16.1.147: bytes=32 tempo=1ms TTL=64 
Resposta de 172.16.1.147: bytes=32 tempo<1ms TTL=64 
 
Estatísticas do Ping para 172.16.1.147: 
    Pacotes: Enviados = 4, Recebidos = 4, Perdidos = 0 (0% de 
             perda), 
Aproximar um número redondo de vezes em milissegundos: 
    Mínimo = 0ms, Máximo = 1ms, Média = 0ms
only when testo the bench alias it gives the fault below:

Select all

C:\Users\user>tnsping vbox 
 
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 09-OUT-2012 15:01:02 
 
Copyright (c) 1997, 2010, Oracle.  All rights reserved. 
 
Arquivos de parÔmetros usados: 
C:\app\user\product\11.2.0\client_1\network\admin\sqlnet.ora 
 
 
Usado o adaptador TNSNAMES para resolver o apelido 
Tentativa de contatar (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.147)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))) 
TNS-12535: TNS:operaþÒo sofreu timeout 
User avatar
gpereira
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 61
Joined: Sat, 10 Dec 2011 10:56 am
Gustavo Antonio Pereira
OCA Oracle Database 10g Administrator Certified Associate

Can you connect to the "easy" form database?

Select all

CONNECT [USER]/[PASS]@[HOSTNAME]:[PORTA_LISTNER]/[SERVICENAME]
Remember that TSName is not essential for a remote connection, it is only a facilitator that creates a nickname for your connection string.

It would be legal that checked if the door configured on the server lister is released into the server firewall and your station.
User avatar
gpereira
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 61
Joined: Sat, 10 Dec 2011 10:56 am
Gustavo Antonio Pereira
OCA Oracle Database 10g Administrator Certified Associate

GPeira wrote: Can you connect to the "easy" form database?

Select all

CONNECT [USER]/[PASS]@[HOSTNAME]:[PORTA_LISTNER]/[SERVICENAME]
Remember that TSName is not essential for a remote connection, it is only a facilitator that creates a nickname for your connection string.

It would be legal that checked if the door configured on the server lister is released in the server firewall and its station.
]] Complementing ...

Not that you should not configure TsName, quite the contrary, but the problem may be before that ..
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

In the first attempt, it gives a connection timeout, and the second and third attempt gives an error in the protocol adapter. The Listener port is 1521 on this VirtualBox server, even TNSNAMES file. There are other 1521 ports configured, but on other servers that are operating normally.

Select all

C:\Users\user>sqlplus hr/hr@172.16.1.147:1521/orcl 
 
SQL*Plus: Release 11.2.0.1.0 Production on Ter Out 9 15:31:40 2012 
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved. 
 
ERROR: 
ORA-12170: TNS:Ocorreu timeout da conexão 
 
 
Informe o nome do usuário: hr 
Informe a senha: 
ERROR: 
ORA-12560: TNS:erro de adaptador de protocolo 
 
 
Informe o nome do usuário: hr 
Informe a senha: 
ERROR: 
ORA-12560: TNS:erro de adaptador de protocolo 
 
 
SP2-0157: Conexão ao ORACLE impossível após 3 tentativas, saindo SQL*Plus
How do I check if the door is released into the firewal?

Att,
User avatar
gpereira
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 61
Joined: Sat, 10 Dec 2011 10:56 am
Gustavo Antonio Pereira
OCA Oracle Database 10g Administrator Certified Associate

To half rusty in only .. rs

Disable and see if the problem and even the firewall ..

of a look at the link below ..
http://docs.oracle.com/cd/E20815_01/htm ... gisry.html
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

Now I managed to solve the problem.

Enter the server and gave the command: iptables -F (I'm not sure what it means) on the virtual machine.

and then gave a TNSPING VBOX that is the server alias.

and worked:

Select all

C:\Users\user>tnsping vbox 
 
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 09-OUT-2012 16:11:53 
 
Copyright (c) 1997, 2010, Oracle.  All rights reserved. 
 
Arquivos de parÔmetros usados: 
C:\app\user\product\11.2.0\client_1\network\admin\sqlnet.ora 
 
 
Usado o adaptador TNSNAMES para resolver o apelido 
Tentativa de contatar (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.147)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))) 
OK (0 ms) 
Valeu Gustavo !!!

Att,
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest