Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Need step by step to Tunnel to an Oracle DB using Putty

Posted on 2008-10-04
2
1,512 Views
Last Modified: 2013-12-19
Hi to all.
I appreciate that you can provide me detailed instructions to perform the following:
From home, I use the SafeNet Secure VPN Client to access my work.
Once connected, I have to ssh to a box (let's call it 192.168.2.29), and once connected to that box, I have to ssh to another box that has the DB Server (192.168.1.28).
There is any way to use my LOCAL sqlplus on my PC to access directly to the DB Server using Putty Tunnel option?
So basically I'd like to access the DB Server directly from my PC (if possible).

Any help is appreciated
0
Comment
Question by:Diepafu
2 Comments
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 22641961
here is the link which gives you the step by step...

http://www.macan.com/Putty/Tunneling_with_PuTTy.html

you just need to enter you remote host (DB server IP and oracle port 1521) and your local port example 51521 or any you like...

after that you need to edit you oracle tnsnames file and instead of ip adres of your database put localhost and the port you chose for your local port..

after that after putty connects to the DB server you can use you loacl sqlplus...

if you need additional explanation let me know...
0
 

Accepted Solution

by:
Diepafu earned 0 total points
ID: 22703032
This are the steps that I performed:
- Open PuTTY and load your saved session.
- Choose Tunnels in the category section. Then in the "source port" section, put any port number that is not in use (example: 1234).
- In the destination text box enter the IP address of the host name (192.168.1.28 in my case) followed by a colon and the destination port number(1521).  Remember to click on the ADD button.
- Save your settings in PUTTY.
- Then modify your tnsnames.ora with something like this:
CCOM_PROD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1234))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = CCOM)
    )
  )

- Then ssh to the 1st server
- Finally type the following to connect and create the tunnel to the second server:
ssh -L 1234:192.168.1.28:1521 oracle@192.168.1.28
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and theā€¦
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question