Example needed for connecting to 3 Informix databases

I'm attempting to connect and use 2 different informix databases within the same app.
Connection 1 (Sql selects records where status = 'pending'
Connection 2 (Results from connection 1 are passed to a stored procedure
Connection 3 (Updates Database used in con1 with return values from con2
I'm able to successfully code connection 1 but I'm totally confused on the others.
How do you switch back and forth between each connection?
Thanks in advance
Steve

all you need to do is make 2 connections:
//setup code
Connection conn1 = DriverManager.getConnection(url, user, pass);
Connection conn2 = DriverManager.getConnection(url2, user2, pass2);I have made a couple of classes that can simplifiy this. e.g. the entire code consists of
dbConnection oc = new OracleConnection();
dbConnection pc = new PostgresqlConnection();
oc.createConnection("prodops");
pc.createConnection("test");I havn't made an informix class, but they are simple to do. Give me your email address if you want the classes.
Pete

Similar Messages

  • P6 user name is not valid for connecting to the reporting database

    No data is available because your P6 user name is not valid for connecting to the reporting database
    I am getting above error in the following environment:
    P6 running on wls instance 1.
    BI Publisger running on wls instance 2
    MS SQL server 2005
    Note that the error appears when I clink on the 'Reports' tab in P6. My admin user on P6 has access to report/analyser modules.
    To connect P6 to BI Publisher I am using 'PxRptUser' in the P6 configuration for Bi Publisher. I know as well that the WSDL URL is correct and I can test this in SoapUI tool.
    In BI publisher I have created the PMDB data source using PxRprUser, and the test of this connection works.
    (Because the report samples come with Oracle flavoured SQL that SQL server does not like, I have configured BI Publisher so I have just a single report left that sources it data from an xml file. This works in BI Publisher. It also helps me in that I do not need to add 'WHERE' clauses and parameters required for SQL server?)
    Furthermore, using a DB tool, I can connect to my SQL server using PxRPTUser.
    So why do I get the error above?
    I picked up somewhere that I should not be adding users to BI Publisher. Funny enough, testing the 'login' method the BI Publisher exposes through its WSDL (as above) I noticed I HAD to create the user PxRptUser in BI publisher application itself (on top of PxRptUser in database) for the login web service to work with PxRptUser
    That did not solve the connection between P6 and BI Publisher though. What am I missing ...
    Edited by: user3674522 on 10/11/2011 20:16

    Thought I found something but can't repliacte, som issue is still there:
    Had a look at the wls instance logs where BI publisher is running, and the error I get is:
    111111_023646955][][ERROR] javax.naming.NamingException: Unresolved naming: cn=admin, dc=user, dc=users, dc=principals at [cn=admin]
    That user, admin, is the one I have used to access P6. Why is this passed on to BI Publisher? I thought the idea was that the PxRptUser set in BI Publisher configurations in P6 would be used?
    Edited by: user3674522 on 10/11/2011 20:17

  • API for connecting  to an external database object

    Hi,
    Can anyone provide me with the API for connecting to the external database table and to create , update and delete data with an Oracle external database object.
    Wish you great time.
    Best Regards
    Sid

    Questions like yours are best asked over at the webOS Developer's Forum.  The Palm Support Community here is geared to answering end-user questions about devices, not programming information.
    https://developer.palm.com/
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • Which files are needed for connection to database in 11gR2?

    I'm confused about the following files:
    sqlnet.ora
    tnsnames.ora
    listener.ora
    host file
    If I understand correctly, sqlnet.ora and tnsnames.ora can exist in both client and Oracle database server and listener.ora should only exist in Oracle database server. I guess host file can exist in both client and Oracle database server.
    I'm trying to understand which of the files are needed to access Oracle 11gR2 database using different tools such as
    sqlplus, SQL Developer, and Database Control on Oracle database server or from a client machine.
    If I'm on an Oracle database server, which of the files are needed for accessing 11gR2 database on that server for the different tools?
    If I'm on a client machine, which of the files are needed for accessing 11gR2 database on an Oracle database server for the different tools?

    881656 wrote:
    I'm confused about the following files:
    sqlnet.ora
    tnsnames.ora
    listener.ora
    host file
    If I understand correctly, sqlnet.ora and tnsnames.ora can exist in both client and Oracle database server and listener.ora should only exist in Oracle database server. I guess host file can exist in both client and Oracle database server.
    I'm trying to understand which of the files are needed to access Oracle 11gR2 database using different tools such as
    sqlplus, SQL Developer, and Database Control on Oracle database server or from a client machine.
    If I'm on an Oracle database server, which of the files are needed for accessing 11gR2 database on that server for the different tools?
    If I'm on a client machine, which of the files are needed for accessing 11gR2 database on an Oracle database server for the different tools?sqlnet.ora is used to configure the actions of sqlnet on whatever machine. Some of the config parms available to it apply only to the server side, some apply only to the client side, some apply to both.
    tnsnames.ora is used by client processes to resolve a connect alias to a specicific host, port, and service. It is used ONLY by the client side of tns. You see it on host machines because those machines can also run client processes.
    host file. Oracle doesn't know what this file is. Oracle doesn't give a flying fig about this file. It is used by the standard network software in the OS to resolve a name to an IP address. The only reason you even see it discussed in the Oracle world is because Oracle TNS sits on top of the standard OSI network stack, and uses it. Thus, if your tnsnames file has an entry like:
    houston =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = vmlnx01)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = houston)
    #==========tns will never know or care where vmlnx01 is. The request will be packaged and sent to the standard network stack with a request to "route this package to vmlnx01, wherever that is.". The OS network stack will then resolve 'vmlnx01' to an ip address, by one of several possible methods. ONE of those methods is to look it up in the local hosts file.

  • Dw cs5 with existing wordpress site hosted on yahoo need help connecting to existing remote database

    I am having trouble establishing a database connection.  I can  connect with test databases but am having trouble using dreamweaver wtih  my existing wordpress website.  Am I able to use dreamweaver to edit  and live view my changes before uploading the changed files to my live  site?  Am I able to access my existing wordpress database with  dreaweaver?  I have imported it to my testing server/database but still  seem to be having trouble establishing a connection with it (think maybe  my folder hierarchy might be off).
    macintosh HD/Applications/MAMP/htdocs/nwm/wp/index.php
    "nwm" is the name of the folder that I have copied all of my site  files to and the folder I have dreamweaver pointing to.  "wp" is what I  have all of the wordpress files in (the ones I copied from my yahoo  server - including all my current theme files etc.)
    I am trying to put the info into the mysql connection dialog box:
    Connection Name: Testing (i am assuming this name is for my benefit only and doesn't actually matter)
    MySQL Server: mysql
    User Name: *****
    Password: *****
    Database: wp
    and am getting this message
    MySQL Error#: 2013
    Lost connection to MySQL server at 'reading initial communication packet', system error 61
    did some google seaches of the error.  Tried turning off the  firewall, and the advance tab allow mysql incoming  (there were 2 one  was allow one was not allow.  I changed both to allow)
    Cant really find anything on yahoo to help me out.  Looked in  phpmyadmin database named wp: wp_users to get the username and password  (which due to previous look for help - I think the password was  encrypted cuz it looked like a bunch of mumbo jumbo and am fairly  certain I know the correct password).
    Any help would be greatly appreciated!! I spent $50 on live chat  last night trying to resolve the issue only to find out at the end that  the guy really didn't understand my problem and doesn't have  dreamweaver.  I have also watched countless videos on Lynda.com and have  been thru forum after forum.  While this problem is only a couple weeks  old since I just got CS5.  I have been having trouble making any  headway learning php since I cant seem to make it past the set up  parts.  I have done the php / mysql essential training on lynda.com with  relative success except that I really dont want to work with any more  exercise files so I didn't go on to the beyond the basics. I recently  went thru most of the Dreamweaver CS5 and Wordpress 3. Also did the  first 4 chapters of Dreamweaver CS5 with PHP and MySQL. I need to start  integrating things into my live sites.  I am also trying to work my way  thru the learning php, mysql, javascript book by o'reily media by robin  nixon (as fun as reading a math text book) can't get thru it since I  can't relate any of it to my current sites/needs
    I am on MacBookPro OSX 10.6.6
    Installed MAMP to specification on all 20 tutorials I have tried including lynda.com
    Tested the testing server and is working
    Just installed dreamweaver cs5
    have been using wordpress online to create and edit posts (recently  upgraded to 3.? whatever the latest update was online which I believe  update the files on my yahoo server?)
    Have also installed wordpress on my computer (several times thru each tutorial trying to get this right.)
    Am I expecting the impossible?

    If wordpress controls it's own connection why am I unable to use the live view. I have synced the remote site to my local computer so all the files should be just as they are online with the exception of the DB which contains most of the content.
    I have done all of those steps.  I have even exported the database from inside internet phpmyadmin and imported into computer phpmyadmin.  When I hit live view I get one of couple of errors.
    1.  "One is that the dynamic related files could not be displayed due to an internal server error"
    At some point I was able to view some sample files inside dreamweaver.  But I would like to be able to view my real site files.  I was able to "connect" to the local databases (not the copy of my real one - I think that maybe that was because it is somehow nested inside another db an am going try to reimport to new location).  And then I changed the host/username/password trying to deal with the internal server error. Now instead I get the cannot connect to the database Error 2016 or whatever from the origianl post. Also, I am using yahoo if that matters and all I can find about what their server name is: mysql - is that correct?
    I have been thru this so many times with so many different tutorials I am losing track of what is what.
    2.  Can I access my remote database within dreamweaver? I do not want to create dummy files (seems to be a waste of time).  And while if it had worked exporting/importing a duplicate on to my computer would have satisfied me for a little while it also seems some what counter productive.  Since every post and page is different if I were doing a daily updates etc how would I be able to change the formating or design of them if I can't access the remote files.  Would I re- import everytime I want to work on it to get current database?
    I am trying to be clear.  I listed all the specs I could think as listed  in your "how to get help fast post" (yes I read that at least twice  too) of all of the steps and possible reasons for my problems.  I also  thought that the forum was on a seperate site so I didn't think it would  count as a duplicate.  I am frustrated to tears and am feeling  incredibly stupid that after all this time and all these tutorials yes  you are right I obviously am not understanding what is going on which is  why I am on this forum.

  • Need help connecting a remote MySql database from Iphone

    Hi, i need to connect to a remote MySql DataBase in windows from IPhone but..... i'm a noob with Xcode and Objective-C.
    Can someone help me or explain me the way to do it plz?
    Message was edited by: Krovax87
    Message was edited by: Krovax87

    I do not think MCPKit will help you on the iPhone. It is just an Objective-C wrapper around the standard mysql libraries which are not available for the iPhone. Your best bet would be to post on the mysql forums and see if you can get any help.
    You can try extracting the mysql client library source code into a separate static library project, and see if you can get it to build for the iPhone.

  • What User authorization objects needed for connecting to SAP from xMII?

    We eneter a SAP user and password for connecting to SAP from xMII to retrieve the metadata of the incoming IDocs.
    When I specify a user with SAP_ALL user profiles, the IDocs are received properly in xMII. If I specify a user with privileges to run only certain transactions, IDocs are not received in xMII.
    What user authorization objects are needed for this user to connect to SAP from xMII?
    Thanks,
    Sara

    Sam,
    I turned on the SAP System trace for this user and figured out the following auth. objects are required for receiving IDocs in xMII:
    C_TCLA_BKA
    S_RFC
    S_CTS_ADMI
    B_ALE_MAST
    S_IDOCDEFT
    The following auth. object is required for making JCO call to SAP from xMII:
    C_AFRU_AWK
    Thanks,
    Sara

  • Need for separate instance on RAC database 11g

    Hi Experts,
    Currently we have a RAC 11g database with two instances. Our business is requesting to create one more instance with an user to store historical data. They claim that they need this separate Instance for the following reasons
    1)     Easy backup and recovery for a specific instance in case of historical data
    2)     Point-in-time recovery is possible
    3)     If any other node fails, then it won’t affect this instance
    Please share your expertise on this regard. Thanks in advance.
    Regards,
    Richard

    user12075620 wrote:
    1)     Easy backup and recovery for a specific instance in case of historical dataWhat data will that be? If this is a 3rd RAC instance, then it will not make backup easier as the data is in the database (on shared storage media) and that needs to be backed up - the database's data does not reside locally on the instance.
    2)     Point-in-time recovery is possibleAgain, I do not see how this is a specific advantage that now suddenly occurs with the introduction of a 3rd RAC instance.
    3)     If any other node fails, then it won’t affect this instance Correct - a 3rd instance increases the redundancy in the cluster. It also scales it and provides additional processing capacity.

  • Cable needed for connection?

    Quick question - what cable do I need for the apple tv for a Visio HD TV?

    captfred wrote:
    HDMI works as well as "composite" video.
    appletv does not support composite at all.
    i'm sure you meant component.

  • Is transparent gateway needed to connect to IS Cache database?

    Hello,
    I have been asked by one of our developers how to create a connection from his Oracle 11.2 database to SQL Server and also InterSystems Cache' databases without having to use Transparent Gateway?
    Is this possible, and if so, how can it be done?
    (thanks in advance)

    Hi,
    You say - "I guess it means that Oracle Database Gateway is FREE (per se)" but to make the point again - only the Database Gateway for ODBC (DG4ODBC) is free. The other gateways need a license.
    If you run on Windows then many of the Microsoft ODBC drivers are free or included as part of other products so you do not need to pay for them, and also many non-Oracle database providers include an ODCB driver as part of the product, so again you do not need to pay for anything else to use DG4ODBC, for example MySQL.
    To interface with a Cache database you can use Dg4ODBC but you need to provide the ODBC driver. There is not a 'dedicated' database gateway for that product. That is why we provide the DG4ODBC which can interface with any non-Oracle database or datastore for which a compatible ODBC driver is available.
    This note available on My Oracle Support has information about the install notes on various platforms -
    Note.1083703.1 Master Note for Oracle Gateway Products
    Regards,
    Mike

  • Need help connecting a MS Sql Database in CF Administrator

    Good morning,
    I`m hoping someone out there can help me.
    I simply want to add a MS SQL datasource within Coldfusion Administrator.
    I have connected to it successfully with Sql Server Management Studio, using Windows Authentication.
    I`m assuming I need to use Windows Authentication to connect within Coldfusion Administrator
    How do I fill out these fields then:
    because I am getting this error:
    Connection verification failed for data source: test
    java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer  JDBC Driver]Error establishing socket. Unknown host: local
    The root cause was that:  java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC  Driver]Error establishing socket. Unknown host: local
    I have also tried it with localhost as opposed to local.
    Please help?
    Thanks;
    Rhonda

    I believe you DON'T.
    ColdFusion, by default, does not run as any type of user that would work with Windows Authentication.  It can be set up to do so, through the windows services panel.  You configure the ColdFusion service(s) to "Log On As" some windows domain account with the desired permissions.  This is normally done to allow CFML code to access network resources for file operations and the like.
    But, I don't know if that is good enough for a connection to a SQL server.  I've never had to deal with it myself (I have operations and database administrators types who deal with this for me).  But I have read many many times on forums like this that the default security configuration of SQL server does not work with ColdFusion.  That one has to set up an alternate configuration in SQL, TCP/IP I think?

  • Examples needed for Idoc to file and IDOC to web services

    Hi ,
    Could any one of you give some examples which take me through step-by-step in building IDOC-TO-FILE and IDOC-TO-WEB SERVICES?
    Regards,
    XI Developer.

    Hi,
    For IDOC scenario you need to first do the required configuration:
    ALE configuration for pushing idocs from SAP to XI
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    Testing purpose u can use the below method:
    IDOC testing using WE19
    /people/sameer.shadab/blog/2005/07/25/reposting-idocs-instead-of-recreating--for-testing-purpose-xi
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters --> For Idoc sender: IDOC -file
    IDOC configuration:
    Please follow the below process for configuration:
    Pre-requisites for Inbound IDoc to R/3 from PI:
    Configuration required at Xi side:
    Go to IDX1: configure the port.
    Go to IDX2: load the DOC metadata.
    Go to SM59: Create RFC destination which points to R3 system this is require in the case where your IDOC is sent to R 3 system,
    Configiration required at R3 side:
    Maintain Logical System for PI (SALE transaction):
    Maintain Partner Profile for XI system(WE20):
    Pre-requisites for Outbound IDoc from R/3 to PI:
    Configurations required in R/3:
    Maintain Logical System (SALE)
    Define RFC Destination (SM59) which points to PI system
    Maintain Port (WE21)
    Maintain partner profile. (WE20):
    Maintain Distribution Model (BD64):
    File To IDOC - Part1 (SLD and Design):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC&
    File To IDOC - Part2 (Configuration):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part2+(Configuration)&
    File To IDOC - Part3 (Steps required in XI and R3):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part3(StepsrequiredinXIandR3)&
    SOAP scenario:
    YOu have to first create the WSDL through ID and import that WSDL in to IR external definition.
    Refer the below thread and pdf:
    How to use SOAP adapter:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f9cd4
    SAP AII - How to consume and expose webservices  ?
    Thnx
    Chirag
    reward points if it helps.

  • One Report needs to connect to 20 different databases

    Post Author: macgary
    CA Forum: Data Connectivity and SQL
    We have 20 identical databases - structurally - but differing in their regional data.
    We have created some various reports that need to run against various databases in SQL Server.   I would like to avoid having to create 20 variations of each report varying only in their database connections.
    Does anyone have an idea of how I can pass the database name into the connection so I can make the one report work on any of my structurally similar databases?
    Thanks,
    Gary

    Post Author: Hieu
    CA Forum: Data Connectivity and SQL
    Select "Set Datasource Location" under the Database menu.

  • Example needed for function module

    kindly provide me an example for function module & let me how to use this function in a report program..Thnaks in advance..

    Hi,
    GO to Tcode SE80.Create fucntion group.Name should start with z or y.
    GO to Tcode SE37.Create function module.Assign it to function group created above.Name should start with z or y.
    In change mode,you can top include.This is the place you should put the declarations.
    In F01,you need to write the form and U01 you should write the main program.Best way is to take any function module(z*) and follow it.
    There are 3 types of fm.
    1.Normal fm
    2.RFC enabled
    3.Update task.
    Check this link for RFC.
    http://help.sap.com/saphelp_47x200/helpdata/en/22/0425f2488911d189490000e829fbbd/frameset.htm

  • Create RFC for connecting BW with external database (ORACLE)

    Hello,
    I want to connect to a seperate oracle database from SAP BW system. For that i have to create a RFC.
    I hope i have to ctrate a TCP/IP connection.
    In SM59, I can see " start on explicit host " option where i have to give the program name. I dont know which program name i have to enter or from which location in sap/OS level i can find the program name.
    Please suggest the program name or the location.
    Thanks & REgards
    Prasanth

    Hi,
    Can anybody answer to my thread?
    Regards
    Prasanth

Maybe you are looking for