OWB and DB2 connection

I have connected Oracle 9i and DB2 v7 and query DB2 in SQL Plus is fine. However, it doesn't for the connection between OWB and DB2.
Anyone can help?
Thanks!

Try the following and use the database link as the source.
1. Copy inithsodbc.ora to initQA_DB2.ora in $ORACLE_HOME\hs\admin
HS_FDS_CONNECT_INFO=DNS_NAME_OF_YOUR_CONNECTION
HS_FDS_TRACE_LEVEL=0
2. Add the following lines to listener.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
(SID_DESC =
(SID_NAME = QA_DB2)
(ORACLE_HOME = $ORACLE_HOME)
(PROGRAM = hsodbc)
3. Add the following lines to tnsnames.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
DB= (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)
(HOST=localhost)
(PORT=1521)
(CONNECT_DATA = (SERVICE_NAME=QA_DB2)
(HS = OK)
4. Execute CATalog script for Heterogeneous Services in Oracle server ($ORACLE_HOME\RDBMS\ADMIN\caths.sql)
5. Create database link
drop public DATABASE LINK dwh_qa_db2;
CREATE public DATABASE LINK dwh_qa_db2 CONNECT TO "carlosmo" IDENTIFIED BY "E1Qual" USING 'DB2';
6. Test the connection
SELECT *
FROM SomeTable@dwh_qa_db2

Similar Messages

  • OWB and DB2

    I have connected Oracle 9i and DB2 v7 and query DB2 in SQL Plus is fine. However, it doesn't for the connection between OWB and DB2.
    Anyone can help?
    Thanks!

    Try the following and use the database link as the source.
    1. Copy inithsodbc.ora to initQA_DB2.ora in $ORACLE_HOME\hs\admin
    HS_FDS_CONNECT_INFO=DNS_NAME_OF_YOUR_CONNECTION
    HS_FDS_TRACE_LEVEL=0
    2. Add the following lines to listener.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
    (SID_DESC =
    (SID_NAME = QA_DB2)
    (ORACLE_HOME = $ORACLE_HOME)
    (PROGRAM = hsodbc)
    3. Add the following lines to tnsnames.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
    DB= (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)
    (HOST=localhost)
    (PORT=1521)
    (CONNECT_DATA = (SERVICE_NAME=QA_DB2)
    (HS = OK)
    4. Execute CATalog script for Heterogeneous Services in Oracle server ($ORACLE_HOME\RDBMS\ADMIN\caths.sql)
    5. Create database link
    drop public DATABASE LINK dwh_qa_db2;
    CREATE public DATABASE LINK dwh_qa_db2 CONNECT TO "carlosmo" IDENTIFIED BY "E1Qual" USING 'DB2';
    6. Test the connection
    SELECT *
    FROM SomeTable@dwh_qa_db2

  • Developer 6i and DB2 connectivity.

    I am using Oracle8i with Developer 6i.
    I need to connect to DB2/400 (running under OS/400) from Forms Developer 6i
    i have IBM AS400 Client Access (version : 3, release : 2,
    modification level : 0 ) installed on this machine, which
    is working allright, i have checked it by using datatransfer from
    AS/400.
    the username on DB2 is ORACLE (password is same as username).
    i have created ODBC system data source (named SYSDB2) for OCA connection
    while i connect from sqlplus, it connects with some error messages as
    shown below, however it works allright for querying.
    SQL> CONN ORACLE/ORACLE@ODBC:SYSDB2 ;
    ORA-00022: invalid session id; access denied
    ORA-00022: invalid session id; access denied
    ORA-00022: invalid session id; access denied
    Error accessing PRODUCT_USER_PROFILE
    Warning: Product user profile information not loaded!
    You may need to run PUPBLD.SQL as SYSTEM
    Server not available or version too low for this feature
    ORA-00022: invalid session id; access denied
    Connected.
    SQL>
    i have run PUPBLD.SQL but had no affect on these messages .
    When i try to create data dictionary views for DB2 from this connection
    by running script (Db4dmbld.sql) it does not create data dictionary.
    its fine till this happens, the real problem is that i am
    unable to connect to db2 by using odbc datasource from forms6i.
    when i try to connect it shows some special characters in a
    message box which can't provide any information.
    please let me know if there is any fix to this problem.
    regards,
    aamir.

    Hi,
    the site where you can find it is http://technet.oracle.com/doc/gateways.htm
    The gateway has no database functions. The gateway provides an interface by which the Oracle server can direct SQL operations to a DB2 database.
    Using a database link, the gateway is identified to the Oracle server. The database link is the same construct used to identify other Oracle server databases.
    Tables on the DB2 server are referenced in SQL as:
    table_name@dblink_name
    or
    owner.table_name@dblink_name
    If you create synonyms or views in the Oracle server database, you can refer to tables on the DB2 server using simple names as though the table is local to the Oracle server.
    When the Oracle server encounters a reference to a table on the DB2 server, the applicable portion of the SQL statement is sent to the gateway for processing. Any host variables associated with the SQL statement are bound to the gateway and, therefore, to the DB2 server.
    The gateway is responsible for sending these SQL statements to the DB2 server for execution and for fielding and returning responses. The responses are data or messages. Any conversions between Oracle datatypes and DB2 datatypes are performed by the gateway. The Oracle server and the application read and process only Oracle datatypes.
    --Samson
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Aamir Muhammad ([email protected]):
    Thanks Samson for you only reply on the
    topic, would you kindly tell me where can i find Oracle's Transaction Gateway for AS/400?
    Inspite all appreciation that i feel for you, What i think is that Gateways are used to establish connections between two databases not between a tool and a database like forms and AS400.<HR></BLOCKQUOTE>
    null

  • DreamWeaver CS5, PHP and DB2 Connections

    Hi,
    I have been playing around with a XAMPP server, a mySQL database and DW CS5. This all works great and DW is a great assistant compiling the necessary PHP code so I dont have to worry about all that.
    I do have a number of DB2 database I would like to attach to and there is nothing untuitive in DW allowing me to connect to DB2 databases. Has anyone seen any useful examples here
    All my Apache and DB2 server are running on Linux hence Windows samples will not be that useful to me.
    ThnX in advance for any hints.
    - Bjoern

    Hi,
    I have been playing around with a XAMPP server, a mySQL database and DW CS5. This all works great and DW is a great assistant compiling the necessary PHP code so I dont have to worry about all that.
    I do have a number of DB2 database I would like to attach to and there is nothing untuitive in DW allowing me to connect to DB2 databases. Has anyone seen any useful examples here
    All my Apache and DB2 server are running on Linux hence Windows samples will not be that useful to me.
    ThnX in advance for any hints.
    - Bjoern

  • JSP and DB2 Connection

    I tried to use this class in my jsp page to connect to the DB2 database, However, no data from the DB appears on the page and i get no errors whatsoever. Can anyone be kind enough to take a look? Thanks
    package WH;
    import java.sql.*;
    import java.sql.Statement;
    public class DbConnect1 {
    private String dbUser = "XXX";
    private String dbPasswd = "XXX";
    private String dbDriver = "COM.ibm.db2.jdbc.app.DB2Driver";
    private String dbURL = "jdbc:db2:http://xx.xx.xxx.xx:8080/invsys";
    private Connection dbCon;
    public DbConnect1(){}
    public boolean connect() throws ClassNotFoundException,SQLException{
    try
    Class.forName(dbDriver);
    System.out.println("Loaded the instantDB JDBC driver.");
    dbCon = DriverManager.getConnection(dbURL, dbUser, dbPasswd);
    System.out.println("Created and connected to database TimingTest");
    return true;
    catch (Throwable e)
    e.printStackTrace();
    System.out.println("FAIL LAHHHHHHHHHHHH");
    return false;
    public void close() throws SQLException{
    dbCon.close();
    //accepts the SQL query in the form of a string from the JSP file in which this bean is implemented
    public ResultSet execSQL(String sql) throws SQLException{
    System.out.println("haha");
    //initiates the connection with the dbCon connection object
    Statement s = dbCon.createStatement();
    ResultSet r = s.executeQuery(sql);
    return (r == null) ? null : r;
    public int updateSQL(String sql) throws SQLException{
    Statement s = dbCon.createStatement();
    int r = s.executeUpdate(sql);
    return (r == 0) ? 0 : r;

    Here is a copy of my JSP file.
    <%@ page language='java' %>
    <%@ page import="java.sql.*" %>
    <jsp:useBean id="DbConnectBean1" scope="page" class="WH.DbConnect1" />
    <%
         //Get status
         /*String message;
         String status = request.getParameter("status").trim();
         if (status == "duplicateEmail")
         message="Please try again. An account with the same emaill address has already been created.";
         else if (status == "deleteOk")
         message="Delete successful.";
         else
              message="";*/
    //Get Contacts
         String name;
         String email;
         String extNo;
         String phoneNo;
         String remarks;
         String SQLstmt;
         SQLstmt = "Select * from CONTACT";
    if (DbConnectBean1.connect()==true){
    %>
    <html>
    <head>
    <title>Display Contacts</title>
    <script src="validation.js" language="Javascript"></script>
    <script Language="JavaScript">
    //Perform Validation
    /* function checkForm() {
    var alertString=checkChkBox(theForm.chkItem.value);
         formSubmit(alertString);
    </script>
    </head>
    <body bgcolor="#ffffff">
    <form action="USRDelContact.jsp" name="theForm" onsubmit="return checkForm();">
    </form>
    <table>
    <tr>
    <td><input type="chkAll" id="chkAll"onclick="checkAll(document.theForm.chkItem)"/></td>
    <td>Name</td>
    <td>Extension No.</td>
    <td>Mobile Phone No.</td>
    <td>Email Address</td>
    <td>Remarks</td>
    <td> </td>
    </tr>
    <%
         ResultSet r = DbConnectBean1.execSQL(SQLstmt);
         while (r.next()){
    %>
    <tr>
    <td><input type="checkbox" name="chkItem" id="chkItem" value="<%= r.getString("Email")%>"/></td>
    <td><%= r.getString("Emp_Name")%></td>
    <td><%= r.getString("Ext_No")%></td>
    <td><%= r.getString("Cellphone")%></td>
    <td><a href="mailto:<%= r.getString(Email")%">"><%= r.getString("Email")%></a></td>
    <td><%= r.getString("Remarks")%></td>
    <td><a href="USREditContact.jsp?email=<%= r.getString("Email")%>">Edit</a></td>
    </tr>
    <%
    if (r.next()==false)
    %>
    <tr>
    <td colspan="7">There are no records currently.</td>
    </tr>
    <% }
    }//end if%>
    <tr colspan="6">
    <td>
    <%//=message%> <input type="submit" name="btnDelete" value="Delete">
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    </a>

  • OWB and DB2 UDB

    Can OWB version 10.1.0.2.0 work with DB2 UDB on WIN NT as the source database / module? Is there any documentation available which has some details on this?

    Yes it can. You use hetergeneous services (HS) of the database to accomplish this. With HS, you two options: using an Oracle Gateway or using generic connectivity. Generic Connectivity uses ODBC to talk to DB2.
    Here's a link to the documentation:
    http://download-west.oracle.com/docs/html/B12146_01/defsource.htm#sthref717
    Can OWB version 10.1.0.2.0 work with DB2 UDB on WIN
    NT as the source database / module? Is there any
    documentation available which has some details on
    this?

  • Oracle 8i and DB2 Connectivity

    Hi,
    I dont know whether this is right forum to post this query.
    I want to connect to DB2 from Oracle 8i. I have read some documentation about Oracle gateways but it is not clear of how exactly we can connect to DB2.
    If any one has done this before please let me know th detail steps of how we can connect to DB2.

    You can use oracle product Interconnect. If you search on interconnect you will get your answer.

  • CR2008, C# and DB2 - Connection Info

    I have a report, originally created in Crystal Reports ver 9, and I have loaded it successfully in CR 2008 (stand alone).  I am able to run that report just fine, it prompts me for the parameter needed for the report, then it promts me for an ODBC data source, which I select, and it runs as expected.
    BTW, this report was generated using a COMMAND to specify the necessary tables and fields for the report instead of selecting specific table and field names (since the list of tables is unavailable via the ODBC link)
    However, in my C# code, I cannot get it to run.  It would appear the information required in the ConnectionOnfo object isn't appropriate for an ODBC datasource, unless I'm over looking something.  So can somebody help me out with setting this up so it runs correctly?
            private void RunReport()
                ReportDocument oRpt = new ReportDocument();
                try
                    oRpt.Load(this._Settings.ReportDirectory + this._ReportFile);
                catch (Exception err)
                    Console.WriteLine(err.Message);
                    Console.ReadKey();
                ConnectionInfo connInfo = new ConnectionInfo();
                // the ODBC DSN on this system is GS30QA, but I'm not sure how to specify this via the ConnectionInfo
                // object... So instead I'll list the actual elements for the cnnection
                connInfo.DatabaseName = "GS2007";
                connInfo.UserID = "secret";
                connInfo.Password = "secret";
                connInfo.ServerName = "PHX-VM-GS30QA1";
                Tables oTables = oRpt.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.Table oTbl in oTables)
                    TableLogOnInfo tableLogonInfo = oTbl.LogOnInfo;
                    tableLogonInfo.ConnectionInfo = connInfo;
                    oTbl.ApplyLogOnInfo(tableLogonInfo);
                oRpt.SetParameterValue(0, 0);
                // this fails, with an error message of
                // {"Failed to open the connection.\rFailed to open the connection.\nUSPS_ItemizedManifest {DA872B86-5A97-4CF5-B099-2C866D933351}.rpt"}
                oRpt.ExportToDisk(ExportFormatType.PortableDocFormat, @"C:\NET 2.0 Projects\Logicor.GSRouter.Reports\Logicor.GSRouter.Reports\Outputs\test1.pdf");

    Sorry to necro this post, but I was temporarily pulled off this specific project to handle somethig else that was considered a
    higher priority.  Now that I'm finished with that task, it's time to revisit this.  Unfortunately, there's been no progress.
    Also, so everything is clear... When I run this report in the Designer, and press F5 the report promts me to choose an ODBC DSN, and
    I choose this very same one and the report runs.  I just cannot get it to run via the code, it's unable to connect to the DB,
    although I don't know why since it's obvious the report runs in the designer just fine.
    I did as the last post said:
    // name of the 32 bit System DNS on this machine
    connInfo.ServerName = "GSDEMO";
    // name of the actual database
    connInfo.DatabaseName = "GS2007";
    connInfo.UserID = "secret";
    connInfo.Password = "secret";
    Tables oTables = oRpt.Database.Tables;
    foreach (CrystalDecisions.CrystalReports.Engine.Table oTbl in oTables)
        TableLogOnInfo tableLogonInfo = oTbl.LogOnInfo;
        tableLogonInfo.ConnectionInfo = connInfo;
        oTbl.ApplyLogOnInfo(tableLogonInfo);
        // this return false, but I expected that because it's never been able to connect.  I need to know why, which is what I've
        // never been able to discover.
        bool blConnected = oTbl.TestConnectivity();
        Console.WriteLine("Connected: " + blConnected.ToString());
    The error I get this time is
    Failed to open the connection.
    Details:  [Database Vendor Code: -1013 ]
    Failed to open the connection.
    USPS_ItemizedManifest_CR2008 {CD9615AE-3601-4E89-B49B-FB2D54726593}.rpt
    Details:  [Database Vendor Code: -1013 ]
    CrystalDecisions.CrystalReports.Engine.InternalException was unhandled
      Message="Failed to open the connection.\nDetails:  [Database Vendor Code: -1013 ]\rFailed to open the connection.\nUSPS_ItemizedManifest_CR2008 {CD9615AE-3601-4E89-B49B-FB2D54726593}.rpt\nDetails:  [Database Vendor Code: -1013 ]"
      Source="CrystalDecisions.ReportAppServer.DataSetConversion"
      StackTrace:
           at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
           at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
           at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
           at Logicor.GSRouter.Reports.MsgParser.RunReport() in C:\NET 2.0 Projects\Logicor.GSRouter.Reports\Logicor.GSRouter.Reports\MsgParser.cs:line 140
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: System.Runtime.InteropServices.COMException
           Message="Failed to open the connection.\nDetails:  [Database Vendor Code: -1013 ]\rFailed to open the connection.\nUSPS_ItemizedManifest_CR2008 {CD9615AE-3601-4E89-B49B-FB2D54726593}.rpt\nDetails:  [Database Vendor Code: -1013 ]"
           Source=""
           ErrorCode=-2147482892
           StackTrace:
                at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
                at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
           InnerException:

  • Connections to Sybase and DB2

    Hi,
    Does SQLDevelopeer can connect to Sybase and DB2 databases, do I have to pay something else?
    Regards,

    hi,
    SQLDevelopeer can connect to Sybase and DB2 databases besides other databases. You need to include JDBC driver jar files in SQLDev preference settings. Please check help doc for more information.
    - Rakesh

  • SQL0904N and SQL30081N while using DB2-Connect driver

    Scenario:
    Application program : Java on Unix
    Database : DB2 on Mainframe
    Database driver : IBM's DB2 connect
    Usage : A number of connections are taken by the program and are used as long as the program is alive
    (Life time of the program is variable. It can be as long as many days -- in a sense the program acts like a daemon process that runs as long it is not stopped).
    Scenario:
    -To one of the table using a load utility, such as BMC, data is loaded
    -Database goes to copy-pending status
    -Database is started by using the following command : "START DATABASE(database name) SPACENAM(table space name) ACCESS(FORCE)"
    Doubts:
    1. What happens to the connections that the program has opened to the database?
    2. Does the database relinquish all the resources (like the sockets it would have opened for the communication with the driver) held by it during restarting?
    (at least before restarting, it is evident that no query on the table in question is possible. A typical SQL0904N, which is non-availability of resources, is thrown)
    3. Can the above scenario cause a SQL30081N, which is resetting of connection by peer i.e. database in this case?

    Yes, there is a high probability for such things, you may want to consider using a connection pool instead of opening 2 connections once at the start of the program and using them all for days.
    Have a look at the following link to get an idea on how to implement a simple connection pool.
    http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/conpool.html

  • Need to find out a way to figure out how DB2 connect to Oracle and data mirroring etc.

    Hi, Gurus,
    I just take over a project which source is ICOMS as400 db2 database. Seems data mirro CDC is used to replicate from DB2 to oracle.
    I am very new to this datamirror CDC , plus I am new to figure out how db2 connect to oracle, is that through db link or what? or is there tnsnames entry?
    I would like anybody in this forum can point me to the right direction.
    Thanks in advance.

    user9233598, if mirroring/replication from DB2 to Oracle already exists then question is what product is being used?  If the product has already been purchased then I do not think it is very likely that management is going to want to purchase another product so I do not see how extra-cost Golden Gate or other Oracle Gateway features apply if those are not currently in use.  If Golden Gate or the Oracle Transparent Gateway are in use then you already have your answer
    Oracle supports ODBC/JODBC and the replication application on the AS400 likely uses these features or a thick Oracle client as the interface to Oracle.
    HTH -- Mark D Powell --

  • How to connect Weblogic 6.1 and DB2 under OS/390

    Hello,
    which JDBC Driver do I need in order to connect Weblogic 6.1 to DB2 OS/390.
    And where can I get this Driver?
    With best regards
    Stefan Stössel

    In order to use IBM's JDBC driver to connect to DB/2 on the mainframe, you will need to
    use DB2Connect. You can also get third-party drivers from companies such as Neon
    Systems that support this without DB2Connect...
    Joseph Weinstein wrote:
    Stefan Stoessel wrote:
    Hello,
    which JDBC Driver do I need in order to connect Weblogic 6.1 to DB2 OS/390.
    And where can I get this Driver?
    With best regards
    Stefan StösselHi. As far as I know, IBM is the only source of JDBC drivers for DB2, so you should
    get the appropriate driver from them, for the platform on which you want to run
    WebLogic. Once you have this driver, and can connect to your DBMS using the driver's
    own simple example programs, show me the few lines of code that make the connection,
    and I'll show you how to define a pool so WebLogic can do the same.
    Joe

  • Best Practice to Setup an application to work with both oracle and db2 db

    Hi,
    We have an application that currently supports both oracle and db2 databases . It is currently using JPA with eclipselink as backend mechanism and we want to move to ADFBc as our backend . So what is best practice to do this?
    I came across an old post in https://groups.google.com/forum/#!topic/adf-methodology/UlJZSTu14Io that states to create two different model projects to support oracle and db2 .
    Is this still the standard ? Is there a way that we could work around rather than creating multiple projects?
    How do i get the view controller to work with multiple model projects if this is the case?
    Thank you.

    Thanks for the response .
    The problem is i would have the same schema on both the databases (both in oracle and db2) .
    I don't see a scenario where i want both the application model projects at the same time . What i meant is , Application will either be deployed with Oracle DB or DB2 but not with both on a production environment .
    So is there a way where i just change the connection parameters alone rather having two different models ?
    If i have to use two model projects ,  would it be possible say i built the view controller for Oracle , and use it for DB2 if i make sure the BC objects names are similar between model projects and switch just the model jar based on the deployment environment ?
    -Sam

  • Jsp and db2 problem

    Hi guys:
    I installed tomcat4, db2 run time client on one red hat 7.2. Everything works fine. My jsp can access db2 database.
    Now I am installing the same thing into another box, red hat 7.2, tomcat4 and db2 run time client.
    I can write a java code to access the db2 database, and I can access db2 table in the command line. Jsp file is running fine. But when I use the jsp code which is working in another red hat box to access the db2 database, it can not go through and it stops in "Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");" statement.
    Does any body have any idea what could be the problem?
    Regards,
    David

    hi,
    could you please send me the jsp-db2 connection code.i am really distressed.i can't find it anywhere..must i install db2 run client. i have only db2 personal edition and the rest( tomcat,jre,jsdk,etc..)
    Thx
    (while tipping my e-mail in registration,i wrote it false)
    My treu e-mail is [email protected]
    please please send me this code....

  • DB2 Connect installation for more as one application-server...

    Greetings,
    We've installed SAP 4.6D and migrated to ECC 6.0...
    also migrated from ICLI to DB2 Connect.
    We've 4 application server's on Win2k3.
    What's the perfect, with best performance - installation from DB2 Connect ?
    DB2 Connect on every appication server or on central instance server (connect-mode: server client) ?
    I'm not found tips or document's on SAP Notes (description installation procedure for <b>more as one</b> SAP application server's).
    Regards, Markus

    Hay Markus,
    You have the classic tradeoff here: like Thomas mentioned installing a DB2 connect on every server reduce latency but give you more work on an upgrade or definition change, installing just one DB2 connect is easier and more secure but have an inherent performance leg.
    I’d recommend installing on all servers with a shared parameter file or write a distribution script to distribute the file to all severs from a central location.
    Good luck,
    Uri Lifshitz.

Maybe you are looking for