How to Remote Access Oracle DB

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!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值