How to Remote Access Oracle DB

来源:互联网 发布:oracle sql修改字段名 编辑:程序博客网 时间:2024/05/29 23:45

When you install Oracle DB, the default hostname is localhost. However, we cannot access this DB by other hosts. So how to config to help the remote visitors to access the ODB.

What we need to do is to change the hostname of ODB in Linux.

So first, we need to login our host and go to the path of Oracle DB home.

Under the path of DB, go to the network / admin, we can find listener.ora and tnsnames.ora these two files. The host info is stored in these files.

Go into these two files to change the value of hostname and value of service name.

After do --- vim listener.ora, we need to modify HOST value from localhost to your host address.

After do -- vim tnsnames.ora, the value of HOST and SERVICE_NAME.

After we exit from vim, we have to open the DB server listener.

Go to the bin folder under dbhome_1, do--  setenv ORACLE_HOME (dbhome_1 pwd)

                                                                         --   setenv ORACLE_SID orcl

Under bin folder, we can run sqlplus and lsnrctl to verify the DB listener is open.

When the status of listener is open, that means other host can access this host DB. Right now you can use sql developer to try it. GOOD LUCK!!

0 0
原创粉丝点击