Last week I needed to connect a database from remote using VPN. The VPN is connected to a secured network, so I couldn’t connect directly to the database. Since I am using Toad for Oracle which is based on oracle client – I needed a transparent solution for that connection. At the past I wrote a post about Using ssh X11 tunnel through a bastion host to connect to a database server , at that post I described how to forward SSH and X11. Now I will describe a way to connect to the database using SQL*Net (usually port 1521) on Windows. Download plink from https://www.putty.org , you can download putty package or just standalone plink. Run the following command line: plink -N -L localport:dbserver:dbport getwayuser@getwayserver Do this on both machines (REMOTE PC Windows machine and the server you have access to - Gateway) to chain the SSH tunnels. Example: Gateway server (assuming Linux): ssh -N -L1521:dbserver:1521 dbserveruser@dbserver Your PC: plink -N...
In Oracle Restart, there are two confusing commands for setting up restart behavior. 1. SRVCTL command. srvctl add/modify database -y {AUTOMATIC | MANUAL} Management policy for the database. If AUTOMATIC (the default), the database is automatically restored to its previous running condition (started or stopped) upon restart of the database host computer. If MANUAL, the database is never automatically restarted upon restart of the database host computer. A MANUAL setting does not prevent Oracle Restart from monitoring the database while it is running and restarting it if a failure occurs. https://docs.oracle.com/cd/E11882_01/server.112/e25494/restart.htm#BABHHAHI 2. CRSCTL command. crsctl modify resource ora.pdb.db -attr AUTO_START=restore -unsupported (The -unsupported syntax is needed for oracle 12c) AUTO_START Indicates whether Oracle Clusterware automatically starts a resource after a cluster server restart. Valid AUTO_START values are: - always: Restarts the resource...
Look at the current port configured for the scan_listener $ srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP: 1521 SCAN Listener LISTENER_SCAN2 exists. Port: TCP: 1521 SCAN Listener LISTENER_SCAN3 exists. Port: TCP: 1521 $ lsnrctl status LISTENER_SCAN1 LSNRCTL for Solaris: Version 11.2.0.4.0 - Production on 01-JAN-20** 21:26:16 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))) STATUS of the LISTENER ------------------------ Alias LISTENER_SCAN1 Version TNSLSNR for Solaris: Version 11.2.0.4.0 - Production Start Date 01-JAN-20** 16:08:18 Uptime 0 days 5 hr. 17 min. 58 sec Trace Level ...
Comments
Post a Comment