`
wsql
  • 浏览: 11753865 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

TNS-12532: TNS:invalid argument 错误的解决!

 
阅读更多

C:/Documents and Settings/user>tnsping HENRYDB

TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 16-DEC-2009 01:06:14

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:

D:/app/user/product/11.1.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.140.10)(PORT = 1521))) (CONNECT_DATA =

(SERVICE_NAME = henrydb.sun)))

TNS-12532: TNS:invalid argument

[oracle@localhost admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-DEC-2009 00:38:08

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.140.10)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date 15-DEC-2009 23:33:52

Uptime 0 days 1 hr. 4 min. 16 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File /oracle/ora11gR2/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.140.10)(PORT=1521)))

The listener supports no services

The command completed successfully

[oracle@localhost admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-DEC-2009 00:38:10

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.140.10)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date 15-DEC-2009 23:33:52

Uptime 0 days 1 hr. 4 min. 17 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File /oracle/ora11gR2/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.140.10)(PORT=1521)))

The listener supports no services

The command completed successfully

[oracle@localhost admin]$ ifconfig -a

-bash: ifconfig: command not found

[oracle@localhost admin]$ exit

logout

[root@localhost ~]# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:0C:29:97:AC:42

inet addr:192.168.140.10 Bcast:192.168.140.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe97:ac42/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:4243 errors:0 dropped:0 overruns:0 frame:0

TX packets:2348 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:372138 (363.4 KiB) TX bytes:252567 (246.6 KiB)

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:278952 errors:0 dropped:0 overruns:0 frame:0

TX packets:278952 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:83496725 (79.6 MiB) TX bytes:83496725 (79.6 MiB)

peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link

UP BROADCAST RUNNING NOARP MTU:1500 Metric:1

RX packets:4691 errors:0 dropped:0 overruns:0 frame:0

TX packets:2524 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:422546 (412.6 KiB) TX bytes:287523 (280.7 KiB)

Interrupt:18 Base address:0x2000

sit0 Link encap:IPv6-in-IPv4

NOARP MTU:1480 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

veth1 Link encap:Ethernet HWaddr 00:00:00:00:00:00

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

veth2 Link encap:Ethernet HWaddr 00:00:00:00:00:00

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

veth3 Link encap:Ethernet HWaddr 00:00:00:00:00:00

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link

UP BROADCAST RUNNING NOARP MTU:1500 Metric:1

RX packets:2462 errors:0 dropped:0 overruns:0 frame:0

TX packets:4677 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:275649 (269.1 KiB) TX bytes:420654 (410.7 KiB)

vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

vif0.2 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

vif0.3 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00

inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0

inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:39 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:9580 (9.3 KiB)

xenbr0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

UP BROADCAST RUNNING NOARP MTU:1500 Metric:1

RX packets:2553 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:228017 (222.6 KiB) TX bytes:0 (0.0 b)

[root@localhost ~]# ping 192.168.140.10

PING 192.168.140.10 (192.168.140.10) 56(84) bytes of data.

64 bytes from 192.168.140.10: icmp_seq=1 ttl=64 time=2.48 ms

64 bytes from 192.168.140.10: icmp_seq=2 ttl=64 time=0.141 ms

--- 192.168.140.10 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 999ms

rtt min/avg/max/mdev = 0.141/1.312/2.484/1.172 ms

[root@localhost ~]# netstat -a|grep 1521

[root@localhost ~]# su - oracle

[oracle@localhost ~]$ lsrnctl status

-bash: lsrnctl: command not found

[oracle@localhost ~]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-DEC-2009 00:39:49

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.140.10)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date 15-DEC-2009 23:33:52

Uptime 0 days 1 hr. 5 min. 58 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File /oracle/ora11gR2/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.140.10)(PORT=1521)))

The listener supports no services

The command completed successfully

LSNRCTL> exit

sqlplus / as sysdba

SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.140.10)(PORT=1521)))';

System altered.

exit

[oracle@localhost ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-DEC-2009 00:44:14

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.140.10)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date 15-DEC-2009 23:33:52

Uptime 0 days 1 hr. 10 min. 22 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File /oracle/ora11gR2/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.140.10)(PORT=1521)))

Services Summary...

Service "henrydb.sun" has 1 instance(s).

Instance "henrydb", status READY, has 1 handler(s) for this service...

Service "henrydbXDB.sun" has 1 instance(s).

Instance "henrydb", status READY, has 1 handler(s) for this service...

The command completed successfully

C:/Documents and Settings/user>

C:/Documents and Settings/user>

C:/Documents and Settings/user>tnsping henrydb

TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 16-DEC-2009 01:12:02

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:

D:/app/user/product/11.1.0/db_1/network/admin/sqlnet.ora

使用setup关闭linux 的firewall.

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.140.10)(PORT = 1521))) (CONNECT_DATA =

(SERVICE_NAME = henrydb.sun)))

OK (10 msec)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics