Friday, July 9, 2010

Missing Sybase Adaptive Server Anywhere 7.0 ODBC Driver

Somehow my Server's ASA ODBC Driver is missing, I can still see all the DSN created using ASA ODBC Driver, but can't open them anymore. It's probably due to the Install/Uninstall Sybase Persoanl Server/Network Server. I was googling to find whether there's Sybase ASA ODBC Driver installation package I can download and install, but no success. Then I came cross articles on Sybase's website. Accroding to these articles, we can re-register the driver using regsvr32 or manually change Registry.

***********************************************************************************
******************************** ********************************************
********************************Article 1********************************************
******************************** *******************************************
***********************************************************************************

http://www.sybase.com/detail?id=1056404

The following error occurs because the ODBC driver settings or registry keys have been removed from the registry. There are two ways you can fix this error.

1056404.gif

Solution 1

The first solution is to re-register the ODBC driver:
  1. At a command prompt, navigate to the Pylon Anywhere installation directory (for example, C:\Program Files\Sybase\Pylon Anywhere\DB).
  2. Run the following command:

    regsvr32 dbodbc9.dll
Now you should be able to edit the Pylon Anywhere data source from the ODBC Data Source Administrator.

Solution 2

The second solution requires you to edit the registry:
  1. Choose Start > Run.
  2. Type Regedit
  3. Navigate to the following key:
    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
  4. Create a new key under this key called Adaptive Server Anywhere 9.0
  5. Under Adaptive Server Anywhere 9.0, create the three strings shown in the following screenshot:
    1056404_2.gif
  6. Under the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers, create the string Adaptive Server Anywhere 9.0 with the value Installed
  7. Close the registry.
    You should be able to edit the ODBC data source or add a new data source.
***********************************************************************************
***********************************************************************************
********************************Article 2********************************************
***********************************************************************************
***********************************************************************************

http://www.sybase.com/detail?id=1055887

Protect the ODBC Drivers

By Paul A. Horan

Recently, one of our client sites started reporting strange system errors with our software. For days, we tried to recreate the issue in our labs, but were unsuccessful. When we finally opened a remote desktop sharing session to the individual user's PC, we noticed that the ODBC driver files for SQL Anywhere were for a much older build of the same version.

They had installed another SQL Anywhere-based software product, and that package's setup routine had overwritten our existing ODBC driver files. Since both software packages were written to use the "Adaptive Server Anywhere n.n" driver, we were essentially "sharing" that middleware layer.

Our solution for avoiding this problem was to isolate our installation of the Adaptive Server Anywhere ODBC driver, and "brand" it with our company name. That gave us total control over the software, and protected us from getting overwritten by any other software setup routines.

Since ODBC profiles are really nothing more than Registry entries, the technique for doing this is as follows:

  1. Place the Adaptive Server Anywhere deployment drivers into a separate location on the server or workstation. In other words, don't use the standard %ASA%\win32 folder.
  1. Create a new Registry Key in: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
    that identifies your installed driver name. We called ours "VCI Adaptive Server Anywhere"
  1. Create two string values under this key, DRIVER and SETUP that point to the location of your installed Adaptive Server Anywhere driver files;
  1. Create a new string value in:
    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers
    with the name of your specific driver name (created in step #2 above), and the value "Installed";
  1. Now, when creating individual ODBC profiles for your application, use your renamed ODBC driver, not the standard "Adaptive Server Anywhere n.n" driver.

    Protect the ODBC Drivers

2 comments:

MichaƂ Ulman said...

Mate thanks! You saved my life. 1-st solution works very fine.

Alejandro Belmar said...

Hi, I follow all the steps and i get the following error "can't load the install procedures because an error: 193.

Please sombody helpme. thanks
c