How to create a Connection to UDB Database through OIM APIs.?

Hi,
In our OIM (9.1.0.2) implementation, there is a need to connect to a UDB database to execute some select queries and get the data. Is there any way in which I can do this?
I tried creating an ITResource to have all static database related information, but I was not able to use that ITResource and create an actual database connection in the java code.
As far as possible, I don't want to use any JDBC code to create the connection but want to know if there are any inbuilt OIM APIs which can help me in creating a database connection to point to the UDB database.
(We don't have the DBUM connector deployed.)
Please get back with your views/info on this.
Thanks,
Kulesh...

Here is a constructor code for connecting to a database:
     public DatabaseConnection(String hostname, String port, String driver, String sid, String admin, String password) throws ClassNotFoundException, SQLException{
          log.info(CLASS_NAME + " -----> inputs=hostname[" + hostname +
                    "]port[" + port +
                    "]driver[" + driver +
                    "]sid[" + sid +
                    "]admin[" + admin +
                    "]password[********]");
          Properties connectionProps=new Properties();
     connectionProps.setProperty("user", admin);
     connectionProps.setProperty("password", password);     
     String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=" + hostname +
          ")(PORT=" + port +
          "))(CONNECT_DATA=(SID=" + sid + ")))";
     Class.forName(driver);
          con = null;     
     con = DriverManager.getConnection(url, connectionProps);
If you want to use SSL, you will want to configure tcps for jdbc connection to the database, or any other form of connection and update your URL string for it.
-Kevin

Similar Messages

  • How to create JDBC connection in J2ME with MS-SQL server?

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

  • How to create dynamic connection string with variables using ssis.

    Hello,
    Can anyone let me know on how to create dynamic connection string with variables using ssis?
    Any help would be appreciated.

    Hi vinay9738,
    According to your description, you want to connect multiple database from multiple servers using dynamic connection.
    If in this case, we can create a Table in our local database (whatever DB we want) and load all the connection strings.  We can use Execute SQL Task to query all the connection strings and store the result-set in a variable of object type in SSIS package.
    Then use ForEach Loop container to shred the content of the object variable and iterate through each of the connection strings. And then Place an Execute SQL task inside ForEach Loop container with the SQL statements we have to run in all the DB instances. 
    For more details, please refer to the following blog:
    http://sql-developers.blogspot.kr/2010/07/dynamic-database-connection-using-ssis.html
    If there are any other questions, please feel free to let me know.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to create a user in UME Database using web dynpro java custom application

    Hi,
    Can you please suggest me how to create a user in UME Database using web dynpro java custom application.
    My Requirement is user can register his/her user id in SAP Portal 7.3 UME database.
    Please suggest me.
    Thanks and Regards,
    Amit

    Hi Amit,
    Generated Documentation (Untitled)
    This is what you're looking for, there's no real cook-book -- though Amey mentioned there might be some material on SDN, perhaps some tutorials.
    You should be looking into com.sap.security.api.IUserFactory, methods newUser(String) which gives you and IUserMaint and commitUser(IUserMaint, IUserAccount) -- IUserAccount can be obtained using com.sap.security.api.IUserAccountFactory, method newUserAccount(String)
    Hope it helps,
    D.

  • How to create multiple instance on same database

    Hi ,
    I would like to know how to create multiple instance on same database . I know that some people use database configuration assistant to do this but i could not figure out how they did it.
    Any how if some one can help me with this and can give me links of this it would be great help for me.
    Thank you for reading my problem and helping me !
    Amil
    please if possible mail me on [email protected]

    How to create multiple instance?????Do you mean multiple instances on the same database, or multiple databases on the same machine ?
    I m new to this field....
    Willin to learn a lot about oracle....Then it wouldn't be bad reading a bit of Database Concepts

  • How to create a connection pooling in Netbeans 6.0 using the oracle driver

    hi all,
    I am using Netbeans 6.0. Apache Tomcat 6.0.14 server, oracle 9i.
    I tried to create a connection pooling using tomcat web server.
    I have included the following code in context.xml and web.xml.
    CONTEXT.XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/network1">
    <Resource name="jdbc/myoracle"
    auth="Container"
    type="javax.sql.DataSource"
    username="scott"
    password="tiger"
    factory="BasicDataSourceFactory"
    driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:odbc:thin:@127.0.0.1:1521:mydb"
    maxActive="20"
    maxIdle="10"
    maxwait="-1"/>
    </Context>
    WEB.XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/myoracle</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    After that i have included the following JDBC driver's jar files in the $Catalina_Home/lib folder.
    classes 111.jar,
    classes 111_g.jar
    classes12.jar
    classes 12_g.jar
    classes12dms.jar
    classes12dms_g.jar
    nls_charset11.jar
    nls_charset12.jar
    ocrs12.jar
    ojdbc14.jar
    ojdbc14_g.jar
    Then i stop the tomcat web server and start it again.
    In jsp page i have included the following code:
    Context ctx=new InitialContext();
    Context envctx=(Context)ctx.lookup("java:comp:env");
    DataSource ds=(DataSource)envctx.lookup("jdbc/myoracle");
    Connection con=ds.getConnection(); ----->(In this line an error occured that Connection class cannot be found.)
    please help me how to create a connection pooling and rectify the error in conneciton.
    Thanks in advance

    Please refer
    http://www.netbeans.org/kb/60/web/customer-book.html

  • How to create dynamic connection in business view manager.

    Hi Sir,
    Can u explain how to create dynamic connection in business view manager.
    Thanks
    Vishali Raghava Raju

    HI Vaishali,
       Can you please elaborate your requirement ?
    -Regards
    B

  • How to change a connection with the database in Runtime?

    How to change a connection with the database in Runtime?
    My connection was made using ADF Business component (ApplicationModule).
    ADF Swing.
    JDeveloper Studio 11.1.1.4.0.

    When deploying ADF applications with database connection, you should be using JDBC data sources configured in the weblogic server.
    You could change the JDBC data sources to a different DB instance or location - by changing the JDBC data source and restarting the weblogic server.
    For more details, check
    http://techiecook.wordpress.com/2010/12/02/oracle-weblogic-adf-datasources/
    Thanks,
    Navaneeth

  • How to create db connection in IBM WebSphere IDE

    Hi,
    I am using IBM WebSpher 5.1.1. And i want to create a back end using ms-access. Can any one suggest me how to create the connection.
    While i used
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    i am getting class not found. So i assumed that IBM doesnt provided such driver in the IDE.
    So can any one tell me the alternative to make a back end connection for Ms Access.
    Thanks,
    Girish.K

    Hi,
    I have just nw, got it succeeded.
    I just granted
    SQL> grant sysdba to sri;
    After that I am able to create connection with role 'sysdba'. Hope this post would be useful for someone who tries.
    Thanks for your reply.
    Regards,
    Sabarisri. N
    Edited by: Sabarisri Nagalingam on May 6, 2011 2:42 PM

  • How to create punlic connection in discoverer plus

    Hi All,
    There is one public connetion in discoverer plus but now it is disable , i dont know how to create public connetion
    pls help me its urgent
    thanks
    regards,

    See you duplicate post - how to create public connection in discoverer plus
    Srini

  • How to create TNS entry for db2 database?

    hi,
    I want to create a db2 database tns entry in tnsname.ora file. How do i create?
    thanks

    There seem to be several related threads about this concern.
    Creating dblink for db2 database
    How to create TNS entry for db2 database?
    How to create TNS entry for db2 database?

  • How to create db connect

    Hi All,
    Please provide some inputs for  How to create DB connection from BW- step-by-step procedure.
    Advanced Thanks,
    Chandra

    Hi,
    check this thread.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2f0fea94-0501-0010-829c-d6b5c2ae5e40
    http://help.sap.com/saphelp_nw2004s/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm
    Thanks
    Ajeet

  • I want to connect Visual foxpro database through forms6i.

    Hi ,
    I want to connect Visual foxpro database through forms6i.
    actually i want to access Visual foxpro database in forms6i and retrive and update data from forms6i.
    please help me urgently how can i do this in forms6i.
    Thanks,
    Md.Muniruzzaman Khan
    Email : [email protected]

    do the following steps for hetrogenous service
    Step 1
    Create ODBC named Access1.
    Step 2
    Go to urs inithsodbc.ora file which reside at
    ORACLE_HOME\hs\admin\inithsodbc.ora
    and overrite by
    # 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 = Access1
    HS_FDS_TRACE_LEVEL = off
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    Step 3
    Add the following entry to the tnsnames.ora file:
    ACCESS1.WORLD =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    (CONNECT_DATA=(SID=ACCESS1))
    (HS=OK)
    Step 4
    Add the following entry into the listener.ora file:
    (SID_DESC=
    (SID_NAME=ACCESS1)
    (ORACLE_HOME=D:\Oracle)
    ---Define urs oracle home path in mine case it is at D:\Oracle--
    (PROGRAM=hsodbc)
    Step 5
    Reload the listener from contol panel services yours listener service
    Step 6
    Create a database link using:
    CREATE DATABASE LINK access1.world CONNECT TO "MyUser" IDENTIFIED BY "MyPassword" USING 'ACCESS1.WORLD';
    Step 7
    Connect to scott/tiger
    Query the table using:
    SELECT *
    FROM [email protected];
    Step 8
    Same you can connect to urs forms and write above sql in cursor
    Acknowledge me.
    Khurram Siddiqui

  • Can i connect to the database through the internet

    hi all
    i installed a database oracle 8i enterprise edition on a pc that exists in a town far from me . i wonder can i connect to this database through the internet from my house
    please i need a answer
    thanks in advance

    You can connect from an Oracle client to any Oracle database in the world that meets certain requirements.
    First you need an open network connection between the two points so either no firewall exists between the two stations or the firewall(s) have been configured to allow Oranet traffic. This means both databases must have access to the Internet and certain ports are open.
    Second you will need the IP address and port for the remote listener, which in turn must be up and running on the target server.
    Then you must have the Service Name or SID and a valid username/password combination for the target database. Plus the username must have create session privilege.
    That should be about it.
    HTH -- Mark D Powell --

  • How to create the folder in presentation server through pop-up(

    Hi Experts,
    Can u give me the solution , how to create the folder in presentation server through pop-up(means dynamically, after executing the program , pop-up has to come to create the folderand path)
    regards
    ram.

    Use the methods -> DIRECTORY_BROWSE & DIRECTORY_CREATE of the class CL_GUI_FRONTEND_SERVICES
    DATA: path TYPE string,
          rc TYPE i,
    dir_name TYPE string value 'HI'.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
        CHANGING
          SELECTED_FOLDER      = path
      IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    concatenate path '\' dir_name into path.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
        EXPORTING
          DIRECTORY                = path
        CHANGING
          RC                       = rc
      IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Edited by: Kartik Tarla on Sep 23, 2009 5:54 PM

Maybe you are looking for

  • ITunes won't recognize my iPod all of the sudden

    I've got a 40GB iPod that I purchased about 2 years ago. It's about 1/2 full. For some reason iTunes stopped recognizing my iPod when I plug it into the dock. In the past "Jeff's iPod" would show up in the left hand column, I would copy music from CD

  • BDC  for purchase order

    Hi guys I have written the following program to upload the purchase order data by using BDC call transaction method, now I want to write whatever is in the message table, I mean the errors if there are any and the other required fields. So can you pl

  • Has anyone returned an iPod for a gift card

    Hi everyone. Apple was kind enough to return my 3 week old refurbished iPod video so I could get a new one. Now I am iPodless! I was planning on getting a new iPod right away when I got my Gift Card. Seel, I bought the iPod using a gift card. Now the

  • 802.1x ISE, LDAP, and OSX 10.8.2

    We are in the slow process of setting up ISE for 802.1x for all our users. Our Windows guys are working great so far with AD, but or Mac guys use their own LDAP server. I have sucessfully configured the LDAP server into ISE and I am able to authentic

  • Downloaded upgraded version.can't open folders in "my documents"

    a pop up appeared to upgrade to the( 3.6?)did so but now when i try to open my documents folders to do individual entries,they will not open.