How to connect Oracle 11G database using SQL developer from another computer in a LAN connection

时光总嘲笑我的痴心妄想 提交于 2019-12-14 00:42:13

问题


I am very new in database and learning Oracle 11G. So, I do not have deep knowledge on it.

I have several computers in my lab connected via LAN. Oracle 11G is installed in computer-A(192.18.100.115). Now I want to use the database from other computers in my Lab via SQL Developer that is installed into all Computers.

Would you please explain

  1. What I need to do in Computer-A for granting access from other Computers?
  2. What I need to do in other computers for getting access from computer-A?

I will be grateful if any one gives me a proper solution.


回答1:


  1. What I need to do in Computer-A for granting access from other Computers?

You need to make sure the LISTENER is up and running to accept remote connection requests. Listener.ora is a SQL*Net configuration file used to configure Oracle Database Listeners. You will usually find that in ORACLE_HOME\NETWORK\ADMIN directory.

For example,

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
      )
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0)
      (SID_NAME = ORCL)
    )
  )

As you mentioned your host 192.18.100.115, you need to put it in the hostname.

  1. What I need to do in other computers for getting access from computer-A?

You just need to install Oracle database client. If you only want to connect to the remote DB server, you could install only Instant client.

If you are using SQL Developer, then you could use:

  • Basic connection type

Or,

  • TNS connection type

In basic connection type, you need to provide all the connection details in the connection properties itself. For using TNS connection type, you need to configure the tnsnames.ora file present in ORACLE_HOME\NETWORK\ADMIN directory.



来源:https://stackoverflow.com/questions/30182827/how-to-connect-oracle-11g-database-using-sql-developer-from-another-computer-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!