| 1 | <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| 5 | <meta name="Author" content="Peter Harvey"> |
| 6 | <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD Caldera Systems OpenLinux [en] (X11; U; Linux 2.4.2 i686) [Netscape]"> |
| 7 | <title>unixODBC - Administrator Manual</title> |
| 8 | </head> |
| 9 | <body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000"> |
| 10 | <img SRC="unixODBC.gif" height=32 width=32><font face="Arial,Helvetica"><font size=+4>unixODBC</font></font> |
| 11 | <br> |
| 12 | <hr WIDTH="100%"> |
| 13 | <center><b><font face="Arial,Helvetica"><font size=+3>ADMINISTRATOR MANUAL</font></font></b></center> |
| 14 | |
| 15 | <p><b><font face="Arial,Helvetica">Introduction</font></b><font face="Arial,Helvetica"></font> |
| 16 | <p><font face="Arial,Helvetica">Welcome to the unixODBC Administrator Manual. |
| 17 | This manual has been created to help system administrators install and |
| 18 | manage the ODBC sub-system.</font><font face="Arial,Helvetica"></font> |
| 19 | <p><b><font face="Arial,Helvetica">Getting Started</font></b><font face="Arial,Helvetica"></font> |
| 20 | <p><font face="Arial,Helvetica">At this point you know what ODBC is and |
| 21 | what it can offer the Users of your system(s) - now you want to get it |
| 22 | on your system(s).</font><font face="Arial,Helvetica"></font> |
| 23 | <p><b><font face="Arial,Helvetica">Platforms</font></b><font face="Arial,Helvetica"></font> |
| 24 | <p><font face="Arial,Helvetica">unixODBC implements ODBC on the following |
| 25 | platforms;</font> |
| 26 | <ul> |
| 27 | <li> |
| 28 | <font face="Arial,Helvetica">Linux</font></li> |
| 29 | |
| 30 | <li> |
| 31 | <font face="Arial,Helvetica">Mac OSX</font></li> |
| 32 | |
| 33 | <li> |
| 34 | <font face="Arial,Helvetica">VMS</font></li> |
| 35 | |
| 36 | <li> |
| 37 | <font face="Arial,Helvetica">and various flavours of UNIX</font></li> |
| 38 | </ul> |
| 39 | <font face="Arial,Helvetica">This manual covers all platforms and will |
| 40 | give special indication of differences for any particular platform.</font><font face="Arial,Helvetica"></font> |
| 41 | <p><b><font face="Arial,Helvetica">Do You Have It?</font></b> |
| 42 | <br><font face="Arial,Helvetica"> </font> |
| 43 | <br><font face="Arial,Helvetica">It is possible that your system already |
| 44 | has unixODBC installed. The best way to check for this is to drop to a |
| 45 | terminal and execute 'odbcinst --version'.</font> |
| 46 | <br><font face="Arial,Helvetica"></font> |
| 47 | <table BORDER COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" NOSAVE > |
| 48 | <tr> |
| 49 | <td>[root@p12 qt]# odbcinst --version |
| 50 | <br>unixODBC 2.1.1 |
| 51 | <br>[root@p12 qt]#</td> |
| 52 | </tr> |
| 53 | </table> |
| 54 | <font face="Arial,Helvetica"></font><font face="Arial,Helvetica"></font> |
| 55 | <p><b><font face="Arial,Helvetica">Downloading</font></b><font face="Arial,Helvetica"></font> |
| 56 | <p><font face="Arial,Helvetica">You can get the source from <a href="http://sourceforge.net/projects/unixodbc">Source |
| 57 | Forge</a>.</font><font face="Arial,Helvetica"></font> |
| 58 | <p><font face="Arial,Helvetica">You can get binary distributions from various |
| 59 | places. One place to look is with the vendor of your operating system. |
| 60 | You can also go to <a href="http://sourceforge.net/projects/unixodbc/">Source |
| 61 | Forge</a> and take a look at the Home Page to see the availability and |
| 62 | location of binary distributions.</font><font face="Arial,Helvetica"></font> |
| 63 | <p><font face="Arial,Helvetica">Whether you choose a binary distribution |
| 64 | or source code depends largely upon your site policy and which operating |
| 65 | system you are working with. I recommend the following;</font> |
| 66 | <ul> |
| 67 | <li> |
| 68 | <font face="Arial,Helvetica">Mac OSX - use a binary distribution</font></li> |
| 69 | |
| 70 | <li> |
| 71 | <font face="Arial,Helvetica">Others - use a source distribution (tar-ball |
| 72 | NOT CVS)</font></li> |
| 73 | </ul> |
| 74 | <font face="Arial,Helvetica"></font> |
| 75 | <p><br><b><font face="Arial,Helvetica">Installing From Source</font></b><font face="Arial,Helvetica"></font> |
| 76 | <p><font face="Arial,Helvetica">There are two options when installing from |
| 77 | source. You can install from a source distribution (a gzipped tar-ball) |
| 78 | or from CVS. In either case you will find README files in the main directory |
| 79 | which should help you build and install unixODBC.</font><font face="Arial,Helvetica"></font> |
| 80 | <p><font face="Arial,Helvetica">The unixODBC build process uses the GNU auto-tools. |
| 81 | This will be a concern to you if you choose to build from CVS because you |
| 82 | must start the build process with 'make -f Makefile.cvs' - this, in turn, |
| 83 | uses the GNU auto-tools (i.e. automake, autoconf) to build a 'configure' |
| 84 | script. Unfortunately; the GNU auto-tools can be very version sensitive. |
| 85 | See the README file(s) for more on this if you plan to build from CVS source.</font> |
| 86 | <br><font face="Arial,Helvetica"></font> |
| 87 | <table BORDER COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" NOSAVE > |
| 88 | <tr> |
| 89 | <td>[root@p12 unixODBC]# make -f Makefile.cvs </td> |
| 90 | </tr> |
| 91 | </table> |
| 92 | <font face="Arial,Helvetica"></font> |
| 93 | <p><font face="Arial,Helvetica">You do not have to 'make -f Makefile.cvs' |
| 94 | when using a source distribution. Regardless of whether you choose to use |
| 95 | CVS or a source distribution you will want to execute the 'configure' script |
| 96 | with options appropriate for your needs.</font> |
| 97 | <br><font face="Arial,Helvetica"></font> |
| 98 | <table BORDER COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" NOSAVE > |
| 99 | <tr> |
| 100 | <td>[root@p12 unixODBC]# ./configure --help</td> |
| 101 | </tr> |
| 102 | </table> |
| 103 | <font face="Arial,Helvetica"></font> |
| 104 | <p><font face="Arial,Helvetica">The 'configure' script will check your |
| 105 | system for features of interest and build some make files as well as create |
| 106 | some include file(s) which will ensure that unixODBC will build without |
| 107 | errors and only with features supported by your operating system.</font><font face="Arial,Helvetica"></font> |
| 108 | <p><font face="Arial,Helvetica">At this point it is important to think |
| 109 | about whether or not GUI tools are important to you (and your Users). |
| 110 | The 'configure' script will try to detect support for the GUI applications |
| 111 | in unixODBC and will build them if such support exists. unixODBC includes |
| 112 | GUI tools based upon the Qt class library and GTK. The Qt based tools will |
| 113 | be built if libqt*so can be found. Linux systems will probably have this. |
| 114 | You can get this from <a href="http://www.trolltech.com">Troll Tech</a>.</font><font face="Arial,Helvetica"></font> |
| 115 | <p><font face="Arial,Helvetica">Now you are ready to build the sources. |
| 116 | Do this with the usual build sequence of commands.</font> |
| 117 | <br><font face="Arial,Helvetica"></font> |
| 118 | <table BORDER COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" NOSAVE > |
| 119 | <tr> |
| 120 | <td>[root@p12 unixODBC]# make |
| 121 | <br>[root@p12 unixODBC]# make install</td> |
| 122 | </tr> |
| 123 | </table> |
| 124 | <font face="Arial,Helvetica"></font> |
| 125 | <p><font face="Arial,Helvetica"><font color="#FF0000">Mac OSX</font>: The |
| 126 | Apple folks seem to be grappling with their support for the GNU auto-tools |
| 127 | at the time of this writing. I recommend installing from a binary distribution |
| 128 | of unixODBC. If you must install from source, and you are having problems |
| 129 | with the GNU auto-tools, then you may want to try the qmake build. |
| 130 | The qmake build process is not well documented at this time. People familiar |
| 131 | with qmake should be able to build unixODBC with the included qmake project |
| 132 | files.</font><font face="Arial,Helvetica"></font> |
| 133 | <p><b><font face="Arial,Helvetica">Installing From Binary</font></b><font face="Arial,Helvetica"></font> |
| 134 | <p><font face="Arial,Helvetica">RPM</font><font face="Arial,Helvetica"></font> |
| 135 | <p><font face="Arial,Helvetica">Various RPMs exist for unixODBC. The best |
| 136 | idea is to use any RPM files you can from your O/S vendor. Typically RPM distributions |
| 137 | break unixODBC into more than one RPM distribution such as; core, and GUI.</font><font face="Arial,Helvetica"></font> |
| 138 | <p><font face="Arial,Helvetica">Mac OSX Disk Images</font><font face="Arial,Helvetica"></font> |
| 139 | <p><font face="Arial,Helvetica">A binary distribution for OSX has recently |
| 140 | become available in the downloads section at <a href="http://www.codebydesign.com/DataArchitect">CodeByDesign</a>. |
| 141 | This includes proper Mac installs. The install should be done in the following |
| 142 | order;</font> |
| 143 | <ol> |
| 144 | <li> |
| 145 | <font face="Arial,Helvetica">Qt Runtime</font></li> |
| 146 | |
| 147 | <li> |
| 148 | <font face="Arial,Helvetica">unixODBC</font></li> |
| 149 | |
| 150 | <li> |
| 151 | <font face="Arial,Helvetica">drivers in any order</font></li> |
| 152 | </ol> |
| 153 | <font face="Arial,Helvetica">Others</font><font face="Arial,Helvetica"></font> |
| 154 | <p><font face="Arial,Helvetica">Proper install packages are also available |
| 155 | for other platforms such as the Debian package format for Debian Linux. |
| 156 | Check with the O/S vendor.</font><font face="Arial,Helvetica"></font> |
| 157 | <p><b><font face="Arial,Helvetica">Where Are Installed Files</font></b><font face="Arial,Helvetica"></font> |
| 158 | <p><font face="Arial,Helvetica">The location for files vary somewhat depending |
| 159 | upon how you installed unixODBC (source or binary) and which platform |
| 160 | you installed on. Furthermore; the location can be changed during a source |
| 161 | install by './configure --prefix='.</font><font face="Arial,Helvetica"></font> |
| 162 | <p><font face="Arial,Helvetica">Typically;</font> |
| 163 | <ul> |
| 164 | <li> |
| 165 | <font face="Arial,Helvetica">library files will go in /usr/lib or /usr/local/lib</font></li> |
| 166 | |
| 167 | <li> |
| 168 | <font face="Arial,Helvetica">binaries will go in /usr/bin or /usr/local/bin</font></li> |
| 169 | |
| 170 | <li> |
| 171 | <font face="Arial,Helvetica">system config files will go in /etc or /usr/local/etc</font></li> |
| 172 | </ul> |
| 173 | <font face="Arial,Helvetica">The system config files are;</font> |
| 174 | <ul> |
| 175 | <li> |
| 176 | <font face="Arial,Helvetica">odbcinst.ini - list of registered drivers</font></li> |
| 177 | |
| 178 | <li> |
| 179 | <font face="Arial,Helvetica">odbc.ini - system data source names</font></li> |
| 180 | </ul> |
| 181 | <font face="Arial,Helvetica">The location of the system config files can |
| 182 | be changed by setting the ODBCSYSINI environment variable at run-time. |
| 183 | The system config files can be edited using a simple text editor but it |
| 184 | is recommended that you use the ODBCConfig GUI tool or the odcinst |
| 185 | command-line tool because they will validate the reading and writing of |
| 186 | these files while ensuring that the current location is used.</font><font face="Arial,Helvetica"></font> |
| 187 | <p><font face="Arial,Helvetica"><font color="#FF0000">Mac OSX</font>: The |
| 188 | OSX binary install will use; /usr/lib, /usr/bin, /Applications/Utilities |
| 189 | and /etc.</font><font face="Arial,Helvetica"></font> |
| 190 | <p><b><font face="Arial,Helvetica">Post Install</font></b><font face="Arial,Helvetica"></font> |
| 191 | <p><font face="Arial,Helvetica">You now have an ODBC sub-system installed |
| 192 | on your system(s). What is the system administrators role from here? The |
| 193 | system administrator is the only person who can install and register ODBC drivers |
| 194 | and create/edit/delete system Data Source Names (DSN).</font><font face="Arial,Helvetica"></font> |
| 195 | <p><font face="Arial,Helvetica">Drivers</font><font face="Arial,Helvetica"></font> |
| 196 | <p><font face="Arial,Helvetica">Drivers should be installed and configured |
| 197 | based upon the driver vendors instructions. Many drivers do not include |
| 198 | a full install process - lacking the driver registration step. These drivers |
| 199 | can be registered using the ODBCConfig GUI tool or the odbcinst command-line |
| 200 | tool.</font><font face="Arial,Helvetica"></font> |
| 201 | <p><font face="Arial,Helvetica">System DSN</font><font face="Arial,Helvetica"></font> |
| 202 | <p><font face="Arial,Helvetica">These can be created using the ODBCConfig |
| 203 | GUI tool or the odbcinst command-line tool. ODBCConfig is the preferred |
| 204 | method but not all drivers have a User Interface (U.I.) part.</font><font face="Arial,Helvetica"></font> |
| 205 | <p><font face="Arial,Helvetica"><font color="#FF0000">Mac OSX</font>: In |
| 206 | some cases the ODBCConfig icon will not open. In such a case you should |
| 207 | drop to a terminal window and use the open command.</font> |
| 208 | <br><font face="Arial,Helvetica"></font> |
| 209 | <table BORDER COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" NOSAVE > |
| 210 | <tr> |
| 211 | <td># open /Applications/Utilities/ODBCConfig.app</td> |
| 212 | </tr> |
| 213 | </table> |
| 214 | <font face="Arial,Helvetica"></font> |
| 215 | <p><b><font face="Arial,Helvetica">Summary</font></b><font face="Arial,Helvetica"></font> |
| 216 | <p><font face="Arial,Helvetica">unixODBC implements an ODBC sub-system |
| 217 | for a wide variety of platforms. unixODBC can be installed using; binary, |
| 218 | source and source from CVS. Drivers can be installed using installation |
| 219 | methods created by the driver vendor with unixODBC tools available to fill |
| 220 | any gaps. ODBC system information can be managed using; ODBCConfig, |
| 221 | odbcinst, or a text editor.</font> |
| 222 | <br><font face="Arial,Helvetica"></font> |
| 223 | <p> |
| 224 | <hr WIDTH="100%"> |
| 225 | <br> |
| 226 | <br> |
| 227 | </body> |
| 228 | </html> |