Hsodbc

Hi
I followe these url and step to connect from Oracle to sqlserver
http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
SERVER X -- SYBASE
SERVER Z -- ORACLE DATABASE
Below is a series of steps that are needed to set up the hetergeneous services. The actual code will be discussed following these steps.
1. Install ODBC drivers on the server (server X) that is to actually access the Sybase database.
2. Setup the ODBC connection on server X using the Windows ODBC Data Source Administrator
3. Test the ODBC drivers to ensure that connectivity is made to the non-Oracle database.
4. Ensure the Global_names parameter is set to False.
5. Install an Oracle server (or code tree) or an Oracle database on the same server (server X) as the ODBC drivers.
6. Configure the Hetergeneous services. This consists of creating an initodbc.ora file within the Oracle installation on server X.
7. Modify the Listener.ora file on server X used to connect to the Oracle instance and ODBC drivers.
8. Modify the Tnsnames.ora file on server Z . This is the Oracle database installation accessed by the users to connect to the ODBC drivers
9. Reload the listener on server X
10. Create a database link on the Oracle installation (server Z) that accesses the heterogeneous connection.
11. Run a Select statement for the Oracle installation (server Z) using the database link
I have some question regarding this notes
STEP 4 --- IN machine i need to check Global_Nmaes parameter
STEP 5 --- Install oracle code tree in SERVER X (what is this code tree) is this need
to install on where my sqlserver running
step 6 & 7 -- is this hetrogeneous service need to configure on sqlserver side
pls advise
rds

You need to get Oracle Software and ODBC driver on one server and you have two alternatives:
1)Install ODBC driver for MSSQL on your Linux server
there are some commercial ODBC drivers for MSSQL supported on Linux, for example:
DataDirect http://www.datadirect.com/products/odbc/odbc-sqlserver/index.ssp
OpenLinkSW http://uda.openlinksw.com/odbc/
there is also an opensource FreeTDS ODBC driver: http://freetds.org/
In this alternative, you don't need any Oracle Software on your MSSQL server.
For instruction on setting Generic Connectivity with FreeTDS on Linux see http://www.dbapool.com/articles/06280701.html
2)If you cannot install ODBC driver on Linux Server, than you must install some Oracle SW on your MSSQL Server
You can use the solution described in your original post and install Oracle DB software on your MSSQL server. I must say that I didn't know that this is possible before reading your post. I allways thought that Generic Connectivity must run on the same server as Oracle Database. But if the article says that it works, you can try it.
There is also a new mechanism called "Oracle Database Gateway for ODBC" that is a new generation of what was formerly called Generic Connectivity. It's part of 11g, but you can use it with former versions of Oracle DB also. You will find "Oracle Database Gateways" on Oracle Database 11g download page.
Gateway for ODBC can officialy be installed on separate server. http://download.oracle.com/docs/cd/B28359_01/gateways.111/e10311/intro.htm#i1005931. The rest of the configuration seem the same as with former versions of Generic Connectivity.
You seem to have access to Metalink, so look for Note 466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit.
Hope it helps. Unfortunately I have no practical experience with configuring Generic Connectivity/Gateway for ODBC on Linux.

Similar Messages

  • XLS upload via HSODBC. Unable to upload numeric (float) fields

    hi,
    I wrote a program unit with Oracle Forms Builder 10g to upload and read an Excel sheet.
    I created a HSODBC Data link to my DB, and used Excel 2003 to edit the XLS file to upload, and WEBUTIL_FILE_TRANSFER.CLIENT_TO_AS(client_dir_file,'\\server\dir\myfile.xls') to upload.
    My DBLink works and Im able to upload the file. But it seems oracle is unable to upload some fields containing numeric (float) values.
    running DESCRIBE Sheet1$@hsodbc; I got this table structure
    UPLOAD_DATE          DATE
    NUMBER VARCHAR2(32512 CHAR)
    CODE VARCHAR2(32512 CHAR)
    DESCR          VARCHAR2(32512 CHAR)
    SIMILARS FLOAT(49)
    WIDTH VARCHAR2(32512 CHAR)
    HEIGHT VARCHAR2(32512 CHAR)
    HIGH      VARCHAR2(32512 CHAR)
    ITEMS      FLOAT(49)
    fields SIMILARS, WIDTH, HEIGHT, HIGH, ITEMS contain numeric values in float format (ex: 1,00000). When I run
    SELECT * FROM SHEET1$@HSODBC
    I get that WIDTH, HEIGHT, HIGH columns are EMPTY (contain NULL values), while SIMILARS and ITEMS contains not null values.
    I am sure that the \\server\dir\myfile.xls contains not null values for WIDTH, HEIGHT, HIGH fields! I tried to change cells format before upload, setting them to FLOAT, but I got no results!
    Please help me, how can I do to change cell format in order to obtain a correct upload?

    E.C.
    there is a mistake in the subject. As I said in my thread, the upload works and the uploaded file contains all values. My problem is that I am "unable to READ" the numeric values stored in VARCHAR2 fields.

  • HSODBC not working after upgrade to 11G

    Hi,
    I am having trouble with dblinks that worked under 10G but no longer work after upgrading to 11G. For this installation I am running Oracle on Windows 32 bit
    and am using a Sybase ODBC driver to connect to a Sybase database.
    I did catch the fact that hsodbc has been replaced by dg4odbc and have changed my listener configuration accordingly. However, when I try to use the dblinks I am receiving ORA-28500 errors "Incorrect syntax near 'FROM'"
    Any idea on what the problem might be or how to troubleshoot?
    Thanks!

    This kind of problem is commonly related to the QUOTED IDENTIFIER option within the ODBC driver
    - Open ODBC Admin and step throug the config; you'll find an option:
    EnableQuotedIdentifiers make sure this option is checked.
    -Also make sure you have set in your init<dg4odbc>.ora file the parameter: HS_FDS_SUPPORT_STATISTICS=FALSE

  • Problem on delete from hsodbc data source

    Hello every body
    I configured an hsodbc data souce on a dbase IV data files.
    All DML select, insert and update operations are done correctly.
    But when deleting a row it is said to be deleted (message one row deleted is sent back) , but if i make a new select on that row i find it again in the table.
    Does any body have an idea about the issue.
    Best Regards

    Hi,
    I am having the same problem. Do you have a solution yet?
    It would help me a lot too.
    Thx,
    Jos

  • DB link over HSODBC problem

    I've double and triple checked this and can't seem to find out why I am still getting ora-02063 errors. The connection is to a MSSQL server 2000 database from 10G R2, files configured are as such:
    ================================================================
    tnsnames.ora:
    # tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle configuration tools.
    TFMDEV =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = winms-tfmdev)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = tfmdev)
    FORMAT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = winms-tfmdev)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = format)
    (HS = OK)
    LIMSPROD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = winms-lims)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = limsprod)
    WISPROD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = winms-wooddb)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = wisprod)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    listener.ora:
    # listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = TFMDEV)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    (SID_NAME = TFMDEV)
    (SID_DESC =
    (GLOBAL_DBNAME = format)
    (PROGRAM = hsodbc)
    (SID_NAME = format)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = winms-tfmdev)(PORT = 1521))
    initFORMAT.ora in hs\admin directory:
    # This is a sample agent init file that contains the HS parameters that are
    # needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO = FORMAT
    HS_FDS_TRACE_LEVEL = OFF
    HS_FDS_TRACE_FILE_NAME=c:\orahs1.log
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    ================================================================
    The DSN to the MSSQL database is named "FORMAT", and a dblink has been created with the same name. The dblink checks out ok (active) when testing it, and if I issue a select sysdate from dual@format I get a result.
    However select * from <table>@format nor does select <colname> from <table>@format or select "<colname>" <table>@format, however desc <table>@format does return a list of columns:
    ================================================================
    SQL> desc tblRua@FORMAT;
    Name Null? Type
    strActivityId VARCHAR2(12)
    strAgreementType VARCHAR2(10)
    strSegmentUsed VARCHAR2(50)
    intNumberOfWells NUMBER(5)
    intNumberOfKms FLOAT(23)
    intVolume NUMBER(5)
    strRuaRateType VARCHAR2(10)
    dtmLastUpdateDate DATE
    strUserId VARCHAR2(16)
    SQL> select * from tblRua@FORMAT;
    select * from tblRua@FORMAT
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver][SQL
    Server]Invalid object name 'TBLRUA'.[Microsoft][ODBC SQL Server Driver][SQL
    Server]Statement(s) could not be prepared. (SQL State: S0002; SQL Code: 208)
    ORA-02063: preceding 2 lines from FORMAT
    SQL> select "strActivityId" from tblRua@FORMAT;
    select "strActivityId" from tblRua@FORMAT
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver][SQL
    Server]Invalid object name 'TBLRUA'.[Microsoft][ODBC SQL Server Driver][SQL
    Server]Statement(s) could not be prepared. (SQL State: S0002; SQL Code: 208)
    ORA-02063: preceding 2 lines from FORMAT
    ================================================================
    I have connected to the MSSQL database as the user specified in the dblink with the MSSQL query analyzer and can select the tables no problem, so I know its not a rights issue within MSSQL.
    Am I missing something here?
    TIA

    Since the above worked, you still may want to create the view so you don't have to quote each time you select.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/apc.htm#sthref516
    I would suggest the following:
    create a view which accessess your odbc table. In this view, explicity convert all columns to oracle datatypes. (FLOAT isn't an oracle datatype http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#sthref215) Then select from the view.
    SQL> desc tblRua@FORMAT;
    Name Null? Type
    strActivityId VARCHAR2(12)
    strAgreementType VARCHAR2(10)
    strSegmentUsed VARCHAR2(50)
    intNumberOfWells NUMBER(5)
    intNumberOfKms FLOAT(23)
    intVolume NUMBER(5)
    strRuaRateType VARCHAR2(10)
    dtmLastUpdateDate DATE
    strUserId VARCHAR2(16)
    Message was edited by:
    dbtoo

  • HSODBC connectivity between ORACLE 10g and SQL Server 2008 R2

    Hi,
    I'm getting below error when using the DB link between Oracle (10.2.0.2 which is on Sun Sparc) and MS Sql server 2008 R2.
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC Driver Manager] Data source
    name not found and no default driver specified (SQL State: IM002; SQL Code: 0)
    ORA-02063: preceding 2 lines from SCOPEX.WORLD
    My Config files:
    On Sun Sparc 5.9 where Oracle server is running.
    TelemetryDB1 =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.6.48)(PORT=1522))
    (CONNECT_DATA=(SID=TelemetryDB1))
    (HS=OK)
    Listener.ora file on Windows machine:
    TelemetryDB1 =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.6.48)(PORT=1522))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
    SID_LIST_TelemetryDB1 =
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=TelemetryDB1)
    (ORACLE_HOME=C:\oracle\product\10.2.0\db_1)
    (PROGRAM=hsodbc)
    Tnsnames.ora file:
    TelemetryDB1 =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.6.48)(PORT=1522))
    (CONNECT_DATA=(SID=TelemetryDB1))
    (HS=OK)
    initTelemetryDB1.ora file under ORACLE_HOME\hs\admin\
    HS_FDS_CONNECT_INFO = TelemetryDB1
    HS_FDS_TRACE_LEVEL = OFF
    We have created DNS with TelemetryDB1.
    I'm getting the above error for DB links between Oracle 10.2 and SQL Server 2008 R2. But the same, when configured for MS SQL server 2000 works fine without any issues.
    Please advise me to rectify the error. We've been working for the last couple of weeks.
    Regards,
    Sunil

    Sunil,
    You don't need an Oracle ODBC driver.
    The way it works is that in the gateway init<sid>.ora file, in your case initTelemetryDB1.ora, the parameter HS_FDS_CONNECT_INFO points to a system DSN. This DSN should then be configured to use an ODBC driver to connect to the non-Oracle database. So, in your setup when you want to access the SQL*Server 2008 database then the DSN should use an ODBC driver that can connect to a SQL*Server 2008 database. If you still use the initTelemetryDB1.ora file for the connection then the TelemetryDB1 DSN should be configured to access the SQL*Server 2008 database.
    However, there are a couple of problems with your actual setup -
    - the configuration you have - 10.2 RDBMS on a Sun machine and HSODBC on Windows - is not supported. HSODBC should only be used from a RDBMS that is in the same ORACLE_HOME as HSODBC.
    - 10.2 HSODBC is now desupported and has been replaced by the 11g Database Gateway for ODBC (DG4ODBC) and the configuration you want is supported. That is because unlike HSODBC the DG4ODBC gateway can be installed standalone with a RDBMS being installed.
    I recommend that you download and install 11.20.2 DG4ODBC on your Windows machine in a new Oracle_home and access that from the 10.2 RDBMS on Sun - which is a supported configuration. But to do this, you will need to apply either the 10.2.0.4 or 10.2.0.5 patchset to your RDBMS.
    There is more information in the following note available on My Oracle Support (MOS) -
    Note.1083703.1 Master Note for Oracle Gateway Products
    The 11.2.0.2 DG4ODBC can be downloaded from MOS as patch and for the gateways on Windows 32-bit you just need to download -
    p10098816_112020_platform_4of6.zip
    However, to check the HSODBC ou need to confirm that the DSN used by HSODBC points to a System DSN configured to access SQL*Server 2008.
    Have a look at -
    Note 109730.1 How to setup generic connectivity (HSODBC) for Windows NT
    But remember this is not a supported version or configuration and you should be using Dg4ODBC.
    Regards,
    Mike

  • Missing nvarchar fields in hsodbc connection

    I need read access from an Oracle 10.2.0.4 database (Win 2003 Server) to a MS SQL Server 2005 database using collation: SQL_Latin1_General_CP1_CI_AS. The tables have nvarchar and ntext columns.
    The oracle database has the following nsl_database_parameters set:
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CONV_EXCP FALSE
    I've installed the mssql SQL Native Client and set up a System DSN in the ODBC Data Source Administrator.
    Since I only need read access, I tried using Oracle heterogeneous services (hsodbc) to connect to mssql. I created an init<odbcname>.ora file with the following HS init parameters:
    HS_FDS_CONNECT_INFO = ovsqlserver
    HS_FDS_TRACE_LEVEL = OFF
    HS_NLS_NCHAR = UTF8
    I added the info needed to listener.ora and tnsnames.ora and established a successful connection to the mssql data. Finally, created the needed database link in the Oracle database.
    I can query tables on mssql BUT any column defined as nvarchar or ntext do not show up. Oracle clearly states that if there are datatypes it can't translate, it won't include the column.
    Now I find that HSODBC has been desupported as of 15Mar09 and that one should use DG4ODBC included with the 11g release. Arrgggg!!!
    I installed only the 11.1.0.7 Gateway for ODBC to get the DB4ODBC. Other forum searches state that DB4ODBC only works with an 11.1 listener but I don't have a full install of 11.1 with the requisite libraries.
    So. Is there a way to see the nvarchar columns in my admittedly desupported HSODBC configuration? Is it a char set mismatch issue? Are there other tweaks that have to made to get the ODBC driver or HSODBC to recognize the nvarchar and ntext columns?
    I've been working on various configurations for a week and still no joy. Surely this has been done many times before. Your help would be deeply appreciated.

    Installing DG4ODBC is the correct approach as HSODBC was desupported 15th of March 2008.
    As you have already a 10g installation on this machine, please make sure you install the 11g DG4ODBC into its own Oracle_Home. Installing DG4ODBC will automatically install the SQL*Net Server component containing an 11g listener.
    So just configure the 11g SQL*Net coming with DG4ODBC and you have everything you need and you can then use DG4ODBC with the 11g listener.
    Instructions how to configure DG4ODBC can be found in Metalink note:
    Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit

  • Date handling weirdness in SQLServer hsodbc

    Folks, I am getting some weird stuff happening while using hsodbc for sqlserver, pulling from a view, with sqlserver columns of type datetime.
    Using sqlserver tools I can see that the source data in some instances is for year 1900 (default) and in other cases year 2100 (our future enddate). In both of these cases though a very simple mapping to store the data in Oracle results in getting the year 2000 for both of them. What are my options? What is the reason for this condition?
    Thanks in advance.
    Regards,
    ak

    Could be related to the NLS_DATE_FORMAT setting.
    Just inserted dates with year 1900 and 2100 into a SQL Server demo table.
    At the ODBC driver manager make sure MS SQL Server ODBC driver does NOT have the use regional setting for outputting currency, numbers, dates and times checked.
    SQL> alter session set nls_date_format='dd.mm.yyyy';
    SQL> select * from "datetest"@sqlserver where "col1" < to_date('10.02.2005','dd.mm.yyyy');
    col1
    30.01.1900
    10.01.1900
    10.12.1900
    SQL> select * from "datetest"@sqlserver where "col1" > to_date('10.02.2008','dd.mm.yyyy');
    col1
    10.02.2100
    10.01.2100
    30.01.2100
    BUT:
    SQL> alter session set nls_date_format='dd-mon-rr';
    Session altered.
    SQL> select * from "datetest"@sqlserver where "col1" > to_date('10.02.2008','dd.mm.yyyy');
    col1
    10-feb-00
    10-jan-00
    30-jan-00
    SQL> select * from "datetest"@sqlserver where "col1" < to_date('10.02.2005','dd.mm.yyyy');
    col1
    30-jan-00
    10-jan-00
    10-dec-00
    So please make sure the NLS_DATE_FORMAT is properly set AND the option in the ODBC driver is unchecked.
    A couple of issues are also mentioned in:
    Article-ID: Note 69029.1
    Title: Implicit DATE Conversions - Issues to be aware of

  • Oracle HSODBC (Help Document)

    Hi All,
    I've used HSODBC on Windows platform with MS Access. I prepared a document for my reference may be it is bit helpful to you also.
    Any suggestion and comment is highly appreciated.
    Oracle's Heterogeneous Services (HS)
    Heterogeneous Services (HS) is an integrated component within the Oracle database server and provides the generic technology for accessing non-Oracle systems from the Oracle database server. Heterogeneous Services enables you to use Oracle SQL statements to transparently access data stored in non-Oracle systems as if the data resided within an Oracle database server. To access a non-Oracle system, you need to use a Heterogeneous Services agent. If you connect to the non-Oracle system using generic connectivity through the ODBC or OLE DB interfaces, the agent is an executable that it automatically installed with the Oracle database server.
    Although HS service can be configured to work with variety databases like MS Access, MS Excel, SQL Server etc. This article shows how Oracle's Heterogeneous Services can be configured to connect to a Microsoft Access database using standard databases link. The method described can be used to connect to MS-Access from about any platform - Unix/Linux or Windows.
    The Generic Connectivity utility needs data dictionary tables in the Oracle Database. To check their existence, run a query on
    i.e. SYS.HS_FDS_CLASS.
    If it fails, run the caths.sql script located in
    <ORACLE_HOME>\network\admin\caths.sql
    as user sys or internal.
    In this article the platform used is windows.
         ORACLE_HOME = <ORACLE_HOME>
         MS Access file is      C:\MDB_HSODBC.mdb
    Necessary Components:
    ·     Oracle Database (with HS component installed).–Check for the <ORACLE_HOME>HS directory if it is not there you need to install HS service in oracle.
    ·     Oracle Network and Database Listener.
    ·     ODBC driver for your data source (EXCEL, ACCESS, etc)
    Following components need to be configured:
    ·     ODBC driver for the data source.
    ·     Database Listener (listener.ora).
    ·     Network Client (tnsnames.ora).
    ·     Heterogeneous Services (init_odbc_data_source.ora) (sqlnet.ora).
    ·     Database Link.
    For this example I will be querying an MS Access (MDB_HSODBC.mdb) from SQL*Plus. Following is the step by step procedure to configure these components.
    1. ODBC Data Source configuration:
    Start -> Settings
    Control Panel
    Administrative Tools
    Data Sources (ODBC)
    Select System DSN Tab
    Click on Add button
    Select appropriate driver in my case it is MS Access to work with so I selected the highlighted driver.
    1.     Enter appropriate Data Source Name (DSN_ACCESS in my example).
    2.     Enter description if you want it to be (optional).
    3.     Click on select button and Browse you mdb file.
    2. Database Listener configuration:
    Here is a sample LISTENER.ORA entry that can be used. Change the HOST, PORT and ORACLE_HOME entries to match your setup. You may also use a different SID_NAME if required.
    <ORACLE_HOME>\network\admin\listener.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = access_25)(PORT = 1524))
    Port     à Your port number must match with the port number of TNS in next step.     
    access_25 à Is the name of machine where oracle is installed. You can use IP address.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = hsodbc)          ß hsodbc program needs to be called.     
    (SID_NAME = SID_HSODBC)     ß Your SID Name. (must be a valid name)
    (ORACLE_HOME = <ORACLE_HOME>)
    You can add your entries in existing DESCRIPTION_LIST & SID_LIST after adding you entries you file would look something like this.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC3))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = access_25)(PORT = 1524))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = <ORACLE_HOME>)
    (PROGRAM = extproc)
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = SID_HSODBC)
    (ORACLE_HOME = <ORACLE_HOME>)
    Note:- when listener configuration is over you need to restart your listener in order to accept changes you have made.
    3. Network Client (TNS) configuration:
    Let us move on the next step i.e. configuration of tnsnames.ora file.
    <ORACLE_HOME>\network\admin\tnsnames.ora
    TNS_HSODBC=
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =access_25)(PORT = 1524))
    (CONNECT_DATA =
    (SERVICE_NAME = SID_HSODBC)
    (HS=OK)
    1.     You can use any valid name for you TNS in my case it is TNS_HSODBC
    2.     Your port number must match with the port number of listener of previous step.
    3.     Your SID is the SID_NAME that you have entered in listener’s file.
    4.     You must add (HS=OK) in this entry it tells oracle to use Heterogeneous Service.
    4. Heterogeneous Services configuration:
    <ORACLE_HOME>\hs\admin\init******.ora
    ****** à Is SID_NAME you have given in step 2.
    If your SID_NAME is ABC the file should be initabc.ora this name must match with your SID_NAME. This file doesn’t get created automatically but you need to create this. There is a file named inithsodbc.ora copy and paste this file and simply change the name accordingly. If your SID_NAME is hsodbc then no need to create a file you can modify existing file.
    In my example it is initSID_HSODBC.ora
    HS_FDS_CONNECT_INFO = DSN_ACCESS     à DSN Name of Step 1.
    HS_FDS_TRACE_LEVEL = off
    HS_NLS_DATE_LANGUAGE ='DD-MM-YYYY'
    HS_NLS_DATE_FORMAT ='DD-MM-YYYY'
    One more file needs to modified i.e. sqlnet.ora here are the steps.
    <ORACLE_HOME>\network\admin\sqlnet.ora
    If there are parameters like
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
    You must comment it out or modify to
    SQLNET.AUTHENTICATION_SERVICES= (NONE)
    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
    We have completed HS configuration let us move on to the next step to use it and get it worked.
    5. Database Link creation:
    CREATE PUBLIC DATABASE LINK LNK_HSODBC
    CONNECT TO DB_ACCESS
    IDENTIFIED BY DB_PASSWORD
    USING ‘TNS_HSODBC’ ;     
    DB_ACCESS           à User Name “Can be anything doesn’t matter”.
    DB_PASSWORD     à If you have password in MS Access database then it                     must match that password otherwise it can be                          anything but you need to mention it.     
    SELECT
    FROM
    STU_DTL@LNK_HSODBC ;
    STU_DTL      à     Table Name in MS Access database.
    If you want to make your query more simpler you can create synonym for your database link.
         CREATE PUBLIC SYNONYM SYNO_HSODBC     à Synonym Name.
              FOR STU_DTL@LNK_HSODBC ;
    Now you can query data source using synonym. This is just a shortcut.
    SELECT
    FROM
    SYNO_HSODBC ;
    Thanks & Regards
    Manoj
    Message was edited by:
    Manoj91

    as stated above.
    You have to move the listener service from the LOCAL SYSTEM account into a user account which has access to the remote computer share.
    Then yu have to change the DSN and replace the MDB file location to use UNC naming like \\machine\share\file.mdb
    Backgroung:
    LOCAL SYSTEM user can't access any shares due to security reasons. Thus you have to specify a dediacted user account which has sufficient permissions to access the remote computer.
    UNC naming must be used as drive letter shares are only available as soon as the user logged on. Commonly nobody is logged on at the Oracle database server and thus the driver letter share is not availbale. Thus using UNC naming is required.

  • Multiple Instance of HSODBC.EXE

    Hi,
    I'm using Oracle 8.1.7.4 (W2K) with heterogeneous services to connect via dblink to DB2/400.
    I can read successfully several tables from AS400; but a multiple instance of 'hsodbc.exe' ( i.e. one task for one interrogation) are created on task manager.
    If I try to end a hsodbc I can't.
    After several interrogation, I can't use again hsodbc and the system returns the following error:
    ORA-28500 [Generic Connectivity Using ODBC] a dynamic link library (DLL) initialization routine failed; at FIND_IMAGE_SYMBOL
    cannot connect to shareable nvdbodbc. Using dummy function
    Initialization function ODBC not found.
    ORA-02063
    Is there any particular configuration of heterogeneous services that avoid a multiple instance of 'hsodbc.exe' ?
    This is a serious problem for us.
    Regards
    Andrea

    Andrea,
    this normally indicates, that an established session is not correctly ended.
    In general you need to close database links after you do not need them anymore.
    A SQL*Plus session for example querying from the remote database will normally close the db link automatically while ending the SQL*Plus session.
    Sometimes it could happen, that you end SQLÜPlus during long runnning queries; in this situaotion it might happen, that hsodbc will stay in the mmory. To get rid of those hsodbc processes, you may use pskill from www.sysinternals.com.
    If the hsodbc processes are spawned by frequentyl running job systems, you need to close the database link manually afterwards.
    alter session close database link <db link name>;

  • ORA-28522 error when reading data from DB2 via hsodbc

    Hi All,
    I'm trying to connect to a DB2 database running on an AS/400 system, via Oracle HS.
    I'm using Oracle 9.2.08. The DB2 version is V4R5.
    My ODBC DSN is called TEST_odbc.
    The initTEST_sid.ora file contains the following:
    HS_FDS_CONNECT_INFO = TEST_odbc
    My Listener.ora file contains the following:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = vm-dashboarddemo)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = hsodbc)
    (ORACLE_HOME = D:\oracle\ora92)
    (SID_NAME = TEST_sid)
    My TNSNames.ora file contains:
    TEST_name =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = VM-DASHBOARDDEMO)(PORT = 1521))
    (CONNECT_DATA =
    (SID = TEST_sid)
    (HS = OK)
    When I use TNSPing, I get a successful result:
    D:\oracle\ora92\bin>tnsping TEST_name
    TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 04-JUL-20
    07 13:46:47
    Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
    Used parameter files:
    D:\oracle\ora92\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = VM-DASHBOARDDEMO)(PORT = 1521))) (CONNECT_DATA = (SID = TEST_sid)) (HS =
    OK))
    OK (10 msec)
    I can then login to SQLPlus as SYSDBA, and create a database link:
    SQL> create database link TEST_link connect to "<username>" identified by "<password>" using 'TEST_name';
    Database link created.
    So far everything seems to be going well.
    But then, when I try and select some data from the linked database, i get the following:
    SQL> select * from <tablename>@TEST_link;
    select * from <tablename>@TEST_link
    ERROR at line 1:
    ORA-00942: table or view does not exist
    [Generic Connectivity Using ODBC][IBM][Client Access Express ODBC Driver
    (32-bit)][DB2/400 SQL]SQL0204 - ZASTSE00 in QGPL type *FILE not found. (SQL
    State: S0002; SQL Code: -204)
    ORA-02063: preceding 2 lines from TEST_LINK
    Does anyone have any ideas? I'd love to get this solved!!
    Many Many Thanks,
    River

    I should have mentioned that I know that the table exists in the database.
    The main reason I'm trying to do this is because I'm trying to get the data from the DB2 DB into my Oracle DB. I have been trying the EXP utility, which gives me a different error code:
    D:\oracle\ora92\bin>exp <username>/<password>@TEST_name file=TEST.dmp rows=yes indexes=no
    Export: Release 9.2.0.8.0 - Production on Wed Jul 4 13:44:06 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    EXP-00056: ORACLE error 3113 encountered
    ORA-03113: end-of-file on communication channel
    Username: <username>
    Password:
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    Note: indexes on tables will not be exported
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user <username>
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user <username>
    EXP-00008: ORACLE error 942 encountered
    ORA-00942: table or view does not exist
    EXP-00024: Export views not installed, please notify your DBA
    EXP-00000: Export terminated unsuccessfully
    Thanks Again,
    Riv

  • Hsodbc returns nothing :::Plz Help me :)

    Hi to all,
    I try to connect Oracle DB to Mysql database. I did these steps :
    1- Testing MySQL ODBC Driver using isql => Works fine
    2- Configuring the HSODBC process , my listner.ora file contains these entries :
    # listener.ora Network Configuration File: /u01/app/oracle/oracle/product/10.2.0/devxen03/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/oracle/product/10.2.0/devxen03)
    (PROGRAM = extproc)
    (SID_DESC =
    (PROGRAM = hsodbc)
    (ORACLE_HOME = /u01/app/oracle/oracle/product/10.2.0/devxen03)
    (SID_NAME =my_client)
    (ENVS = "LD_LIBRARY_PATH=/u01/app/oracle/oracle/product/10.2.0/devxen03/lib32:/usr/lib:/u01/app/oracle/oracle/product/10.2.0/devxen03/hs/lib32")
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = devxen03.es.el.lan)(PORT = 1521))
    when I tried; hsodbc in command line : nothing comes back from this command
    Any idea please? I(m working on Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 on linux redhat server.
    Thanks a lot,
    Edited by: OracleJavaLinux on Dec 1, 2009 3:20 PM

    Thanks ora-dba;
    it means returns nothing without errors;
    But strange I got erros when I execute the command below, any idea? :
    *[root@devxen03 ~]# strace /u01/app/oracle/oracle/product/10.2.0/devxen03/bin/hsodbc*
    *execve("/u01/app/oracle/oracle/product/10.2.0/devxen03/bin/hsodbc", ["/u01/app/oracle/oracle/product/1"...], [* 26 vars */]) = -1 ENOEXEC (Exec format error)*
    dup(2)                                  = 3
    fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
    *fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0*
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95557000
    lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
    write(3, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
    *) = 32*
    close(3)                                = 0
    munmap(0x2a95557000, 4096)              = 0
    exit_group(1)                           = ?
    *[root@devxen03 ~]# echo $?*
    *0*

  • HSODBC.EXE Performance

    I'm testing HS performance between our Oracle(NT) servers and AS/400.
    A query that takes 3 seconds on our Dev server takes 30+ seconds on our Prod server. I can't find anything different between the two environments, here is a list of everything I've checked:
    1.     EXPLAIN_PLAN of query
    2.     INIT<sid>.ORA files
    3.     Data in HS_* tables
    4.     PING and TRACERT between Oracle and AS/400 servers
    5.     ODBC drivers and configuration
    6.     HSODBC.EXE activity in NT Task Manager
    I've combed through the log files and can't find anything. One difference is that our Prod server is a more powerful machine with 2 processors.
    Can anybody recommend anything else to check or what kind of diagnostics to run?
    Thanks,
    Willy Vancrey

    This might happen if you are using shared sockets.
    Shared sockets means you have defined for example 1521 port in the listener and then all connections spawned by the listener are also using the 1521 port.
    This is a cool feature as your firewall needs to open only the listener port. The disadvantage is that if you stop the listener you won't get it online anymore as long as there is any connection allocating this 1521 port.
    A while ago before Windows TCP/IP stack V2 Windows didn't support the shared socket mechanis and your connection got redirected to a randomly choosen port#.
    Here you had to open all ports for SQL*Net connections; but not many Firewall vendors implemented the SQL*Net filter. The big advantage of this method was all connections had a several port and thus you could stop/start the listsnser all the time.
    As far as I have seen sutting down is in most cases possible, but a restart of the listener will fails as long as any active process like hsodbc (or even database connections) are allocating the listener port.
    Here the only chance is to kill all processes allocating the listener port.
    Shared sockets are enabled on Windows using the registry or environment parameter use_shared_socket.
    Please have a look at Metalink for more details.

  • Column truncated using hsodbc to AS400

    Hi,
    I appreciate if there any of can help me.
    Is there limitation on hsodbc when retrieve or writing character more then 255 character from non Oracle via hsodbc ?
    I'm using Oracle 8.1.6.3 to read and write record to AS400 using client access ODBC. I need to read from and write to a column of character 500 type. But without any error the result is truncated to 254 character. I use a view to split the 500char column into 3 smaller column and it succeed for read operation, but I cannot write to it.
    I have try to read on write with the same ODBC using Oracle Forms without hsodbc with success. So I believe it is about hsodbc, no ODBC driver.
    So is there any limitation, or any parameter to change on hsodbc ?
    Thank you for any help
    Frans.

    Frans,
    Yes there was a limitation in hsodbc v8.1.6. This has been fixed for v9.2 and a patch is available for v9.0.1.

  • Missing hsodbc executable

    Hi all
    I have a fresh 10.2.0.4 install on Windows 2003 64 bit. I am trying to replicate some db links to SQL Server, but am having no joy. Two things I have noticed that are different from another, working installation are:
    # there is no hsodbc application in ORACLE_HOME\bin
    # there are missing entries for the ODBC connection classes in the sys.hs_fds_class table
    I assume these are related in some way. Therefore, how can I confirm HSODBC has been installed, and if not, can I use OUI to add it in?
    Ta
    bt

    Generic Connectivity (aka HSODBC) is not available for the Windows 64-bit platform.
    You have to download and install the Oracle Database Gateway for ODBC (DG4ODBC) 11g on a 32-bit OS, for example on the same host which runs SQL Server.
    You can use your 10.2.0.4.0 64-bit database to connect through this gateway to SQL Server.
    There is a good MetaLink document available which guides you through the setup:
    DocID: 466225.1 - How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit
    Regards,
    Ed

  • HSODBC to sqlserver with NT Authentication

    I have setup a connection to serverA ( oracle 8i ) to Sqlserver 2000 using HSODBC where both Oracleservice and Listener are running under LocalSystem. Sqlserver is set to Windows Authentication. Db link ( gram ) is created using xxx as user id and xx as password. This works fine.
    I do the same thing from serverB ( oracle 8i ) to same sqlserver as above, but I get error :
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC]DRV_InitTdp: errors.h (1988): ; [Microsoft][ODBC SQL Server Driver]
    user 'NT AUTHORITY\ANONYMOUS LOGON'. (SQL State: 00000; SQL Code: 18456)
    ORA-02063: preceding 2 lines from GRAM
    I reliase that the erorr is being generated becuase the 'NT AUTHORITY\ANONYMOUS LOGON' is not recognised as windows authenticated. But the same thing works on serverA.
    Any ideas ?
    Bother serverA and serverB are in same domain.

    Just spent several hours researching the problem... if you consider shorting out two keyboards with tears "research."
    Then I found the friendly article that shows an OleDB solution instead. Switch your (PROGRAM=hsodbc) to (PROGRAM=hsolesql) and set your HS_FDS_CONNECT_INFO to the path of a UDL file. Very clear and very simple. See the article below. Make sure holesql.exe is in your BIN dir.
    http://www.zdnetasia.com/builder/architect/db/0,39044553,39209637,00.htm?new_submission=1

Maybe you are looking for