Unable to connect to Oracle 12c from client machine - oracle11g

I have spent 3 days now trying to figure out why I can't connect to my Oracle 12 database from a client machine. I have read lots of articles and Googling around but haven't been able to find a solution yet. I have tried everything possible and know of already. So I am hoping someone maybe able to point me in the right direction.
Here are some details:
Win7 x64 with Oracle 12c installed.
Windows Server 2012 R2 (client, yes this setup isn't ideal. will explain why later).
Windows Server 2012 R2 (domain controller)
All machines are VM's and part of a domain.
All VM's are running under ESXI 6.0
I can do the following without any issues:
Logon to oracle server.
ORCL is my oracle isntance (global database identifier).
6.1 run tnsping orcl
6.2 lsnrctl status (up and running)
6.3 stop and restart the listner service from the Windows Services snap-in.
6.4 sqlplus system/xyz#orcl
Connects w/o any problems.
6.5 Oracle SQL Developer can connect to ORCL
6.6 can ping client machine.
However I CAN NOT do the following:
Logon to client machine
7.1 copied tnsnames.ora from oracle server to this client machine and placed under [ORACLE_HOME]\network\admin where it should be. replaced "localhost" with the oracle sserver IP.
7.2 Using sqlplus system/xyz#orcl or Oracle SQL Developer to connect
I get TNS: no listener found.
7.3 can ping oracle server.
7.4 tnsping orcl (failed)
7.4 already disabled all firewalls (domain, private and public) on oracle server.
There shouldn't be any issues with firewalls or ports.
No matter what I do, I just can't connect from the client machine. Can someone tell me what I'm doing wrong? As a side note, I was not able to install Oracle 12c on Win2012R2. So I installed on a Win7x64. But eventually
all the VM's will run on Windows Server 2012R2. This setup is my home lab.
Thank you!

replaced "localhost" with the oracle sserver IP
It looks like the listener is only listening on localhost (127.0.0.1); you can confirm that with lsnrctl status, or with netstat -an | find "1521" (or your actual port number if you aren't using the default).
It isn't listening on the server's external IP address, so when you try to connect to post 1521 (or whatever you have configured) on that IP there is nothing there listening - which is why you get "no listener found".
You need to modify your listener.ora to either listen to both localhost and the server IP address, or to only listen to the external address. But the latter has side-effects - your existing connections and tnsnames.ora entries would need to change to refer to that address (or, even if it is static, a DNS name that resolves to that address), and your database may need to be modified so it knows the listener address to register against, via the LOCAL_LISTENER initialisation parameter. After changing the listener.ora you will need to bounce the listener, and you can then check netstat again.

Related

ORA-12541: TNS: no listener in SSIS

We have oracle oledb connections in SSIS packages that are working well on windows server 2008.
We moved them to windows server 2012 and installed the needed softwares. We installed oracle client (oraoledb driver), moved tnsnames.ora, ldap.ora and sqlnet.ora to %Oracle_Home%\Network\admin path, add %Oracle_Home% and %Oracle_Home%\bin to path variable.
But on server 2012 oracle connections are giving this error ORA-12541: TNS: no listener. Where as on server 2008 same oracle connections are working fine.
Looked so much across internet but found these solutions:
Check tnsnames.ora
Check listener is running
Check path variable contain oracle home, oracle_home\bin
I don't see a problem with tnsnames.ora because same file is present on both window servers. Correct path variables are also set. Listener is also running (since SSIS on server 2008 is connecting). And I am able to ping oracle db server from both machines.
Can anyone suggest anything that we may try.
To put a formal answer in here.
Basic troubleshooting steps with SSIS:
Use the database native tools to check connectivity
In this case for Oracle that is SQLPLUS.EXE
If you have an issue with native tools then it isn't an SSIS issue
Check that you can resolve the host by using PING <hostname>.
If that doesn't work try PING <ip address>
If ping works, check the port with TELNET <host> <port>
If that doesn't work, either the service is not listening or you need to get your network guys to open the port
This goes for any network service
i.e.
SQL Server (default port 1433)
a web server (default port 80 for unencrypted comms)

How can I connect to a SQL Server using SSMS 2016?

I'm a rookie so I'm not really acquainted with how this really works. I've downloaded SQL Server 2016 and once I log onto the Management Studio, it asks me to connect to a particular server.
I've no idea what server I should connect to. I've tried everything. Turned the firewall off, used cmd commands, (tells me that my access has been denied), registered a new server from within the studio (but nothing shows up in the Server Name drop-down) I'm really confused.
What server should I connect to?
Make sure that the server has TCP connections enabled (either following this guide https://msdn.microsoft.com/en-us/library/ms191294.aspx or by specifying /tcpenabled=1 flag to the installer).
Make sure you have remote access enabled (sp_configure N'remote access',N'1')
Make sure the firewall is configured to let you through or just disable it (only do so if the SQL Server is installed in a disposable VM): netsh advfirewall set allprofiles state off
I wrote a blog post on how to install SQL Server properly.

Connection string with odbc connector

I am getting error
ERROR [08S01] [MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'waiting for initial communication packet', system error: 10060.
While using connection string
"DRIVER={mysql odbc 5.1 Driver};SERVER=204.11.58.166;DATABASE=dbname;UID=uid;PASSWORD=uid;OPTION=3;"
So, please guide me how to solve it.
Thanks
Ravi
What MySQL version are you using ? ( To see the version you can use 'SELECT VERSION();' )
Is MySQL 64b or 32b ?
What is your OS ?
Try to update to ODBC 5.2, see on dev.mysql.com -> download -> conectors
Roberto Novakosky
Well I already have this in 3 situations
1) I was using old version of connection on Delphi, and with MySQL installed on Linux. I did update of my components and the connection was OK. (similar message)
2) In a remote application I used 'localhost' inside string connection, when must be the IP of server, on server works OK, but when I use from remote host this problem occurs. resolved with the real IP. (similar message)
3) In my LAN, the port 3306 was redirected to other machine, so when I tried to connect an outside server, the response connection was wrong. the message was exactly as yours. As, we can't to change the port of MySQL of outside server (that was 3306), I changed the port of my local MySQL server to 3307 and removed from my router the redirect over 3306. It was with conflict, see: I need to use 3306 from outside and it need to respond to my machine, the router hindered the connection ...
Good luck
Please refer this thread
and this site for detailed explanation

Configuring DNS entry on unix for SQL Azure with DataDirect6.1

Could you please advise me, how to configure a DSN entry for SQL Azure on UNix AIX box with DataDirect 6.1 to connect from PowerCenter 9.1.0.
Aix Server: 10.10.10.10 : 2222
On this Port, ABCXYZ9PQR(Database Server name) Database is configured.
Database name: TestDatabase
Telent is working from application server. Telnet 10.10.10.10 2222 --> Connected
Able to connect to the SQL server from Windows.
Please advise me what are the tests do I need to perform, and configure the DSN entry in ODBC.ini.
Thanks,
Sarat
Below steps are necessary for configuring odbc:
Ensure that the env variables ODBCHOME & ODBCINI are set. These has to be set before Informatica Services are started. Else they wont get picked up.
configure DNS in obdc.ini file for the DB server.
Use ssgbodbc utility (download from mysupport site) to test if the odbc connection goes through
Copy the DNS name from the entry in odbc.ini variable and paste it in the Connection String section of the ODBC connection in Workflow Manager.
I'm not clear from your description though:
Can you clarify if the Informatica Services is installed on AIX box (10.10.10.10)? how did you configure the connection to azure on windows box?
-Sadagopan

Windows Server 2008 R2/IIS 7 refuses all outside tcp connections

I am unable to connect, for example, via http to a brand new installation of 64-bit Windows Server 2008. The server is on a domain, but is not DC (that's another problem altogether).
The IIS7 is running on the server and the website is accessible locally via http://localhost, but when I try to connect from another machine on the same network, the connections is refused, even though Windows Firewall is disabled.
I am able to connect to and browse the shared folders on the server using Windows Explorer, so it is not a physical connection issue. I can ping other machines on the network from the server, but trying to ping the server from another machine results in "Destination host unreachable".
As far as I can tell, the server refuses any TCP connections from any machine. I am thinking, there must be some other configuration setting that I am missing... Please, help.
NS
Like in Windows 7 the behaviour is determined by the network type (home, work, internet) the OS thinks it is connected to... even with a disabled firewall it respects these settings and accordingly refuses/allows connections...
The solution is embarrassignly simple, and the credit goes to Ashley Steel, on ServerFault.com for asking just the right questions. It turns out that the DNS was resolving the name of the server incorrectly, because the machine was named the same as an old, since decommissioned workstation that used to live on the same subnet.
The solution: rename the server.
NS[Now hiding under a rock]

Resources