| 1 |
|
| 2 |
DBD::Sybase -- a Sybase DBI driver for Perl 5. |
| 3 |
|
| 4 |
Copyright (c) 1996-2022 Michael Peppler |
| 5 |
|
| 6 |
You may distribute under the terms of either the GNU General Public |
| 7 |
License or the Artistic License, as specified in the Perl README file. |
| 8 |
|
| 9 |
https://github.com/mpeppler/DBD-Sybase |
| 10 |
|
| 11 |
This Sybase DBI driver is built using the Sybase OpenClient Client |
| 12 |
Library (aka CT-library). You will need to have that installed before |
| 13 |
you can do anything with this package. You will also need Tim Bunce's |
| 14 |
DBI module, latest release. DBI is available from CPAN, in |
| 15 |
|
| 16 |
"CPAN"/authors/id/TIMB/DBI-1.xx-tar.gz |
| 17 |
|
| 18 |
The Sybase OpenClient libraries are of course available from Sybase. |
| 19 |
See http://www.sybase.com or http://www.peppler.org for details. |
| 20 |
|
| 21 |
An alternative is to use the FreeTDS reimplementation of Client Library. |
| 22 |
With FreeTDS DBD::Sybase can be used to query a MS-SQL 7 or 2000 |
| 23 |
database server from a Unix/linux host. |
| 24 |
See http://www.freetds.org for details. |
| 25 |
|
| 26 |
If you use FreeTDS please read the README.freetds file. |
| 27 |
|
| 28 |
DBD::Sybase is a reasonably complete implementation of the DBI spec, but |
| 29 |
there are still some features that are missing. Please see the DBD::Sybase |
| 30 |
man page for details. |
| 31 |
|
| 32 |
Getting Help |
| 33 |
============ |
| 34 |
|
| 35 |
If you are stuck please start by searching the Web, the appropriate |
| 36 |
mailing lists, etc, as it is likely that someone else |
| 37 |
will have experienced the same problem before you. |
| 38 |
|
| 39 |
You can report issues at https://github.com/mpeppler/DBD-Sybase/issues |
| 40 |
|
| 41 |
For recent changes please see the CHANGES file. |
| 42 |
|
| 43 |
Building: |
| 44 |
--------- |
| 45 |
|
| 46 |
Make sure that the SYBASE environment variable points to the Sybase |
| 47 |
installation that you want to use for this build. The easiest way |
| 48 |
to do this is to source the SYBASE.sh/SYBASE.csh or SYBASE.bat file |
| 49 |
in the root directory of the Sybase installation you want to use. |
| 50 |
|
| 51 |
This version attempts to find out which libraries it needs by looking |
| 52 |
at $SYBASE/lib ($SYBASE/$SYBASE_OCS/lib for ASE 12.x installations.) |
| 53 |
This behaviour works on Unix and VMS systems, but on Win32 you still |
| 54 |
have to edit the CONFIG file the old way). |
| 55 |
It assumes that $SYBASE is set and points to |
| 56 |
the Sybase installation directory that you want to use to build |
| 57 |
DBD::Sybase, and will also use the value of $SYBASE_OCS if it is set. |
| 58 |
|
| 59 |
Then run |
| 60 |
perl Makefile.PL |
| 61 |
You will be prompted to choose build options (chained mode for AutoCommit, |
| 62 |
threaded libraries when using a threaded perl) and for server/user/pwd |
| 63 |
to use for the "make test" step. |
| 64 |
|
| 65 |
If there were warnings about missing libraries, go to the manual |
| 66 |
configuration, below. |
| 67 |
|
| 68 |
Run |
| 69 |
make |
| 70 |
If the make failed, go to the manual configuration, below. |
| 71 |
Run |
| 72 |
make test |
| 73 |
If this succeeds you can install the package, via |
| 74 |
make install |
| 75 |
(which you probably have to run as root.) |
| 76 |
|
| 77 |
Manual Configuration: |
| 78 |
--------------------- |
| 79 |
|
| 80 |
If the automatic configuration fails, then you will have to edit the |
| 81 |
CONFIG file, and set the EXTRA_LIBS entry according to your OS and |
| 82 |
Sybase release, and then run |
| 83 |
perl Makefile.PL --file |
| 84 |
|
| 85 |
The CONFIG file can be used to set certain system variables that |
| 86 |
are needed for the build. |
| 87 |
SYBASE is the root directory of your Sybase installation. DBD::Sybase |
| 88 |
will use $SYBASE/lib and $SYBASE/include during the build. |
| 89 |
|
| 90 |
EXTRA_LIBS lists any extra libraries that are required on your |
| 91 |
system. For example, Solaris 2.x needs -ltli. See your OS specific |
| 92 |
documentation supplement from Sybase to determine what is required. |
| 93 |
|
| 94 |
DBI_INCLUDE is the directory where DBI installed its include files. |
| 95 |
Makefile.PL will normally deduce this directory from perl's Config |
| 96 |
module, so you only need to set this if Makefile.PL fails. |
| 97 |
|
| 98 |
LINKTYPE. Uncomment and set to 'static' if you want to build |
| 99 |
DBD::Sybase statically (ie always included in a new perl binary). |
| 100 |
|
| 101 |
Edit PWD, and set the user, password and server that you want to use for the |
| 102 |
'make test'. |
| 103 |
|
| 104 |
Run perl Makefile.PL, make, make test. |
| 105 |
|
| 106 |
If everything's fine, run "make install" to move the files to your |
| 107 |
installed perl library tree. |
| 108 |
|
| 109 |
Automated build with no prompts: |
| 110 |
-------------------------------- |
| 111 |
|
| 112 |
You can run Makefile.PL with command line arguments to accept defaults |
| 113 |
and build DBD::Sybase in an automated manner (without prompts). |
| 114 |
|
| 115 |
The syntax is: |
| 116 |
|
| 117 |
perl Makefile.PL --accept_test_defaults --chained {Y, N} --threaded_libs {Y, N} |
| 118 |
|
| 119 |
Note that the test defaults are what is found in PWD.factory, and are unlikely to |
| 120 |
be correct for your situation. You can run an unattended build by setting the |
| 121 |
following environment variables: |
| 122 |
|
| 123 |
DBD_SYB_CHAINED (set to Y or N, defaults to Y) |
| 124 |
DBD_SYB_THREADED_LIBS (set to Y or N, defaults to N) |
| 125 |
DBD_SYB_SRV (set to the Sybase server name you wish to use) |
| 126 |
DBD_SYB_DB (set to the database you want to use on that server) |
| 127 |
DBD_SYB_UID (set to the login ID on the server) |
| 128 |
DBD_SYB_PWD (set to the password for that login ID) |
| 129 |
|
| 130 |
and run |
| 131 |
perl Makefile.PL --use_env |
| 132 |
|
| 133 |
If any of the environment variables mentioned above are missing the default value will |
| 134 |
be used (e.g. the build currently defaults to using CHAINED mode and not using the |
| 135 |
threaded libs). You can also set DBD_SYB_USE_ENV to Y to avoid using the --use_env |
| 136 |
command line switch. |
| 137 |
|
| 138 |
|
| 139 |
Known Problems: |
| 140 |
=============== |
| 141 |
|
| 142 |
Solaris 2.x: |
| 143 |
----------- |
| 144 |
On Solaris 2.x make test will fail if LD_LIBRARY_PATH is set and has |
| 145 |
/usr/lib or /lib before $SYBASE/lib. This is because both Solaris 2.x |
| 146 |
and Sybase have a library called libintl.so, and if /usr/lib is placed |
| 147 |
before $SYBASE/lib in LD_LIBRARY_PATH the dynamic loader will search |
| 148 |
the wrong library when loading DBD::Sybase. In general it is not |
| 149 |
necessary to set LD_LIBRARY_PATH on Solaris, and it is only rarely |
| 150 |
necessary to include /usr/lib or /lib in the LD_LIBRARY_PATH as those |
| 151 |
directories will be searched by default. |
| 152 |
|
| 153 |
Linux: |
| 154 |
------ |
| 155 |
If the LANG or LC_ALL environment variable is set and points to an |
| 156 |
entry that does not exist in $SYBASE/locales/locales.dat (in the |
| 157 |
[linux] section) then you may get a core dump. This is an |
| 158 |
OpenClient problem. |
| 159 |
|
| 160 |
FreeTDS: |
| 161 |
-------- |
| 162 |
|
| 163 |
See the README.freetds file for details. |
| 164 |
|
| 165 |
Regression Tests: |
| 166 |
----------------- |
| 167 |
|
| 168 |
The regression tests cover the normal operations, but can't check |
| 169 |
for all combination of data and access modes. You should always test |
| 170 |
with your own scripts/data before moving a new release into production. |
| 171 |
|
| 172 |
NOTE: t/fail.t will *fail* on test #8 if you are connecting to |
| 173 |
an 11.0.3.3 server. This is a bug in the server, and not something |
| 174 |
that I can do anything about, unfortunately. It's a fairly |
| 175 |
obscure constraint violation condition - read the code if |
| 176 |
you are interested. |
| 177 |
|
| 178 |
See perldoc DBD::Sybase for details about the package. |
| 179 |
|
| 180 |
Comments, criticism, etc. welcome! |
| 181 |
|
| 182 |
Michael |
| 183 |
-- |
| 184 |
Michael Peppler |
| 185 |
[email protected] |
| 186 |
http://www.peppler.org/ |
| 187 |
|