Howto enable remote login for a Oracle db user?
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.
Related videos on Youtube
Comments
-
Quandary over 1 year
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.*.*
-
Keith Stokes over 12 yearsAs 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?