Database Reference
In-Depth Information
The results of both methods are identical, except for the script name, which appears with
its full path when the association is used. You may fully indulge your laziness after defining .pl
as an additional extension of executable files. This is achieved by using the environment variable
PATHEXT .
C:> set PATHEXT
PATHEXT=.COM;.EXE;.BAT;.CMD
C:> set PATHEXT=%PATHEXT%;.PL
C:> args first second third fourth
Script name: C:\home\ndebes\it\perl\args.pl
Argument 0: first
Argument 1: second
Argument 2: third
Argument 3: fourth
An association is removed by using a single blank as the file type, as shown here:
C:> ASSOC .pl=
.pl=
The glyph represents a blank character.
Connecting to an ORACLE DBMS Instance
An area where novice Perl DBI programmers frequently have trouble is deciding which of the
many ways to connect to an ORACLE DBMS instance is best suited for them. The Perl DBI
documentation covers this subject only partially, so I have decided to include a complete over-
view of all variations extant.
Table 22-2 lists the most common Oracle Net TNS (Transparent Network Substrate) protocol
adapters for connecting to an ORACLE instance. The option to use an Oracle Net service name
description with IPC or TCP, without retrieving it from the configuration file tnsnames.ora , is
ignored for the moment.
Table 22-2. Oracle Net Protocol Adapters
Method
Listener
Required
tnsnames.ora
Required
Notes
The environment variable ORACLE_SID must
be set. On UNIX systems ORACLE_HOME must
be set too.
Bequeath
adapter
no
no
IPC adapter
yes
yes
For systems that do not have a network
adapter or where the database client uses a
different local ORACLE_HOME than the server.
TCP/IP
adapter
yes
yes
Most common method; TCP/IP network
infrastructure must be in place.
 
Search WWH ::




Custom Search