Draft HOW-TO on Connecting to Linux ASE from Windows

This document was provided by Shaun Lipscombe, but is maintained by me (Michael Peppler)

Disclaimer: This document is available for free and I take no responibilty for any problems you may encounter resulting from the use of this document.

  1. Read and follow through /opt/sybase/doc/howto/howto-ase-quickstart.html.
  2. You should be able to connect by typing /opt/sybase/bin/isql -Usa. If not got back to 1. and work out why.
  3. Find some ODBC Drivers :) Contact Sybase (see http://www.sybase.com/ for contact information) they have ODBC drivers by the part number of: 26946 and they cost me (GBP) 105 plus (GBP) 15 delivery. Along with the 32-Bit ODBC Drivers you get an ODBC Reference Guide.

    Failing that, take a look at:

    http://java.sun.com/javareel/isv/Simba/products/sybase.html
    http://www.openlinksw.com

    OR alternatively if you want to try out some ODBC drivers without any initial outlay you can download the Adaptive Server Enterprise (ASE) Evaluation for Windows NT. You can also obtain this on CD (which is what i did). When you stick it in, it should auto-run (annoying) and prompt you to install client products for windows 95 etc. This will also install isql and wisql which you will have to obtain anyway if you are to use the afore mentioned drivers. You can also install the microsoft SQL server drivers as these work too. This is because SQL server was based on an earlier version (dunno which [actually version 4.2 -- Michael]) of Sybase. If you are using MS SQL Server Drivers there is already a HOW-TO kinda thing like this around in this list somewhere. Go search www.dejanews.com as it explains how to setup M$ drivers.

  4. Reboot and while the computer is rebooting make some coffee.
  5. Get to the control panel via your favorite method as you can get to it in a variety of ways.
  6. Double-click the ODBC icon. It should be labelled 32bit ODBC. Select the System DSN tab. Click the 'add' button. Select your ODBC driver that you cunningly installed in step 3. For 'Data Source Name' you can use anything descriptive, so enter 'Sybase' or something. For 'Server Name' you enter the server name. It is important to make sure that this name can actually be resolved. So check your \windows\hosts file or DNS if you are using DNS. Basically if you can telnet to the server, on the port you set it up to run on, by typing telnet server_name 7100 if you followed the quick-howto, you should connect and be presented with a blank screen. If you get no route to host, or some such error message you need to resolve this first. For database name enter the database name that you entered during the setup of your database in step 1. This is 'Sybase' in the example. OK thats it. This is, I think, all you need. You may need less and you can certainly enter more stuff on the Advanced tabs and connection tab for example. Its best to keep things simple for now though.
  7. OK. You should now have a cold cup of Coffee that you made in Step 4. Good, because mine went cold writing this document. You now need to edit the mythical sql.ini file. Open c:\Sybase\ini\sql.ini using your favorite text editor (GNU Emacs 20.3 port would be overkill but has a nice sql editing mode but enough about that). In your file you should enter the following:
     [MYSERVERNAME] 
     query=NLWNSCK,my.server.name,7100
     win3_query=WNLWNSCK,my.server.name,7100
    
    N.B. There is some kind of control character at the end of the sql.ini file. I would recommend that you *dont* delete it. It may not matter but i just *might*, i dunno. This just sets what network library you use: nlwnsck.dll and wnlwnsck.dll. Don't ask me what all the different libraries are for because i only know 1% more than a clueless newbie. I would expect that it is for different 'transport' types. Oracle requests this information when setting up sqlnet so i suppose its similar. Obviously you enter your FQDN (fully qualified domain name) instead of my.server.name.
  8. Open up a DOS prompt. Run c:\Sybase\bin\isql -Usa -S ServerName. For password it is blank. Your prompt should turn to a typical second level unix prompt with a number 1 before it: '1>'.
  9. Congratulations you can now connect to your linux box and stuff. The hard bit about connecting is fathoming what the cryptic error messages mean.
    Shaun Lipscombe
    Last modified: Fri Feb 19 08:11:03 PST 1999