Hi Bruce, Meir, thank you for your help.
The file was already saved without BOM and it wasn't working at all when adding the BOM descriptor into the file. Bruce's suggestion about NLS_LANG settings solved the problem of connection : I changed it temporarily from NLS_LANG=american_america.WE8MSWIN1252 to NLS_LANG=american_america.UTF8 and managed to connect to the instance with the exact same password. While it works now, I begin to wonder if there could not be data corruption in case of modifications as the target database instance uses WE8MSWIN1252 and my terminal uses UTF8 (at NLS_LANG level). I think I might be customizing non-oracle shell environment before running the script but I don't know if it's something that useful... What's your point about it ? Best regards , Jefferson ELIAS Service Applications Informatiques Database Administrator Tel.: +32 4 366 83 56 Fax: +32 4 366 72 99 Email : jefferson.el...@chu.ulg.ac.be Email DBA : db....@chu.ulg.ac.be ----- Mail original ----- De: "Bruce Johnson" <john...@pharmacy.arizona.edu> À: "Jefferson Elias" <jefferson.el...@chu.ulg.ac.be> Cc: dbi-users@perl.org Envoyé: Jeudi 12 Mai 2016 17:38:59 Objet: Re: help to connect > On May 12, 2016, at 4:12 AM, Jefferson Elias <jefferson.el...@chu.ulg.ac.be> > wrote: > > Hi, > > I've been trying many differents things with the following error, but nothing > seems to be working. > > > Let me start to explain my problem from the beginning. > > (Perl version: v5.10.) > > I use a configuration file that I parse using Config::General::ParseConfig. > This file is encoded in UTF8 as shown below: > > $ file config/application.conf > config/application.conf: UTF-8 Unicode English text > > > In this configuration file, there is a field called > 'target_db_list_default_password' which contains a default password to be > used for my monitoring. > This password is then used in conjunction with DBI->connect() method > primarily to contact an Oracle Database instance. > > I always get the following message at execution: > > Perl Error message: DBI connect('MY_DB','halfonz',...) failed: > ORA-01017: invalid username/password; > logon denied (DBD ERROR: OCISessionBegin) at > /home/jeff.elias/Projects/DBA_SOURCES/branches/develop-next/Templates/Projet > Perl simple/src/libs/Common/DbConnection.pm line 210 > > > The password cannot be changed that easily. I've printed out the password I > get back and copy-pasted it into a SQL Developer new connection dialog then > tried to connect and it worked. > So, my conclusion is that the password can be considered as the OK. Make sure the Oracle environment variables, particularly the SID are the same for both SQL Developer and in your perl application; perhaps the config file is pointing to the wrong DB? (a development versus production thing? ) remotely it MIGHT be default NLS_LANG thing, but I don’t think so. A quick test would be to connect to the DB with hardcoded credentials in a test perl script? This will determine whether it’s perl/DBI or encoding issues from the config file. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs