home *** CD-ROM | disk | FTP | other *** search
/ Micro Cookbook 5 / COOKWORKS.BIN / odbc / oracle.txt < prev    next >
Text File  |  1995-01-13  |  14KB  |  327 lines

  1. SETTING UP THE ODBC ORACLE DRIVER FOR USE WITH THE SQL*NET FOR WINDOWS DLLs
  2.  
  3. This file discusses how to set up the ODBC ORACLE driver to run with your 
  4. ORACLE Server software. To use the ODBC ORACLE driver with any large 
  5. application, such as Microsoft Access, you must use the SQL*Net for Windows 
  6. DLLs. Because the ODBC ORACLE driver is designed to use ORACLE Server 
  7. version 6 and the SQL*Net for Windows DLLs are designed to use ORACLE Server 
  8. version 7, you must be careful to configure your system correctly.
  9.  
  10. If you do not have the SQL*Net for Windows DLLs, or, after following the
  11. instructions in this file, you are still unable to connect to ORACLE Server
  12. with SQL*Net, you can contact Oracle Corp. at 1-800-345-DBMS.
  13.  
  14.  
  15. If ORACLE Server version 6 is already installed on your system
  16. --------------------------------------------------------------
  17.  
  18. To set up the ODBC ORACLE driver and the SQL*Net for Windows DLLs if you 
  19. already have ORACLE Server version 6 on your system:
  20.  
  21. 1.  Make sure you have the correct versions of ORACLE products, including at 
  22.     least one SQL*Net protocol.
  23.  
  24.     Product                                  Version
  25.     --------------------------------         -----------
  26.     ORACLE Installer                         3.0.8.3.7
  27.     Required Support Files                   7.0.12.1.0
  28.     SQL*Net Named Pipes for Windows          1.1.1.3
  29.     SQL*Net SPX for Windows                  1.1.1.5
  30.     SQL*Net TCP/IP for Windows               1.1.7.6
  31.  
  32. 2.  Test your current SQL*Net connection by using an ORACLE tool such as 
  33.     SQL*Plus for Windows.
  34.  
  35. 3.  Search for and delete all copies of ORA6WIN.DLL from your system. A new
  36.     (backwards compatible) version of ORA6WIN.DLL will be installed with the
  37.     ODBC ORACLE driver.
  38.  
  39. 4.  Run the ORACLE Installer program. When asked for your ORACLE installation
  40.     directory, use the suggested default directory C:\ORAWIN.
  41.  
  42. 5.  Run the ORACLE Installer in the ORACLE group in the Program Manager:
  43.  
  44.     a) Install the files from the Required Support Files disk.
  45.  
  46.     b) Install the SQL*Net protocol you will be using. For more information,
  47.        see the ORACLE documentation.
  48.  
  49. 6.  If the following line exists, remove it from your AUTOEXEC.BAT file:
  50.  
  51.       SET CONFIG=<oracle_configuration_file>
  52.  
  53.     Add the following line to your AUTOEXEC.BAT file:
  54.  
  55.       SET CONFIG_FILES=C:\WINDOWS\ORACLE.INI
  56.  
  57.     NOTE: If you are using the MS-DOS 6.0 operating system, add the following 
  58.     line to the end of your AUTOEXEC.BAT file:
  59.  
  60.       SET CONFIG=
  61.  
  62.     ORACLE Server first checks the CONFIG environment variable for the path of
  63.     the ORACLE configuration file. If the CONFIG variable is not set, ORACLE
  64.     Server checks the CONFIG_FILES variable. Because MS-DOS 6.0 can use the 
  65.     CONFIG environment variable during system startup, you must clear this 
  66.     variable before leaving your AUTOEXEC.BAT file. Otherwise, ORACLE Server 
  67.     will use its value as the path of the ORACLE configuration file.
  68.  
  69. 7.  Make sure your PATH variable includes the BIN subdirectories of your
  70.     <oraclehome> directory and the \ORAWIN directory. For example, if your
  71.     <oraclehome> directory is C:\ORACLE6, add the following line to your
  72.     AUTOEXEC.BAT file:
  73.  
  74.       SET PATH=%PATH%;C:\ORACLE6\BIN;C:\ORAWIN\BIN
  75.  
  76. 8.  Paste the contents of your CONFIG.ORA file at the start of your
  77.     ORACLE.INI file. For example, if your CONFIG.ORA file contains:
  78.  
  79.       LANGUAGE=American_America.US7ASCII
  80.       ORACLE_HOME=C:\ORACLE6
  81.       MACHINE_TYPE=J
  82.       SQLPATH=C:\ORACLE6
  83.       WIN_REMOTE_SESSIONS=3
  84.       LOCAL=p:MyServer
  85.  
  86.     and your ORACLE.INI file contains:
  87.  
  88.       [Oracle]
  89.       ORACLE_HOME=C:\ORAWIN
  90.       LANGUAGE=American_America.US7ASCII
  91.       NLS_LANG=ENGLISH
  92.       WIN_LOCAL_SESSIONS=1
  93.       TCP_VENDOR=LANMAN
  94.       TCP_SERVICES_FILE=C:\WINDOWS\SERVICES
  95.  
  96.     then your modified ORACLE.INI file should contain:
  97.  
  98.       LANGUAGE=American_America.US7ASCII
  99.       ORACLE_HOME=C:\ORACLE6
  100.       MACHINE_TYPE=J
  101.       SQLPATH=C:\ORACLE6
  102.       WIN_REMOTE_SESSIONS=3
  103.       LOCAL=p:MyServer
  104.       
  105.       [Oracle]
  106.       ORACLE_HOME=C:\ORAWIN
  107.       LANGUAGE=American_America.US7ASCII
  108.       NLS_LANG=ENGLISH
  109.       WIN_LOCAL_SESSIONS=1
  110.       TCP_VENDOR=LANMAN
  111.       TCP_SERVICES_FILE=C:\WINDOWS\SERVICES
  112.  
  113.     Note that the ORACLE_HOME variable is set twice, once to point to the
  114.     version 6 <oraclehome> directory and once to point to C:\ORAWIN.
  115.  
  116. 9.  If it is not already running, start Windows. Insert the ODBC Setup disk 
  117.     in drive A, choose Run from the Windows Program Manager (or File Manager)
  118.     File menu, and then type "a:\setup.exe" in the Command Line box. For 
  119.     information about using the ODBC Setup program, see the online Help.
  120.  
  121. 10. Run the ODBC Control Panel option and add a data source for your ORACLE
  122.     server. For information about using the ODBC Control Panel option, see
  123.     the online Help.
  124.  
  125. You should now be able to run the ODBC ORACLE driver. You should also be 
  126. able to run ORACLE version 6 and version 7 tools and applications written for 
  127. Windows. All of these can run over SQL*Net for Windows DLLs.
  128.  
  129. NOTE:  Due to differences in memory use, this configuration may not allow you 
  130. to run ORACLE MS-DOS-only tools or applications.
  131.  
  132.  
  133. If ORACLE Server is not installed on your system
  134. ------------------------------------------------
  135.  
  136. To set up the ODBC ORACLE driver and the SQL*Net for Windows DLLs if you do not
  137. have any versions of ORACLE Server on your system:
  138.  
  139. 1.  Make sure that you have the correct versions of ORACLE products, including 
  140.     at least one SQL*Net protocol.
  141.  
  142.     Product                                  Version
  143.     --------------------------------         -----------
  144.     ORACLE Installer                         3.0.8.3.7
  145.     Required Support Files                   7.0.12.1.0
  146.     SQL*Net Named Pipes for Windows          1.1.1.3
  147.     SQL*Net SPX for Windows                  1.1.1.5
  148.     SQL*Net TCP/IP for Windows               1.1.7.6
  149.  
  150.  
  151. 2.  Install the network software connecting your client workstation to the
  152.     server and check that a connection can be made. For example, for the 
  153.     TCP/IP protocol, type "ping <servername>". This connection must work 
  154.     before you install the SQL*Net for Windows DLLs.
  155.  
  156. 3.  Run the ORACLE Installer program. When asked for your ORACLE installation
  157.     directory, use the suggested default directory C:\ORAWIN.
  158.  
  159. 4.  Run the ORACLE Installer in the ORACLE group in the Program Manager:
  160.  
  161.     a) Install the files from the Required Support Files disk.
  162.  
  163.     b) Install the SQL*Net protocol you will be using. For more information,
  164.        see the ORACLE documentation.
  165.  
  166. 5.  Add the following line to your AUTOEXEC.BAT file:
  167.  
  168.       SET CONFIG_FILES=C:\WINDOWS\ORACLE.INI
  169.  
  170.     NOTE: If you are using MS-DOS 6.0, add the following line to the end 
  171.     of your AUTOEXEC.BAT file:
  172.  
  173.       SET CONFIG=
  174.  
  175.     ORACLE Server first checks the CONFIG environment variable for the path of
  176.     the ORACLE configuration file. If the CONFIG variable is not set, ORACLE
  177.     Server checks the CONFIG_FILES variable. Because MS-DOS 6.0 can use the 
  178.     CONFIG environment variable during system startup, you must clear this 
  179.     variable before leaving your AUTOEXEC.BAT file. Otherwise, ORACLE Server 
  180.     will use its value as the path of the ORACLE configuration file.
  181.  
  182. 6.  Make sure your PATH variable includes the C:\ORAWIN\BIN directory. To do
  183.     this, add the following line to your AUTOEXEC.BAT file:
  184.  
  185.       SET PATH=%PATH%;C:\ORAWIN\BIN
  186.  
  187. 7.  So that the ODBC ORACLE driver can use ORACLE version 7 error messages, 
  188.     copy the version 7 error messages to the directory where the ODBC
  189.     ORACLE driver searches for error messages:
  190.  
  191.       COPY C:\ORAWIN\RDBMS70\*.MSB C:\ORAWIN\DBS
  192.  
  193. 8.  Search for and delete all copies of ORA6WIN.DLL from your system. A new
  194.     (backwards compatible) version of ORA6WIN.DLL will be installed with the
  195.     ODBC ORACLE driver.
  196.  
  197. 9.  If it is not already running, start Windows. Insert the ODBC Setup disk
  198.     in drive A, choose