0

Stupid question:

I've successfully installed Oracle 11g on my Linux box.

I can connect to it and retrieve the countries table via C#/mono just fine, with the below connectionstring, which uses the HR account 'as is', after default installation (+new password +unlocked).

 string strConnectionString =
  "User Id=HR;Password=myPassword;Data Source=(DESCRIPTION=" +
  "(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))" +
  "(CONNECT_DATA=(SID=orcl)));";

When I connect from the same computer using the machine-name or the IP i got from the router (instead of localhost), then it doesn't work. The Firewall is OFF.

 string strConnectionString =
  "User Id=HR;Password=myPassword;Data Source=(DESCRIPTION=" +
  "(ADDRESS=(PROTOCOL=TCP)(HOST=machine-name-or-IP)(PORT=1521))" +
  "(CONNECT_DATA=(SID=orcl)));";

I assume I must allow remote connections and grant login from any computer to the HR account.

But how and where ?

And maybe configure the database to listen on the proper IP.

How can I do that ? And where ?

I've google'd it, but so far I didn't find anything useful...

Note that by 'remote connections', I mean 192.168.*.*

2 Answers 2

3

Is the listener listening on the external ip? You can check with netstat -an if the listener is listening on port 1521 of 127.0.0.1 only or if it listens also on 192.168....

Remote login is on by default afaik. If you create a new user the user need the roles resource and connect to be able to connect to the DB and to create tables and other stuff.

1
  • 1
    As the oracle user, run lsnrctl status. That will tell you if the listener is configured to listen on 192.168.x.y. Have you looked at the listener log file for information? Jan 5, 2012 at 12:53
0

You shouldn't check the router. The question is what the local machine know about the ip or hat name can be resolved. A simple ping and nslookup should point you in the right direction. If that works, check with tnsping.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .