DB2 Connection VIA ODBC DSN

Can anyone point me to good 'step-by-step' guide to setting up a HS connection to an AS400 DB2 database using a ODBC connection.
I have an ODBC DSN on set up but I'm not sure how set-up my tsnnames.ora or listener.ora, I've looked at several posts in this thread but I'm still struggling.
I basically need to be able to something like 'select something from sometable@AS400link'
Thanks
Bri

Tak,
Thanks once again, I still can't get this to work, here's what I have:
On the DB server itself:
\hs\admin\initFRUIT.ora contrains:
HS_FDS_CONNECT_INFO = SPONGE
HS_FDS_TRACE_LEVEL = 0
\network\admin\listener.ora contains:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <name of the host PC>)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\oracle\ora81)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = FRUIT)
(ORACLE_HOME = E:\oracle\ora81)
(PROGRAM = hsodbc)
(SID_DESC =
(GLOBAL_DBNAME = <name>)
(ORACLE_HOME = E:\oracle\ora81)
(SID_NAME = <name>)
\network\admin\tnsnames.ora contains:
JELLY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <name of the host PC>))(PORT = 1521))
(CONNECT_DATA = (SID=FRUIT))
(HS=OK)
I created a public database link as follows:
create public database link custard
using 'JELLY'
My ODBC DSN is pointing to an SQL Server
Unfortunately I am still getting the same error??
Thanks for your help.
Brian

Similar Messages

  • Can SQL*Plus connect via ODBC to NON-Oracle data source?????

    I am struggling to understand something. I downloaded Oracle instance client, SQL*Plus and ODBC components with the hopes of being able to connect via SQL*Plus to a non-Oracle/ODBC compliant database.
    Is this possible? Or is SQL*Plus ability to connect via ODBC only to an Oracle data source??
    Thanks...

    sqlplus only connects to oracle. you can use the odbc driver from instant client to allow other applications to access oracle via odbc (e.g. excel). if you need to connect to non-oracle odbc database (ms-access, foxpro, etc.) you need odbc driver for those sources.
    you can use sqldeveloper to connect to oracle and non-oracle databases. check otn product info for sqldeveloper for more details.

  • Can connect via ODBC but not via SQL Developer?

    Hi, all.
    My setup:
    Windows XP Pro
    JDK 1.6
    SQL Developer 2.1.1.64.45
    I'm attempting to connect to an Oracle DB using OS authentication and trying hand-entry of the host and SID; and also trying my TNS file. When I attempt to connect via SQL Developer, I get the following error:
    "Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied."
    When I attempt this same connection, however, using ODBC and Access, I can get right in and see the tables.
    What can I try in order to get SQL Developer working correctly?
    Thanks,
    IVR Avenger

    I'm not really familiar with connections Using OS authentication, but if OCI+TNS based connections work you could try to activate OCI connections by selecting
    Preferences -> Database -> Advanced -> Use OCI/Thick Driverand then use the TNS connection type when creating your connection.
    It should work well even with the thin driver but i cannot help you in this case because i've never had to use this kind of authentication.

  • Error when connecting via ODBC connections

    Alright, so....
    I have a Windows 7, 64 bit OS.  I installed Oracle 10g, I installed Crystal Reports Xi release 2.
    Via ODBC Administrator, I set up my data sources, and they all connect successfully.
    I go into Crystal Reports, create a new report, and attempt to set a new connect and use those same data sources. I get prompted for my user name and password.  I get the error:
    Logon failed.
    Details: IM004:[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandel on SQL_HANDEL_ENV failed
    HELP!  I've changed security settings, I've wiped my machine and started over from scratch, I've even installed Oracle 11g. Please help!  I'm about to pull my hair out. I am sure this is probably something easy or something I've overlooked, but I give up and throw the towel in.

    Go into \windows\syswow64 and use the odbcadm32.exe located in there. It's the 32 bit version of the ODBC Administrator.
    Also, search before posting and this has been answered.
    And you need Service Pack 6 to be supported on Windows 7.
    Thank you
    Don
    Edited by: Don Williams on Aug 27, 2010 2:31 PM

  • Fields missing from dbo.MSP_EpmProject_UserView when connected via ODBC to Access 2013

    Odd things here ---
    Both the dbo.MSP_EpmProject_UserView and the MSP_EpmProject tables, are missing a number of fields including: ProjectName; ProjectAuthorName; ProjectManagerName, etc.   Looked in the schema to make sure I wasn't crazy, and they are listed there
    just like in 2007.
    Using Project Server 2013 (on-prem) and Access 2013.   
    Suggestions?

    Hello,
    I've not tried from Access before so cant comment on that but I assume if you connect using Excel 2013 the data and columns are correct?
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Connection to MySQL via ODBC not working

    Hello all together,
    I've got a problem with the ODBC connection to MySQL. The connection via ODBC is established and things like tnsping are working.
    When I select some data within the SQL*Plus environment, I get no real result. For example "select table_name from all_tables@mysql;" returns nothing.
    My entry in listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=odbc_mysql)
    (ORACLE_HOME=D:\oracle\product\11.0.1\db_1)
    (PROGRAM=dg4odbc)
    My entry in tnsnames.ora:
    MYSQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA = (SID=odbc_mysql))
    (HS=OK)
    The initodbc_mysql.ora in ORACLE_HOME/hs/admin/:
    HS_FDS_CONNECT_INFO = odbc_mysql
    HS_AUTOREGISTER = TRUE
    HS_DB_NAME = hsodbc
    I tried some modifications but I still get no data from mysql database. When I try "select * from customer@mysql;" I get the correct number of records, the correct column names, but the content is always "¬¬¬¬". The odbc driver works, because with MS Access I can fetch the data. I'm using Oracle 11g Release 1 EE and MySQL ODBC 5.1.5.
    What could be the reason for this?
    Greetings,
    Joerg

    created in my UTF-8 Mysql DB your table and inserted a record; the select shows:
    SQL> select * from "movieclass"@mysql;
    idClass
    ClassName
    123
    H e l l o
    As you can see the content is there, the "space" between the letters is related to unicode. Each character is interpreted by 2 bytes and SQL*Plus wrongly displays both. Using iSQLPLus or SQLDeveloper does not show the "space" between the letters.
    Here the data type mapping:
    SQL> desc "movieclass"@mysql;
    Name Null? Type
    idClass NUMBER(3)
    ClassName NOT NULL NVARCHAR2(50)
    What's the exact version of DG4ODBC you're using? 11.1.0.7?
    According to the listener file you're using DG4ODBC on Windows. There was a high/low byte issue in DG4ODBC for Windows. This issue is fixed in 11.1.0.7 and a certain patch. So I recommend you to get first the 11.1.0.7 patchset (if you don't already have it installed):
    6890831 Oracle Database Family: Patchset
    11.1.0.7.0 PATCH SET FOR ORACLE DATABASE SERVER 11.1.0.7.0
    and then please apply also the latest patch:
    8689191 Oracle Database Family: Patch
    ORACLE 11G 11.1.0.7 PATCH 16 BUG FOR WINDOWS 32 BIT 11.1.0.7.0
    There was a high/low byte issue
    Edited by: kgronau on Aug 11, 2009 10:28 AM

  • Problem remote connection to SQL via ODBC

    Hello, I have a server machine on which I installed the "SQL Server 2008 R2 Express." On the same machine I have configured a connection to the SQL server via ODBC and I developed a VI that uses the "LABSQL ADO function" and it perfectly communicates via ODBC with the database.
    The problem is when I try to connect to the database from a remote PC. Even on the remote PC I configured the connection via ODBC. I launch the same VI I described above, it performs correctly the ADO Connection Open the ADO connection, but the SQL Execute returned an unknown error: -2147217865. It seems that it can not find the table on which I am doing the query.
    Does anyone have any idea? I have no experience with databases and do not know what tests to do.
    Thanks a lot.

    Hi,
    actually the Microsoft error code seems to be related to not-existing table (see here).
    Anyway, this error code may result when trying to use tables with spaces or other special characters ("-", "/", "\", "?" ) in their names.
    Is this true also in the database you are using?
    Could it be an issue with permission levels?
    I hope it helps!
    Bye,
    Licia

  • ASP  db2 connection

    I'm new to ASP and experienced db2 user in C/S applications.
    I have developed a dynamiz page with Dreamweaver usin ASP
    VBscript and tried to connect db2 satabase. In defining the
    connection and preparing the record set everything went well and
    with DW I connected to dns, tested the connection and played with
    SQL everything fine. But when I tried the same thing using ASP
    page, the connection did not work and I got an error message
    showing the connection line on the program. The connections string
    seemed O.K. and the ASP program seems O.K. but application does not
    work and I get error.
    I do the same thing to Access tables everything works well,
    again with ODBC.
    Probably there is an issue with IBM DB2 connection using
    ODBC.
    Attached the connection code and the line of ASP program
    where I get error message
    <%
    ' FileName="Connection_odbc_conn_dsn.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema="DB2ADMIN"
    Dim MM_connMedbase_STRING
    MM_connMedbase_STRING =
    "dsn=MEDBASE;uid=db2admin;pwd=db2admin;"
    %>
    <%
    Dim rsMedbase
    Dim rsMedbase_numRows
    Set rsMedbase = Server.CreateObject("ADODB.Recordset")
    rsMedbase.ActiveConnection = MM_connMedbase_STRING ******here
    I get error*******
    rsMedbase.Source = "SELECT * FROM DB2ADMIN.RAND0102 ORDER BY
    RAND_TIME ASC"
    rsMedbase.CursorType = 0
    rsMedbase.CursorLocation = 2
    rsMedbase.LockType = 1
    rsMedbase.Open()
    rsMedbase_numRows = 0
    %>
    appreciate any help, thx in advance

    One thing I like about MSSQL databases is that you can manage them using Access itself. This is done by creating an Access project file with an ADP extension. It presentsna dialog for the server connection which uses the same information as the connection string. Once connected, you can manage the database the same way as you would a regular Access database in almost every aspect. You can import and export, create tables and Queries, etc. One noticeable difference is that you're presented a lot more options for datatypes for your table fields. One downside is that the web Hist must allow remote connections which some do not for security reasons. Another is that I don't know how applicable this would be in a ASP.net environment, but that's not supported by DW and even classic ASP is fading fast.  Beyond MS-based solutions is PHP with MySQL, a different animal in many respects but conceptually similar to the overall principles of dynamic websites. I still manage a small number of ASP sites, and a couple years ago decided I was overdue in choosing which technology I needed to learn. I went  the PHP route because I still wanted to use DW and many Web Assist extension which many now only support PHP. (not to say I won't ever delve into dot net, but I need to be able to hand code PHP at least to the extent that I can with VBscript)

  • Connection to ODBC access database failure

    I have made several sites using ACCESS databases via ODBC DSN
    name. But suddenly it does not work any more. I can not use the
    Database wizards in DM 8.02. When I have made a connection, tested
    it OK and I try to se the tables/views. I only got the word "none".
    If I in the advanced recordset wizard write the SQL command, the
    data is showen correctly!!???
    There is something wrong with DM's abillitry to connect to
    the ODBC DNS name...Everything is updateted to the latest version.
    Is there anybody who have any clue to what could be wrong. It
    is the same story on an old 2000 Server, a new 2003 small busines
    server and from DM installed on two different clientmaschines and
    on the two servers.

    Hi!
    You could try this It worked for me on all my connections.
    I found a extension called SP2DBFix1.0.2.mxp
    Down load here,
    http://download.macromedia.com/pub/dreamweaver/extensions/SP2DBFix1.0.2.mxp
    to fix a XP pro service pack2 connections.
    To fix: I went to Sites/Advanced/Remove connection Scripts,
    ran that removed
    my
    connection scripts. I then shut down Dreamweaver 8 installed
    the extension
    then opened dreamweaver 8 made a new connection and it works
    now Great! Im
    happy.
    You have to run this same routine on every site you have
    setup with
    connection scripts
    Good Luck.
    Dave
    "JOhnny Odgaard" <[email protected]> wrote
    in message
    news:ersvva$2hd$[email protected]..
    > I have made several sites using ACCESS databases via
    ODBC DSN name. But
    > suddenly it does not work any more. I can not use the
    Database wizards in
    DM
    > 8.02. When I have made a connection, tested it OK and I
    try to se the
    > tables/views. I only got the word "none". If I in the
    advanced recordset
    wizard
    > write the SQL command, the data is showen correctly!!???
    >
    > There is something wrong with DM's abillitry to connect
    to the ODBC DNS
    > name...Everything is updateted to the latest version.
    >
    > Is there anybody who have any clue to what could be
    wrong. It is the same
    > story on an old 2000 Server, a new 2003 small busines
    server and from DM
    > installed on two different clientmaschines and on the
    two servers.
    >

  • URGENT - Unable to link to VFP 9 tables in Access and Excel 2007 in Windows 7 32-bit via ODBC

    I have 3 VFP 9 databases and am able to connect via ODBC to 2 of the 3 in Access '07.  I can open all 3 the dbf's via FoxPro just fine and 2 months ago I could link to all 3 databases via ODBC with no troubles. I know the problem child (specifically
    Accpac/Sage acctg) is intact. Since I had to reformat my computer, I've been able to relink to everything except this one database. Any suggestions as to why I can't make the link work?
    As this is our previous system that is no longer used, I really need to get this link set up for queries and reports in Access.
    Thanks,
    Kristi
    Thanks!

    This does not appear to be related to sql server, so posting to an access forum would likely be more effective.

  • Error via ODBC: wrong dll version (check: SQLTCPx.dll)

    Hi,
    after system, MAXDB 7.06.03 & database studio installation on new server my application reports error: wrong dll version (check: SQLTCPx.dll)
    On previous server connection via ODBC was ok.
    I have checked all available ODBC Drivers (MAXDB, SAPDB, SAPDB 7.4) and it does nothing.
    Connection via .net driver (without ODBC) works fine.
    How can I get correct version of dll ?
    Which version is correct?
    This dll currently exists in system: v. 7.6.3.0 (C:\Program Files\sdb\DBM) or v. 7.6.2.0 (C:\Program Files\sdb\programs\pgm)
    Best regards,
    Lukasz
    MAXDB 7.06.03.07 Community Edition, WIN 2k3 x32 Ent. ed.
    ODBC:
    Version                   7.6.03 Build 007-123-157-515
    Object Mode           32 bit
    Test File                  pgm/sqlod32.dll
    Make Id                  256246
    Installation Date     24.01.2008
    Size                         3045874 bytes
    Checksum               293d54b1f67025353bc9cfdbe1dd84f3

    Hello Wolfgang,
    problem is after Database Studio installation.
    My test system is:
    OS: Windows XP Sp2
    MAXDB Software:
    1) MAXDB 7.6.03.07 (install file: maxdb-all-win-32bit.exe, server+client installation)
    2) SQL Studio 7.6.03.02 (174235)
    3) Database manager 7.6.03.02
    If i install MaxdbStudio (install file: maxdb-studio-win-32bit.exe) on that environment I'll get error :wrong dll version (check: SQLTCPx.dll) in all known connections via ODBC.
    Connections via odbc means for me connection via ODBC Source witch uses MAXDB (unicode) driver, file: SQLODE32W.DLL
    (Control panel => Administrative tools => ODBC Sources => Add source => MAXDB (unicode) ... etc.).
    SQL Studio, database manager and maxdb studio starts and works correctly.
    Connections via MaxDB ADO.NET Data Provider works correctly (another application).
    Error occurs in Windows 2003 as well (the same software).
    Best regards,
    Lukasz

  • How query data in pl/sql via ODBC from DB2 on AS400

    Hi,
    What's the most easy way to do some selects on tables in an external (non-oracle)database via odbc?
    I only need selects, no dml-statements like inserts en updates...
    Where can I find more information about this subject?
    Filip

    You need to use Oracle Heterogeneous Services. Firstly you have to obtain and configure DB2 ODBC drivers. I got mine from ibm.com (not free) but I am sure there are some third party vendors out there. I don't know much about DB2 so I can't help you with the configuration (I asked a DB2 DBA to help me with that part).
    The rest is just setting up Oracle HS and creating the DB link. The following steps should help but there are much more detailed manuals for Oracle HS on http://tahiti.oracle.com.
    Listener Configuration
    Add the following entry into the SID_LIST part of the listener. The SID_NAME will be used in the heterogeneous services configuration
    (SID_DESC=
    (SID_NAME=db2)
    (ORACLE_HOME=D:\oracle\ora92)
    (PROGRAM=hsodbc)
    Restart the listener.
    Heterogeneous Service Configuration
    Under ORACLE_HOME\HS\admin create the following text file called initDB2.ora (the DB2 part should match the SID_NAME used in the listener configuration).
    Put the following line in the text file (the DQ01 is the name of the DB2 ODBC System DSN):
    HS_FDS_CONNECT_INFO=DQ01
    Client Configuration
    The client side refers to an Oracle database that will use the heterogeneous gateway.
    TNSNames Entry
    Put the following entry in the tnsnames.ora file (the SID part should match the SID_NAME in the listener configuration):
    DB2.telkom.co.za =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=cntrra20-esdt00)(PORT=1521))
    (CONNECT_DATA=(SID=db2))
    (HS=OK)
    Database Link
    Create a database link that references the new tnsnames.ora entry:
    create public database link db2
    connect to oratst identified by oracle using 'db2';
    Test the database link.

  • Automatically create ODBC DSN connection with special port and password. Add-OdbcDsn cmdlet

    Hi,
    I first posted a question in the SQL forum but I'm posting it here instead because its a Powershell question.
    In a non-persitent VDI enviroment we are trying to automatically create a ODBC DSN connection to a SQL server.
    We are using Windows 8.1 so we also have Powershell 4 together with the add-odbcdsn cmdlet. 
    But when trying to add set -SetPropertyValue for network port different than default and a password we get an error.
    here is the command:
    Add-OdbcDsn -Name test -DriverName "SQL Server" -DsnType User -SetPropertyValue @("PWD=test", "SERVER=10.0.0.1")
    and here is the error message:
    Add-OdbcDsn : Attempt to set the {UID or PWD} key of a DSN. These keys should not be stored in the registry for securit
    y reason. Provide the credential information at runtime via SQLDriverConnect, SQLConnect or SQLBrowseConnect.
    At line:1 char:1
    + Add-OdbcDsn -Name test -DriverName "SQL Server" -DsnType User -SetPropertyValue @ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (MSFT_OdbcDsnTask:Root/Microsoft/...SFT_OdbcDsnTask) [Add-OdbcDsn], Cim
    Exception
    + FullyQualifiedErrorId : MI RESULT 4,Add-OdbcDsn
    NB!:  this command does not contain a port number, but when adding it without a password(PWD string) we just the default port.

    Hi Primeid,
    Agree with Jrv, we cannot store  UID and PWD in an ODBC datasource, For example, you can create a DSN using the user interface but if you look at the DSN stored in the registry the UID and PWD are not stored.
    ODBC it is always required when you connect using a DSN that the caller supply UID and PWD if they want to use standard login during connection time. 
    These similar discussion are for your reference:
    Creating ODBC DSN for SQL Native
    Client fails for not-integrated authentication
    is user name and password required in ODBC admin / User DSN?
    In addition, to read data from a SQL Server database using an ODBC DSN with SQL Authentication via powershell, please refer to this script:
    Open SQL database with ODBC DSN and SQL AuthenticationIf
    there is anything else regarding this issue, please feel free to post back.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Error when connecting to SQL*PLUS via ODBC to Excel

    OS: Windows 2000 Professional
    Oracle DB: 9i release 2
    SQL*Plus: Release 9.2.0.1.0
    MS Excel: 2000
    ===================
    When I try to connect to SQL*PLUS via ODBC to Excel with "connect scott/tiger@odbc:libro" I get the following error:
    ORA-03121: no interface driver connected - function not performed

    SQL Server objects are commonly case sensitive, so please surround the column and table names by double quotes:
    SELECT "Type_PK_ID" FROM "dbo"."boundaries"@sqlserver
    SIDE NOTE: Oracle is by default not case sensitive and all object names are stored in upper case. To get case sensitive objects they need to be surrounded by double quotes. In HSODBC case sensitive table names were commonly found even when not surrounded by double quotes as the gateway used internal SQL Server methods to find the correct table nameing - this method does not work for column names. So to be able to query a case sensitive column it needs to be surrounded by double quotes and the table name must be written as stored in the source database.

  • Can Dreamweaver CS5 connect to MySQL via ODBC?

    I am unable to make a direct connection to an external MySQL database because most hosting provider does not allow this type of connection due to security reasons. I am however able to make an ODBC connection to the database (which I am currently using to connect filemaker to our MySQL database).
    How can I tell Dreamweaver CS5 to connect via the ODBC driver so I can see the MySQL content in my Dreamweaver project?
    I am on a Mac running OS X 10.6.4.

    GeorgeRudd wrote:
    How can I tell Dreamweaver CS5 to connect via the ODBC driver so I can see the MySQL content in my Dreamweaver project?
    You can't - at least not if you want to use Dreamweaver's server behaviors. Dreamweaver uses the original PHP MySQL extension. If you want to connect in any other way, you need to hand code everything yourself.
    On the other hand, if you want to see the contents of your remote database in Dreamweaver, define your remote server as the testing server. Dreamweaver uploads a hidden folder to the remote server to connect to the database. Because the script is on your remote server, it's local to the MySQL database, so gets round the security issue. It then sends the details to your local computer.
    A better solution, though, is to establish a local testing environment. It's more responsive and much more secure. http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html.
    By the way, the failure to get a reply is due, in part, to posting your question in the wrong forum. The forum for issues related to PHP/MySQL and other server-side technologies is http://forums.adobe.com/community/dreamweaver/dreamweaver_development.

Maybe you are looking for

  • Comparing the data in MySql

    Hi, I got a problem which i stuck in.Here how it goes: i entered the data in MySql database as shown below movieid movietitle cinema 1 signs apple 2 signs pear 3 signs orange 4 ET pear 5 ET orange I got a main page in which user can select his choice

  • How much do engineer call-outs cost BT?

    I'm curious as my internet is being less than useless yet again, I spend more time tethered to my mobile than using our BT internet connection. I've had engineers out 5 times since last year. I figure I am now going to let nothing slide, I'll contact

  • How to set a default text in the TextInput.

    I want a text(like "please input") in TextInput and the text color is gray,when my TextInput is empty. how to set? thank you :)

  • Oracle.apps.po.rcv.rcvtxn subscription issue

    Hi, I have subscribed to oracle.apps.po.rcv.rcvtxn event but even after doing PO receiving sometimes event is raised but sometimes not. Since I have set phase as 1 it does not go to wf_deferred table. Whch table should i check to confirm if the event

  • Robohelp-issue in generatings printed document

    Hi, I have installed the trial version of Robohelp9. It was working well till friday.I have included some topics today and tried to generate the printed output. But I got the below error and system crashed. Then again i have to open the robohelp proj