- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
15#
发表于 2012-4-15 15:06:29
建议你 先理清 oracle remote connection的一些概念 再来处理这类问题 , 下面是一个示例
[oracle@vrh8 admin]$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:C6:20:01
inet addr:192.168.1.191 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:67104 errors:0 dropped:0 overruns:0 frame:0
TX packets:17732 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10003103 (9.5 MiB) TX bytes:3426442 (3.2 MiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:AD:91:F4
inet addr:172.168.1.68 Bcast:172.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:384250 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23132067 (22.0 MiB) TX bytes:2537 (2.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:25267 errors:0 dropped:0 overruns:0 frame:0
TX packets:25267 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1330155 (1.2 MiB) TX bytes:1330155 (1.2 MiB)
LSN_MACLEAN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vrh8)(PORT = 1533))
)
[oracle@vrh8 admin]$ lsnrctl start LSN_MACLEAN
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 15-APR-2012 03:01:57
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /s01/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /s01/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /s01/oracle/product/10.2.0/db_1/network/log/lsn_maclean.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vrh8)(PORT=1533)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vrh8)(PORT=1533)))
STATUS of the LISTENER
------------------------
Alias LSN_MACLEAN
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 15-APR-2012 03:01:57
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /s01/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /s01/oracle/product/10.2.0/db_1/network/log/lsn_maclean.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vrh8)(PORT=1533)))
The listener supports no services
The command completed successfully
[oracle@vrh8 admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 15 03:02:00 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter local
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string
log_archive_local_first boolean TRUE
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vrh8)(PORT=1533)))';
System altered.
SQL> alter system register;
System altered.
exit
[oracle@vrh8 admin]$ sqlplus system/oracle@192.168.1.191:1533/G10R21
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 15 03:02:54 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$database;
NAME
---------
G10R21
[oracle@vrh8 admin]$ sqlplus system/oracle@172.168.1.68:1533/G10R21
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 15 03:03:28 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>
SQL> select name from v$database;
NAME
---------
G10R21
[oracle@vrh8 admin]$ netstat -anp|grep 1533
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:1533 0.0.0.0:* LISTEN 27336/tnslsnr
tcp 0 0 172.168.1.68:1533 172.168.1.68:62059 TIME_WAIT -
tcp 0 0 192.168.1.191:1533 192.168.1.191:52143 TIME_WAIT -
tcp 0 0 192.168.1.191:52134 192.168.1.191:1533 ESTABLISHED 3545/ora_pmon_G10R2
tcp 0 0 192.168.1.191:1533 192.168.1.191:52134 ESTABLISHED 27336/tnslsnr
修改 LSN_MACLEAN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.191)(PORT = 1533))
)
[oracle@vrh8 admin]$ netstat -anp|grep 1533
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 192.168.1.191:1533 0.0.0.0:* LISTEN 27360/tnslsnr
tcp 0 0 192.168.1.191:1533 192.168.1.191:52171 TIME_WAIT -
tcp 0 0 192.168.1.191:1533 192.168.1.191:52177 TIME_WAIT -
tcp 0 0 192.168.1.191:1533 192.168.1.191:52134 TIME_WAIT - |
|