forked from dr-kd/DBD-Oracle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
279 lines (198 loc) · 10.9 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
DBD::Oracle -- an Oracle interface for Perl 5.
Copyright (c) 1994-2020 Tim Bunce, et. al.
See the COPYRIGHT section in the Oracle.pm file for terms.
See also the MAINTAINER section in the Oracle.pm
PLEASE READ THE ENTIRE README FILE CAREFULLY !
AND THEN READ ANY README.* FILES RELEVANT TO YOUR PLATFORM:
README.aix.txt - AIX
README.hpux.txt - HP-UX
README.java.txt - Java/thread problem on Solaris
README.macosx.txt - Mac OS/X
README.win32.txt - MS Windows
README.wingcc.txt - MS Windows using GCC
README.* - see if there's a file for your platform
You may find these useful
README.help.txt - Help and hints on build problems
README.sec.txt - Oracle security issues to be aware of
README.login.txt - Help on how to connect to Oracle
README.longs.txt - Help on handling LONGs
README.clients.txt - What Oracle client files you need installed
*** QUICK START GUIDE:
The DBI requires one or more 'driver' modules to talk to databases.
Fetch, build and install the DBI module as per its README file.
You may then delete its source directory tree since it's no longer needed.
Use the 'perldoc DBI' command to read the DBI documentation.
Fetch this DBD::Oracle driver module and unpack it.
Follow the guidelines in this README file carefully.
*** *BEFORE* BUILDING, TESTING AND INSTALLING DBD::Oracle:
Build, test and install Perl 5 (at least 5.6.1)
It is very important to TEST it and INSTALL it!
Build, test and install the DBI module (at least DBI 1.623).
It is very important to TEST it and INSTALL it!
Remember to *read* the DBI README file and this one CAREFULLY!
Install enough Oracle software to enable DBD::Oracle to build.
For Oracle Instant Client: that means install the following packages:
* The "Basic" package for the essential Oracle libraries.
* The "SDK" package for the headers and makefile.
* The "SQL*Plus" component is optional, but will help you check
your configuration and DBD::Oracle determine your Oracle version.
For full Oracle installs: that usually includes Pro*C and SQL*Net.
(That's not very specific because it varies between Oracle releases.).
As of release 1.22 support of Oracle clients before 9 was dropped.
The main reason for this is that next few versions of DBD::Oracle will
introduce a number of new features which will required a great deal of extra
coding to make the OCI 8 work.
As well it is getting harder to find an Oracle client 8 to test against as
well Oracle no longer supports clients before 9.
The ORACLE_HOME environment variable must point to the Oracle Home
used to create DBD::Oracle. (Not essential under MS Windows).
*** MOST IMPORTANTLY:
Make sure Oracle is working and you can use the Oracle sqlplus
command to talk to the database from the machine you
want to build DBD::Oracle on. This often involves setting
environment variables like PATH, LD_LIBRARY_PATH, TWO_TASK etc.
Consult Oracle documentation for more details.
Only once you can connect to Oracle using sqlplus
should you try building and testing DBD::Oracle.
*** BUILDING:
Execute:
perl Makefile.PL # use a perl that's in your PATH
Use the perl that is first on your PATH. Then execute:
make
If you get an error like "make: not found" you need to find the
directory that has the make command installed in it (e.g. /usr/ccs/bin
on Solaris) and add that to your PATH environment variable.
Don't worry about most warnings when make runs, specifically ones like
"end-of-loop code not reached", "... due to prototype",
"cast increases required alignment of target type", etc.
If you have problems see the 'IF YOU HAVE PROBLEMS' section below.
If it builds without error you should then run 'make test'. For the
main tests to work they must be able to connect to an Oracle database.
The tests default to using a DSN of "dbi:Oracle:" which means you'll be
connected to the default database based on your TWO_TASK or ORACLE_SID
environment variables. This default can be altered either by defining the
ORACLE_DSN environment variable or the DBI_DSN environment variable.
See the oracle_test_dsn() sub in t/nchar_test_lib.pl
The supplied tests will connect to the database using the value of the
ORACLE_USERID environment variable to supply the username/password.
So you should set that to a valid user (e.g. 'scott/tiger') and ensure that
this user has sufficient privileges to create, insert into, select from and
drop a table, is also able to create, call and drop a procedure and is able
to select from systemtables like 'v$sessions'. Using 'system/manager' might
work but is not recommended! See also README.login.txt and TESTING.md.
Run tests with:
make test
If the all the formal tests pass then, finally, run:
make install
*** IF YOU HAVE PROBLEMS:
Make sure you are using a recent perl (5.6.1 or later) and make
sure it's on your PATH so you can say 'perl Makefile.PL' and not
'/path/to/perl Makefile.PL'.
If you get compiler errors refering to Perl's own header files
(.../CORE/*.h) then there is something wrong with your installation.
It is important to use a Perl that was built on the system you are using.
It's also important to use the same compiler that was used to build the
Perl you are using.
If you have build/link or core dump problems try:
perl Makefile.PL -p
or
perl Makefile.PL -nob
If it helps then please let me know (and please include a copy
of the log from the failed default build, the log from the build that
worked, plus the output of the "perl -V" command).
Do not hand edit the generated Makefile unless you are completely sure
you understand the implications! Always try to make changes via the
Makefile.PL command line and/or editing the Makefile.PL.
You should not need to make any changes. If you do please let us
know so that I can try to make it automatic in a later release.
If you just can't login or login takes a long time then read
README.login.txt
If you have linking problems (errors related to libraries or functions)
then you could try forcing a 'static' build using:
make realclean
perl Makefile.PL LINKTYPE=static
make
make perl (you'll need to use and install _this_ new perl binary)
make test
make -f Makefile.aperl inst_perl MAP_TARGET=perl (install new perl)
make install (install DBD::Oracle)
But that's not recommended these days.
>>> Also carefully read the README.help.txt file which is full of useful
>>> tips and workarounds for various problems of various systems.
*** HOW TO REPORT PROBLEMS
This software is supported via the [email protected] mailing list.
(You don't need to subscribe to the list in order to post.)
Please do NOT post problems to comp.lang.perl.*, [email protected],
http://www.cpanforum.com/dist/DBD-Oracle, or google groups etc.
If you're *sure* the problem is a bug then you can post a bug report
to https://github.com/perl5-dbi/DBD-Oracle/issues
Problem reports that don't include sufficient detail (including the
information listed below and how to reproduce the problem)
are unlikely to get resolved.
For more information and to keep informed about progress you can join the
mailing list. Send a message to [email protected] for more information.
Please post details of any problems (or changes you needed to make) to
** IT IS IMPORTANT TO INCLUDE *ALL* THE FOLLOWING INFORMATION:
1. A complete log of all steps of the build, e.g.:
(do a make realclean first)
perl Makefile.PL
make
make test
Make sure to include the 'stderr' output. The best way to do this is
to use the "script" command (man script). If that's not available
then "command > command.log 2>&1" (assuming you're not using csh).
The "2>&1" is required (after the stdout redirect) to redirect stderr
to the same place.
If a test fails then also include the output of:
perl -Mblib t/<name-of-failed-test>.t
2. Full details of which version of Oracle client and server you're using
(if it wasn't automatically found and printed by "perl Makefile.PL")
3. The output of perl -V (that's a capital V, not lowercase)
4. If you get errors like "undefined symbol", "symbol not found",
"undefined reference", "Text relocation remains" or any similar
error then include the output of "perl Makefile.PL -s XXX"
where XXX is the name of one of the symbols.
Please don't send the entire output of this command,
just any obviously 'interesting' parts (if there are any).
See also the LINKTYPE=static notes above.
5. If you get a core dump, rebuild DBD::Oracle with debugging
enabled by executing: perl Makefile.PL -g (note the -g option)
then rerun the code to get a new core dump file, finally use a
debugger (gdb, sdb, dbx, adb etc) to get a stack trace from it.
NOTE: I may not be able to help you much without a stack trace!
It is worth fetching and building the GNU GDB debugger (>=4.15) if
you don't have a good debugger on your system. If desperate try:
make perl; ./perl script; echo '$c' | adb ./perl core
Also see the Devel::CoreStack module on CPAN.
6. If the stack trace mentions XS_DynaLoader_dl_load_file then rerun
make test after setting the environment variable PERL_DL_DEBUG to 2.
7. If your installation succeeds, but your script does not behave
as you expect, the problem may be on your end. Before
sending to dbi-users, try writing a *small*, easy to use test case
to reproduce your problem. Also, use the DBI->trace method to
trace your database calls.
It is important to check that you are using the latest version before
posting. If you're not then you're *very* likely to be told "upgrade to
the latest". You would do yourself a favour by upgrading beforehand.
Try to help yourself first, then try to help others help you by following
these guidelines carefully. And remember, please don't mail developers
directly - use the dbi-users mailing list.
Regards,
Tim.
================================================================================
Examples and other info:
README.help.txt -- READ IT FIRST IF YOU HAVE ANY PROBLEMS
README.win32.txt -- building DBD::Oracle under MS Windows
README.wingcc.txt -- building DBD::Oracle under MS Windows with gcc
README.macosx.txt -- building DBD::Oracle under MacOS X
README.clients.txt -- building/using DBD::Oracle on minimally configured system
README.login.txt -- help for login problems
README.longs.txt -- examples dealing with LONG types (blobs)
DBI 'home page': http://dbi.perl.org
DBI and DBD::Oracle are very portable. If Perl and Oracle run on a platform
then the chances are that DBD::Oracle will as well.
================================================================================
See the large README.help.txt file for lots of hints and advice
about building and runtime issues.
End.