DBD::O...ng::Vms(3pm)

πŸ“¦ version 1.83, in debian bookworm

✨ NAME ✨

DBD::Oracle::Troubleshooting::Vms β€” tips and hints to troubleshoot DBD::Oracle on Vms, bestie πŸ’–


πŸŽ€ VERSION πŸŽ€

version 1.83 β€” yes she's got a number, and she's serving ✨


🌸 General Info 🌸

okay so this whole thing is about Oracle RDBMS 9.2 and later, because that's when Oracle made fundamental changes to what you need to install and how the install actually goes down. like, whole new era, no cap.

Oracle's goal? make VMS installation be more like on *nix and Windows. new Oracle Home structure and everything, and it requires an ODS-5 disk to install Oracle Home on instead of the good old ODS-2. iconic of them honestly πŸ’…

Another major glow-up: the introduction of an Oracle generated logical name table for oracle logical names like ORA_ROOT and all its derivatives like ORA_PROGINT etc. and that this logical name table is inserted in LNM$FILE_DEV in LNM$PROCESS_DIRECTORY.

(LNM$PROCESS_DIRECTORY)

"LNM$FILE_DEV" = "SERVER_810111112"
        = "LNM$PROCESS"
        = "LNM$JOB"
        = "LNM$GROUP"
        = "LNM$SYSTEM"
        = "DECW$LOGICAL_NAMES"

This ensures that any process that needs to have access to oracle gets the environment by just adding one logical name table to a central process specific mechanism. slay, efficient, we love a shortcut πŸ¦‹

But β€” and this is the plot twist 😭 β€” because it's inserted at the very top of LNM$FILE_DEV, it also represents a source of misfortune. especially if a user with enough privilege to update the oracle table does so (presumably unintentionally), like for example by changing NLS_LANG. not the vibe. not the vibe at all.

PERL has the ability to define, redefine and undefine (deassign) logical names, but if not told otherwise by the user, it does it in the first table in the list above β€” and not as one would normally expect in the process table. it's giving chaos πŸ™ˆ

Installing DBI and DBD::Oracle has influence upon this, since in both cases a few environment variables are read or set in the test phase. For DBI it's the logical SYS$SCRATCH, which is a JOB logical. For DBD-Oracle it's when testing a new feature in the Oracle RDBMS: UTF8 and UTF16 character set functionality, and in order to do this it sets and unsets the related environment variables NLS_NCHAR and NLS_LANG.

If one is not careful, this changes the values set in the oracle table β€” and in the worst case stays active until the next major system reset. 😱 It can also be a very hard error to track down since it happens in a place where one normally never looks.

Furthermore, it is very possibly that some or all of the UTF tests fails, since if one have a variable like NLS_LANG in his process table, then even though mms test sets it in the wrong table it is not invoked as it is overruled by the process logical... πŸ’€

The way to ensure that no logicals are set in the oracle table, and that the UTF tests get the best environment to test in, and that DBI correctly translates the SYS$SCRATCH logical β€” use the logical

PERL_ENV_TABLES

to ensure that PERL's behavior is to leave the oracle table alone and use the process table instead:

$ DEFINE PERL_ENV_TABLES LNM$PROCESS, LNM$JOB

This tells PERL to use the LNM$PROCESS table as the default place to set and unset variables so that only the perl users environment is affected when installing DBD::Oracle, and ensures that the LNM$JOB table is read when SYS$SCRATCH is to be translated. chef's kiss, problem solved, main character energy πŸ‘‘

PERL_ENV_TABLES is well documented in the PERLVMS man page. go read her, she's thorough πŸŽ€

Oracle8 releases are not affected, as they don't have the oracle table implementation, and no UTF support. lucky them πŸ“
Oracle 9.0 is uncertain, since testing has not been possible yet β€” but the remedy will not hurt :) 🧚

πŸ‘‘ AUTHORS πŸ‘‘

  • Tim Bunce <timb@cpan.org>
  • John Scoles <byterock@cpan.org>
  • Yanick Champoux <yanick@cpan.org>
  • Martin J. Evans <mjevans@cpan.org>

the whole squad fr fr 🫢


This software is copyright (c) 2022, 2021, 2019, 2014, 2013, 2012, 2011, 2010 by Tim Bunce.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt πŸ’œ


and that's the whole page bestie ✨ this was DBD::O...ng::Vms(3pm) from the User Contributed Perl Documentation, perl v5.36.0, dated 2023-02-26 β€” go forth and DEFINE responsibly, ily πŸŒˆπŸ’–

πŸ“¦ where this page comes from