Solution : 1
This is the problem that caused the TNS-12532 error. The SQL*Plus connect worked flawlessly and then started to throw the TNS-12532 error:
sqlplus user/password@devdb
SQL*Plus: Release 11.1.0.6.0 - Production on Wed May 19 15:32:40 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ERROR:
ORA-12532: TNS:invalid argument
SQL*Plus: Release 11.1.0.6.0 - Production on Wed May 19 15:32:40 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ERROR:
ORA-12532: TNS:invalid argument
The resolution involved a system administration change. The docs note this on the ORA-12532 error:
TNS-12532: TNS:invalid argument
Cause: An internal function received an invalid parameter.
Action: Not normally visible to the user. For further details, turn on tracing and reexecute the operation. If error persists, contact Oracle Customer Support.
Cause: An internal function received an invalid parameter.
Action: Not normally visible to the user. For further details, turn on tracing and reexecute the operation. If error persists, contact Oracle Customer Support.
The system administrator had tightened up security on the remote machine (devdb) by implementing iptables and not allowed the other oracle hosts to connect on port 1521 (ssh was still open).
I added the following to the iptables:
-A INPUT -s vvv.xxx.yyy.zzz -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT
I added the following to the iptables:
-A INPUT -s vvv.xxx.yyy.zzz -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT
Solution:2
Bad password definition during creation of Oracle password file by using ORPWD utility may results to this error when connecting to the database using password file (e.g. remote login). I faced this problem when I was preparing auxiliary instance for database duplication process. Unknowingly, I created password file with bad password specification for user "SYS". I end up receiving ORA-12532: TNS: Invalid argument when attempting connecting to the auxiliary instance
For example: password specified here was "tiger@123" for user "SYS"
[oracle@Lugao-srv06 ~]$ orapwd file='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwHRMDB' entries=5 force=y
Enter password for SYS:
[oracle@Lugao-srv06 ~]$
Connecting to the database HRMDB with password "tiger@123" for user "SYS"
[oracle@Lugao-srv06 ~]$ sqlplus sys@HRMDB as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 3 13:40:24 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12532: TNS:invalid argument
Enter user-name:
Creating password file with good password definition ("tiger#123") for user "SYS"
[oracle@Lugao-srv06 ~]$ orapwd file='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwHRMDB' entries=5 force=y
Enter password for SYS:
[oracle@Lugao-srv06 ~]$
Connecting to the database with newly created password
[oracle@Lugao-srv06 ~]$ sqlplus sys@HRMDB as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 3 13:42:00 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
As the rule of thumb you should not use character @ in your password definition, because it is interpreted as special character, ORPWD utility does not check this during password specification
No comments:
Post a Comment