in reply to DBI connect to IPv6

Your posted connect arguments lack the "dbi:" prefix and the name of the DBD. And if you had wrapped the connect statements in <code> tags, the version with brackets would show correctly. See Markup in the Monastery.

From the error messages I guess that you are using Oracle and DBD::Oracle.

Is there any reason why you don't let Oracle take care of selecting the protocol, host, port, SID, ...? Create a record in TNSNAMES.ORA for the database and use the name of that record instead of messing with host, sid, and port parameters. Did you check if your version of Oracle supports IPv6? 30 seconds using Google tell me that you need at least Oracle 11g to have IPv6 support.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: DBI connect to IPv6
by daphnaw (Acolyte) on Mar 02, 2011 at 11:53 UTC

    I've upgraded the sqlplus libraries we have been using from 10.2.0.3 to 11.2 (oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.zip & oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.x86_64.zip), so, yes I'm aware only 11.2 supports IPv6.

    Connecting directly to sqlplus does work:

    sqlplus system/manager@"[2001:db8:c18:3:214:4fff:fef2:30c1]:1521/anadb +"

    Any other ideas?
      Any other ideas?
      1. Use TNSNAMES.ORA
      2. Use TNSNAMES.ORA. Really. Don't hardcode database connections, use the standard configuration file TNSNAMES.ORA.
      3. Configure the machine running perl to resolve some arbitary hostname to the desired IPv6 address, e.g. by editing /etc/hosts / %windir%\system32\drivers\etc\hosts or by adding an AAAA record to your local DNS server, and use that hostname instead of the IPv6 address.
      4. Look at the DBD::Oracle documentation, especially "the usual suspects" README*.*, CHANGES, NOTES, TODO.
      5. Look at the source of DBD::Oracle to find out how the connect parameters are handled. Especially trace the way of the host parameter, watch out for calls to routines that can't handle IPv6 addresses.
      6. Write a patch for DBD::Oracle, including tests, and send it to the DBD::Oracle maintainer.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
        I was able to resolve the issue by re-compliling the following dependent modules :

        Clone

        Params-Util

        SQL-Statement