TNS-12533: TNS:illegal ADDRESS parameters(修复)

修复 TNS-12533: TNS:illegal ADDRESS parameters

oracle@prd:/home/oracle$sqlplus sys/abc@fp as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Mar 20 19:51:42 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12533: TNS:illegal ADDRESS parameters

tnsping 服务名

oracle@prod:/home/oracle$ tnsping fp
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 20-MAR-2022 20:11:28 Copyright (c) 1997, 2013, Oracle. All rights reserved. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = fp))) TNS-12533: TNS:illegal ADDRESS parameters

修改oracle@prod:/home/oracle$vi /u01/oracle/product/11.2.0/network/admin/tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/oracle/product/11.2.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

#fp =
# (DESCRIPTION =
# (CONNECT_DATA =
# (SERVER = DEDICATED)
# (SERVICE_NAME = fp)
# )
# )
//修改这里 fp
= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.51.10)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = fp) ) )

oracle@prod:/home/oracle$tnsping fp

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 20-MAR-2022 20:19:37

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

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.51.10)(PORT = 1522)) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = fp))) OK (0 msec)

应用:

  oracle@prod:/home/oracle/impdir$ sqlplus /nolog

  SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 21 00:14:52 2022

  Copyright (c) 1982, 2013, Oracle. All rights reserved.

SQL>conn username/password@fp 如果fp提示tnsname 信息出错,那么就可以用tnsping fp 看看是否tnsnames.ora配置有错了。

 

posted @ 2022-03-20 20:46  jinzi  阅读(1397)  评论(0编辑  收藏  举报