Remotely - Execute Query In OIM Database

Hi,
Is there a way to execute a query remotely in the OIM database using the API (tcDataSet)? If yes, how can I get an instance of tcDataProvider to be used with tcDataSet? Via tcUtilityFactory?
I know how to use it in a Schedule Task, but the Schedule Task runs in the OIM context, so when I extend SchedulerBaseTask, it gives me an instance of tcDataProvider with getDataBase() method.
I could not find it, I searched everywhere, metalink, forum, google. Probably I used the wrong keywords...
Thanks a lot!
Regards,
Felipe.

You can't get an instance without being in the scheduler or passing it into your adapter as the Adapter Reference - Database reference. You could though create a simple JDBC library to connect to the database and perform whatever query you want.
-Kevin

Similar Messages

  • Execute query with non database block

    How to execute query with non database block when new form instance trigger.

    Hi Kame,
    Execute_Query not work with non database block. To do this Make a cursor and then assign values to non database block's items programmatically, see following example,
    DECLARE
    BEGIN
         FOR i IN (SELECT col1, col2 FROM Table) LOOP
                :block.item1 := i.col1;
                :block.item2 := i.col2;
                NEXT_RECORD;
         END LOOP;
    END;
    Please mark if it help you or correct
    Regards,
    Danish

  • Running a query On OIM Database inside an adapter task

    Hi,
    How can I run a SQL query to get some value from OIM database table inside an adapter task? How do I get Db connection without using JDBC API inside adapter task?
    Thanks in advance

    create a variable in the adapter factory of type object , map to adapter references- > qualifier database reference.
    you can then use this variable, in your method signature where it requires a database instance. using this database instance you can run sql queries.
    if you need to run a stored procedure, then simply create an adapter -> Fucntional Task-> Stored procedure.

  • Problem in Execute query on non-database block and database block together

    Hi All,
    In my form,i have
    1. First block is Non-database block with one non-database item.
    2. Second and third blocks are database blocks.
    Now the problem is that i want to perform execute-query for all the blocks.
    If the cursor is on the non-database item of 1st block and i clicks on the "Enter-query" then i am getting message " This function can not be performed here".
    If i click on the item of the database block and then clicks on the "Enter-query" and then "execute-query" it's working fine.
    But i don't want to do in this way.
    My cursor will be on the First block only and then it should perform execute-query.
    I am using this non-database item to copy value of this item to the item of the database block item.
    I think i make you understand about my problem.
    I am using forms 10g on Window xp.
    Please help me.

    Hi!
    Simply create a enter-query trigger on the non-database-block:
    begin
    go_block ( 'database_block' );
    enter_query;
    end;If your search criteria is in the non-database-item in the first block,
    you actually do not need the enter_query build-in.
    Just create a execute-query trigger on the first block like:
    begin
    go_block ( 'database_block' );
    execute_query;
    go_item ( :System.trigger_item );
    end;And in a pre-query trigger on the database-block copy the
    value of your seach item into the item you want to search for.
    Regards

  • Issue in creation of group in oim database through sql query.

    hi guys,
    i am trying to create a group in oim database through sql query:
    insert into ugp(ugp_key,ugp_name,ugp_create,ugp_update,ugp_createby,ugp_updateby,)values(786,'dbrole','09-jul-12','09-jul-12',1,1);
    it is inserting the group in ugp table but it is not showing in admin console.
    After that i also tried with this query:
    insert into gpp(ugp_key,gpp_ugp_key,gpp_write,gpp_delete,gpp_create,gpp_createby,gpp_update,gpp_updateby)values(786,1,1,1,'09-jul-12',1,'09-jul-12',1);
    After that i tried with this query.but still no use.
    and i also tried to assign a user to the group through query:
    insert into usg(ugp_key,usr_key,usg_priority,usg_create,usg_update,usg_createby,usg_updateby)values(4,81,1,'09-jul-12','09-jul-12',1,1);
    But still the same problem.it is inserting in db.but not listing in admin console.
    thanks,
    hanuman.

    Hanuman Thota wrote:
    hi vladimir,
    i didn't find this 'ugp_seq'.is this a table or column?where is it?
    It is a sequence.
    See here for details on oracle sequences:
    http://www.techonthenet.com/oracle/sequences.php
    Most of the OIM database schema is created with the following script, located in the RCU distribution:
    $RCU_HOME/rcu/integration/oim/sql/xell.sql
    there you'll find plenty of sequence creation directives like:
    create sequence UGP_SEQ
    increment by 1
    start with 1
    cache 20
    to create a sequence, and
    INSERT INTO UGP (UGP_KEY, UGP_NAME, UGP_UPDATEBY, UGP_UPDATE, UGP_CREATEBY, UGP_CREATE,UGP_ROWVER, UGP_DATA_LEVEL, UGP_ROLE_CATEGORY_KEY, UGP_ROLE_OWNER_KEY, UGP_DISPLAY_NAME, UGP_ROLENAME, UGP_DESCRIPTION, UGP_NAMESPACE)
    VALUES (ugp_seq.nextval,'SYSTEM ADMINISTRATORS', sysadmUsrKey , SYSDATE,sysadmUsrKey , SYSDATE, hextoraw('0000000000000000'), 1, roleCategoryKey, sysadmUsrKey, 'SYSTEM ADMINISTRATORS', 'SYSTEM ADMINISTRATORS', 'System Administrator role for OIM', 'Default');
    as a sequence usage example.
    Regards,
    Vladimir

  • How to Execute a Remote Procedure in Portal using Database Link

    Hi,
    I followed the instructions to create a Portal form for a remote procedure. But I am encountering the following error. Can someone advise what may be the cause?
    Failed to execute - Missing string(create_package_body) language(us) domain (wwv) sub_domain (wwv_builder) (WWV-04300)
    ORA-04020: deadlock detected while trying to lock object PUBLIC.PORTLET_SCHEMA (WWV-11230)
    Failed to parse as PORTAL - (WWV-08300)
    PURPOSE
    How to execute a remote procedure in Portal using Database Link.
    DESCRIPTION
    This procedure assumes that you have two databases, one of which is remote, and Portal is configured in the other.
    Remote Database A:
    ==================
    1) Create a procedure as follows: Create or Replace PROCEDURE SCOTT.ADD_TWO_VALUES ( v_one IN NUMBER, v_two IN NUMBER, v_result OUT NUMBER) as begin v_result :=v_one+v_two; end; 2) Grant execute privileges to PUBLIC on the procedure.
    Database B (where Portal is configured): ========================================
    1) Create a public database link and choose to connect as a specific user (say SYSTEM). By default, in an Oracle 8i database, the "global_names" parameter in initSID.ora (or init.ora) file is set to "true". This Global Naming parameter enforces that a dblink has the same name as the database it connects to. Therefore, if the remote global database (A) name is "ora8.acme.com" then the database link should also be named as "ora8.acme.com".
    2) Create a synonym for the procedure in Database A. Make sure you fully qualify the procedure name in the remote database (like SCOTT.ADD_TWO_VALUES).
    3) Create a dynamic page to execute the procedure. The ORACLE tags in the dynamic page will look similar to the following: <ORACLE> DECLARE v_total NUMBER; BEGIN ADD_TWO_VALUES(:v_one,:v_two, v_total); htp.p('The total is => '); htp.p('<input type="TEXT" VALUE='||v_total||'>'); htp.para; htp.anchor('http://<machine.domain:port#>/pls/portal30/SCOTT.DYN_ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure'); END; </ORACLE>
    4) Portal does not have an option to create a form based on a synonym. Therefore, if you want to create a form instead of a dynamic page, create a wrapper procedure and then create a form based on this procedure. For example: Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES_PR ( v_one IN NUMBER, v_two IN NUMBER, v_total OUT NUMBER) as begin add_two_values(v_one, v_two, v_total); end;
    5) Grant execute privileges to PUBLIC on the procedure.

    hello...
    any input will welcomed... Thanks..

  • Executing SQL query in portal database

    Hi ,
       I wish to do a simple POC . I need to create a table from NWDS , populate it with some data and then access the table data using an sql query . I am aware how to create a table but I am not sure where exactly to write the query .
    What I would like to understand is
    1) If I create a table where would that table get created (The database) ?
    2) Where would I write that query in NWDS ?
    3) How would I execute that query in that database ?
    Please help for the same .
    (Needless to say that I always award points )
    Regards
    Deepak Singh

    Hi Gopal ,
       Thanks for the reply .This is what I did . I am pasting the whole code of the class that I am using to do the POC .
    package com.gravity;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.util.Hashtable;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    /*import sun.jdbc.odbc.ee.DataSource;/
    @author Administrator
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class DataHandling {
    public static void DataPost(){
         Connection con = null ;
         try {
    Added code
            Hashtable env = new Hashtable();
              env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
              System.out.println("initial_context_factory put ");
              env.put(javax.naming.Context.PROVIDER_URL, "gms29:50004");
              System.out.println("provide_url put ");
              env.put(javax.naming.Context.SECURITY_PRINCIPAL, "j2ee_admin");
              System.out.println("security_principal put ");
              env.put(javax.naming.Context.SECURITY_CREDENTIALS, "gravity");
              env.put("domain", "true");
              env.put("force_remote", "true");
              System.out.println("security_credentials put ");
              InitialContext iCtxt = new InitialContext(env);
              System.out.println("Object made for initial context ");
              DataSource ds = (DataSource) iCtxt.lookup("jdbc/my_db");
              System.out.println("Datasource obtained ");
              try {
                   con = ds.getConnection();
                   Statement stmt = con.createStatement();
                        String query1 ="insert into EmpData (EMPCODE,EMPNAME) VALUES('naveen',125188)";
                        String query2 ="insert into EmpData (EMPCODE,EMPNAME) VALUES('deepak',125189)";
                        String query3 ="insert into EmpData (EMPCODE,EMPNAME) VALUES('rajeev',125190)";
                   stmt.executeUpdate(query1);
                   stmt.executeUpdate(query2);
                   stmt.executeUpdate(query3);
                  }catch (Exception e) {
                   e.printStackTrace();
             }catch (Exception e) {
                    e.printStackTrace();
                                         } finally {
                                            try {
                                            con.close();
                                                }catch (Exception e) {
                                                e.printStackTrace();
    public static void main (String[] args){
         System.out.println("Hello");
         DataPost();
    I have imported all the driver jar files and sapj2eeclient.jar in the classpath .
    Also the drivers found in the path
    172.16.161.11\usr\sap\EP1\DVEBMGS00\j2ee\cluster\server0\bin\ext\com.sap.portal.jdbcdrivers
    have all been added to the classpath .(Not sure if this is required)
    Let me know what you find wrong in my code and in the meanwhile I will try to implement what you suggested .
    Regards
    Deepak Singh

  • How to find last executed query on database and or schema.

    hi,
    how to find last executed query on database and or schema.
    yours sincerely

    Sessionwise if you wanna see means use v$session.. Because it will show execution time also so you can analyze it easily and get sql based on SID and serial number ..
    Try :
    select * from v$session;
    Regards..

  • Web Analysis Error -- Error while executing query and retrieving data

    Regarding Web Analysis:
    We have a number of reports that we created. yesterday they were all working fine. today we try to open them and most are generating an error.
    The error is:
    Error while executing query and retrieving data.; nested exception is:
    com.hyperion.ap.APException: [1033] Native:
    1013033[Thu Oct 22 09:08:17
    2009]server name/application name/database name/user name/Error91013033)
    ReportWriter exit abnormally
    Does anyone have any insight into what is going on?
    My version information is:
    Hyperion System 9 BI+ Analytic Administration Services 9.3.0.1.1 Build 2
    Web Analysis 9.3.0.0.0.286
    Thanks in advance for your help.
    DaveW

    Hi,
    And also click on check option by opening the query in Query designer,as Mr . Arun suggested.
    And if you get any error in checking, see the long message(detail).
    With rgds,
    Anil Kumar Sharma .P

  • 5200 : Error in executing  query -- Hyperion Financial Reporting

    Problem in accessing the Hyperion Financial Reports.User is having full access and able to access all the folders except one folder(Legal Folder reports). We are getting 5200: Error Executing the query error. Recently we have upgraded Hyperion to 11.1.1.3 version . Before upgrade user is not facing the problem. After Upgrade user is getting these errors while accessing the reports. we did research and found in "Error 5200: Error Executing Query" When Viewing Financial Reporting (FR) Reports". Is this error is relevant to the Information provided in Metalink and also can you please tell us is there any impact on doing the solution provided in the below. Why is this error is coming is any preferences needs to be changed.Please help us on this.
    Error Description:
    5200: Error executing query
    Servername/ApplicationName/DatabaseName/Error(1007090) Unknown Member name [Current Point of view for years] in Outline Query
    Doc ID 1107142.1:
    Possible Cause 1:
    If members have recently been added, moved, or deleted from the data source, Essbase, HFM, or Planning, the existing User POV records become out of sync.
    The User Point of View record uses indexing to identify the member. If the index changes because of changes in the outline, the User Point of View record no longer points to the correct location in the outline.
    To resolve the issue, you need to run the ManageUserPOV utility on a Windows server that has the Financial Reporting Reports Server, or in a Unix or Linux environment, has the Financial Reporting Print Server installed.
    You will need to provide a BIPlus Global Administrator user ID and password to run the utility.
    The utility will provide the correct syntax to run the command.
    1. In \Hyperion\products\biplus\bin\ManageUserPOV.properties, specify the following parameters:
    a. ReportServer
    b. DatasourceUser
    c. DatasourcePassword
    d. User
    e. Datasource (You can find the datasource in Workspace under Tools>Database Connection Manager in the Name column.)
    2. From the command line, cd to Hyerion\products\biplus\bin
    3. Type in "ManageUserPOV" without the quotes. The executable will read the parameters previously set in the ManageUserPOV.properties file.
    Thanks,
    Naresh.

    Take a look at this: http://adistrategies.com/index.php?loc=knowledge1&item=291
    Hope it helps.
    Mehmet

  • HFR Issues - "5200: Error executing query: Invalid Item ID"

    Hi All,
    We are using Hyperion HFM application 11.1.1.3. Recently we have upgraded the Oralce Database to 11.2.0.2 and reconfigured the HFM application with this new database version. When I tried to run the Financial reporting through the HFR studio, I am getting error message - "5200: Error executing query: Invalid Item ID". Please could you help me to resolve this issue.
    Thanks,
    Aravindh K

    This was due to an invalid default Point of View for the user that was incompatible with the particular report.
    Change the Preferences to User Point of View Preview and run the report again.
    File > Preference > Financial Reporting > Select Preview "ON" under USer Point of View box.
    Re-run the report and select the desired POV.
    This will prompt the user to change their POV every time he or she opens a report. They can select the correct POV and the report runs correctly.
    You can turn off later. Let me know if it fixed this issue.

  • HFR - 5200: Error executing query: Invalid Item ID

    Hi All,
    We are using Hyperion HFM application 11.1.1.3. Recently we have upgraded the Oralce Database to 11.2.0.2 and reconfigured the HFM application with this new database version. When I tried to run the Financial reporting through the HFR studio, I am getting error message - "5200: Error executing query: Invalid Item ID". Please could you help me to resolve this issue.
    Thanks,
    Aravindh K

    Did anything change on the database side? Alias, member name? "Error executing query" usually is associated with a change in the database.
    Regards
    Celvin
    http://www.orahyplabs.com

  • 5200 : Error Executing query , Invalid Item ID in HFR

    Hello,
    To start with I read about this Error in OTN discussion forum itself and none of them helped in this situation.
    Basically , We are trying to Make some modifications in a Report from Financial Reporting studio. When tried to run the report within HFR got this Error. The FR Admin logged out and signed in with my ID , it worked. Seems like user specific. Just wondering how can the report run from my ID rather than an Admin ID. And this is specific to only certain set of reports.
    Any comments ?
    Thanks !!

    Did anything change on the database side? Alias, member name? "Error executing query" usually is associated with a change in the database.
    Regards
    Celvin
    http://www.orahyplabs.com

  • Error Executing Query

    Hi All,
    I am working on financial report 11.1.1.3. I created a income statement report using database connection plandetails.
    While in web preview warning message like " 5200:Error executing query. The data form grid is invalid. Verify that all members selected are in essbase. Check log for details.com.hyperion.planning.HSPException".
    please, any one help me to sort out this issue.
    Thank You,
    EP

    Check that the user is provisioned for the Planning application. Not exactly sure of the minimum role in 11.1.1.3, but "Planner" should be sufficient, possibly view user (I'm using 9.3.1 roles as an example).

  • Why do I get a table read error in DB Tools Execute Query.vi

    Hello all,
    I am using LV8 and the database connectivity toolkit.  I can connect to my server database and use the "DB Tools List Tables.vi" to pull the list of tables in the database, but when I try to use an sql command into "DB Tools Execute Query.vi" I get a : Error -2147217911 occurred at Conn Execute.vi->DatabaseTest2.vi message.  In the possible reasons it says : Possible reason(s):
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'tblShopOrders'. in Conn Execute.vi->DatabaseTest2.vi
    I can open and edit this table with MSAccess.
    Any ideas as to the cause of this error?
    Jim
    Jim
    LV 2013

    Hey Andy,
    Since my first post I have discovered a bit more (not enough yet).  Firstly, I can access all of the tables using MSAccess (causing me to assume that I have the necessary permissions).  I am using the "DB Tools Execute Query.vi" with an SQL query and "DB Tools Fetch Recordset Data.vi" objects to try to get data.  I don't get an error when connecting to the database, but the error occurs at the execute query vi.  The database has a large number of tables, and I discovered that I can retrieve data from some of them using the above method.  I looked into the user and group permissions in the MS access security settings and found that the permissions were checked for all of the tables that I could open, and not for the rest.  I checked them on the ones I want to open, but this didn't help.  I went back into Access and made sure that they were still checked and they were.  And that's as far as I have gotten so far.
    Thank you for any help that you can provide.
    Jim
    Jim
    LV 2013

Maybe you are looking for

  • T-Code to view stock report

    Dear Frndz, What is the T-code to view the system in-stock report. Regards, Srini

  • Crawler create error

    crawler create error help me~~ ====================================================== 2315     portal.doostg01.Administrator     8-1-2007     15:22:06.539     Debug     OpenKernel.OpenHttp.Network     .NET #293      com.plumtree.openkernel.impl.openh

  • Re: Is it possible to have two Skype To Go Access ...

    I spend part of the year in USA and part of the year in UK, and would like a "Skype to Go" number in each country. I originally setup Skype in the UK, but my current "Skype to Go" number is in USA. I can't remember specifying where the exchange/numbe

  • Standard Text printing in SAP Scripts

    Hi All, Iam printing data from Standard Text it is printing but i need like                         Bank            ICICI but the below is giving                        Bank ICICI AS    ,,,,,,,,,,,,,,Bank,,,,,,,, /:       INCLUDE &V_ACC& OBJECT TEXT

  • DW8 site store

    hello! Some of my colleagues are facing a re-installation of their PCs, and we would like not to lose our site information. We wonder: Where do we find the file that stores the sites DW8 works with? i cant find anything about it in the documentation.