How to run the Oracle Triggers,Functions and Procedures from java

Hi ,
I want to execute the Oracle's Triggers, Functions and Procedures from java as like executing the SQL commands by using Execute statements.
Or can we have some other option for doing this.
Plz help me ...

you can use CallableStatement interface of JDBC to execute any DBMS triger,stored procedure ....
refer any of the JDBC book for extra help
hope you got it
Azeem Ahmed

Similar Messages

  • How to run the Oracle SOA Suite and all its prerequisites on different mach

    Greetings,
    Due to the difficulty to run the SOA Suite and all its prerequisites, including JDeveloper, on a single machine, I would like to deploy the admin server, the soa server and the bam server on separate machines. Is it possible and, if yes, how ?
    Kind regards,
    Nicolas

    yes.
    You can just install db + rcu + wlst + soa on 1 machine. After that you middleware should be up and running.
    Now you can install jdeveloper + soa extensions on your client and connect to the remote location of the soa server
    or did i misunderstood you ?

  • Calling Oracle Functions and Procedures in Java

    I've looked online for a blurb on using Oracle SQL functions and
    procedures in Java, but I haven't found anything. Can someone
    either give me a quick crash course on this, or point me to the
    best source of information for this?

    From the SQLJ FAQ.
    http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#sqljplsql
    Within your SQLJ statements, you can use PL/SQL anonymous blocks
    and call PL/SQL stored procedures and stored functions, as in the
    following examples: Anonymous
    block:
    #sql {
    DECLARE
    n NUMBER;
    BEGIN
    n := 1;
    WHILE n <= 100 LOOP
    INSERT INTO emp (empno) VALUES(2000 +
    n);
    n := n + 1;
    END LOOP;
    END
    Stored procedure call (returns the maximum
    deadline as an output parameter into an output host expression):
    #sql { CALL MAX_DEADLINE(:out maxDeadline) };
    Stored function call (returns the maximum
    deadline as a function return into a result expression):
    #sql maxDeadline = { VALUES(GET_MAX_DEADLINE)
    Of course, you can also use JDBC code to achieve the same - the
    standard JDBC escape sequences for stored function and procedure
    calls are supported, using for example:
    "{? = CALL GET_MAX_DEADLINE}"
    or:
    "{call MAX_DEADLINE(?)}"
    and for the rest of the details, get that JDBC crash course...

  • How to run the oracle application cleint using static ip or domain please e

    How to run the oracle application cleint using static ip or domain please explain me.
    i am not able to run oracle forms in client machine how to run it please explain me
    Please give me detail regarding that
    any body please help me.
    my mail id::::: [email protected]

    You did not mention exactly which Forms version you are using so it will be difficult to offer specific help. However, you did mention Forms 9i. ALL "9i" releases were desupported long ago, so find software or documentation are becoming more difficult.
    Here is the Deployment Guide for Forms 10.1.2
    http://download.oracle.com/docs/cd/B19375_07/doc/frs/forms/B14032_03/toc.htm
    Here are some technical reference for Forms 9.0.x
    http://www.oracle.com/technology/products/forms/techlisting9i.html

  • How To... Execute Planning Functions and Sequences from MS Office Ribbon

    Dear all,
    I am working with a SAP how to paper, which is called:
    How To... Execute Planning Functions and Sequences from MS Office Ribbon.
    It is working absolutely fine and I am pretty satisfied, but as you probably know "Control the visibility of a button based on the visibility of a related crosstab: the  button just disappears once the related crosstab is not located on the active sheet."
    This means, when I insert different queries in different crosstabs, only one crosstab will have my own created ribbon. Is it also possible to set another specific ribbon with other buttons for another crosstab? Can I change the macro, included in the appendix of the how to paper, regarding this issue?
    Thanks in advance!
    Kind regards
    Dominik Drebinger

    Hey Martin,
    thanks for your reply, but I solved the problem on my own. Unfortunately my colleague did not see that the crosstabs had to be defined differently.
    Like this:
    Label
    Screentip
    Msolmage name
    Crosstab name
    Copy Initial Aligned
    Copy Initial Aligned
    CacheListData
    SAPCrosstab1
    Copy Initial Aligned 
    Copy Initial Aligned
    CacheListData
    SAPCrosstab3
    Copy Initial Aligned
    Copy Initial Aligned
    CacheListData
    SAPCrosstab5
    The macro, provided by the HowTo, is therefore working perfectly fine.
    Thanks though
    Dominik

  • Oracle Form functions and procedures in APEX, how?

    I am working to recreate in APEX, already existing Read Only Forms in Oracle Forms. APEX Interactive Report functionality among other things, makes it worth while as well as targetting a different audience than the one that utilizies the Oracle Form versions. Oracle Forms versions use lots of pre and post query triggers, PLSQL Functions.
    In Oracle Forms one of the places those functions can be located is in the "Program Units" section of the Form. A typical function of this sort, based on a specific Mission ID Itinerary, collects scheduled passengers last names, formats them with a comma and space after each one, into a single string that is returned and displayed as the passenger list of one row.
    I have all this code written so I can move most of the main query of the Oracle Form into an Interactive Report. These functions and triggers called from within the Form, from the "Program Units" section of the Oracle Form rather than being stored in the Database schema in a package, where would they go inside APEX? Can I create a "Shortcut" in APEX and call it from the Interactive Report "Region Source"? Can I create the PLSQL function at the page level or region level of the Interactive Report? Or, is my best bet creating a package stored in the database, of all these functions and/or proecedures I may need from the original Oracle Form?
    Some advice would be greatly appriciated.

    RLBickham wrote:
    I don't think I have been clear enough in describing the specific thing I want to do, it simply does not reach the level of forms to APEX conversion. It is basically a PLSQL Function problem.
    I have an Interactive Report that is currently getting 90 percent of what I want however, each row, representing a Mission may have multiple legs. Each Leg has two locations or ICAO codes attached to it. Based on the Mission number, I want to loop through the leg table, collect all the ICAO codes for that Mission, put them all into 1 variable separated by a coma and add that variable to the column display of that Interactive Report as the last column.
    In Oracle Forms I have a function saved to the database that is called within the main query. Maybe I am asking a question that does not need to be asked but in any case my question is can I put that function currently in the database somewhere in the confines of the Interactive Report and reference it via Http somehow or should I just stick with putting functions and procedures in packages stored in the database and called the conventional way?You could move the function to the database and call it from the report query, but it sounds as if it's superfluous. In the report query use whatever form of Re: 4. How do I convert rows to columns? is appropriate to your (unspecified) database version.
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.

  • Running SQL Server Function and Procedures from Oracle

    I am trying to run SQL Server 2005 functions and/or procedures from a SQL statement in Oracle. I have gone throught the hetergeneous services and have connected to the SQL Server database successfully. I can also do a query to a table in SQL Server successfully; but I have not been able to execute a procedure or a function.

    Have you tried Oracle syntax? It seems to me that you have only tried T-SQL syntax, e.g. execute proc.
    Wrap it in a begin..end tag like you would a normal PL/SQL function or proc call. Assumption is that as Oracle makes the remote database (via the dblink) look like an Oracle database, you should also play along and pretend it is one and treat it as such.
    E.g.declare
      r integer;
    begin
      -- execute remote proc
      procFoo@dblink( 'ABC' );
      -- call a remote function
      r := funcFoo@dblink( 123 );
    end;

  • How to avoid the oracle analytics function

    create table employees (emp_id,dept_id,class_id) as
    select 11,1,103 from dual union all
    select 12,1,103  from dual union all
    select 13,1,103  from dual union all
    select 14,1,102  from dual union all
    select 15,1,102  from dual union all
    select 16,1,0 from dual;
    create table departments (dept_id,dept_name) as
    select 1,'Accounts' from dual union all
    select 2,'Computer' from dual;
    I run the following query on the above two tables:
    select dept_id, dept_name, class_id, total_class_id, round(total_class_id/total_accounts*100,2)||'%' as in_percentage
    from
    select e.dept_id, dept_name, class_id, count(*) total_class_id, count(*) over (partition by dept_id) total_accounts
    from employees e inner join departments d
    on e.dept_id = d.dept_id
    group by e.dept_id, dept_name, class_id
    It gives me output as:
      dept_id | dept_name | class_id | total_class_id | in_percentage
      1         Accounts       103            3                   50%
      1         Accounts       102            2                   33.33%
      1         Accounts        0               1                   16.67%
    I would like to get the above result without using over partition by. I don't want to run the same query twice and then join them.
    Message was edited by: Ora-aff

    Ora-aff wrote:
    @Solomon,  Sorry, I did not put more rows in employees table as pointed out by Frank. So if there are more rows with different dept_id then "(partition by dept_id)" will be must.
    First of all, I don't see anything wrong with PARTITION BY. But if you don't want it, you could use ORDER BY + RANGE
    SQL> select  *
      2    from  employees
      3  /
        EMP_ID    DEPT_ID   CLASS_ID
            11          1        103
            12          1        103
            13          1        103
            14          1        102
            15          1        102
            16          1          0
            21          2        103
            22          2        103
            23          2        103
            24          2        103
            25          2        103
        EMP_ID    DEPT_ID   CLASS_ID
            26          2        102
            27          2        102
            28          2          0
    14 rows selected.
    SQL> select  e.dept_id,
      2          dept_name,
      3          class_id,
      4          count(*) total_class_id,
      5          round(count(*) / sum(count(*)) over(order by e.dept_id range between 0 preceding and 0 following) * 100,2) || '%' as in_percentage
      6    from      employees e
      7          inner join
      8              departments d
      9            on e.dept_id = d.dept_id
    10    group by e.dept_id,
    11             dept_name,
    12             class_id
    13    order by e.dept_id,
    14             dept_name,
    15             total_class_id desc,
    16             class_id
    17  /
       DEPT_ID DEPT_NAM   CLASS_ID TOTAL_CLASS_ID IN_PERCENTAGE
             1 Accounts        103              3 50%
             1 Accounts        102              2 33.33%
             1 Accounts          0              1 16.67%
             2 Computer        103              5 62.5%
             2 Computer        102              2 25%
             2 Computer          0              1 12.5%
    6 rows selected.
    SQL>
    SY.

  • Is anyone know how to run the examples in 3d user interfaces with java 3d

    hi dear ,
    I am trying to run the examples in 3d user interfaces with java 3d.
    I hope i can load the library in jcreator. but the libarary for this book are classes files , it do not have jar file for it . the jcreator do not read these classes . i do not know why ? i am wonder if there any one run these code before can give me some idear .
    thanks so much .
    the code u can get from this link.
    http://www.manning.com/books/barrilleaux/source
    thank you for u to have a look for me .
    regards
    xiaocui

    <h2>{color:red}CROSS POSTED{color}</h2>
    [t-5289810]
    Cross posting is rude.
    db

  • How to automate the Oracle database start and shutdown process

    How we can automate and oracle database start and stop procees with Linux start/shutdown process.
    I want to automatically start the oracle database at the time linux server and shutdown the database on shutdown linux server.

    Hi,
    I can share my scripts:
    1) /home/oracle/start_oracle.sh
    #Script should be ran as Oracle user
    cd /tmp
    export ORACLE_SID=orcl
    export ORACLE_HOME=/oracle/ora9i
    lsnrctl start
    sqlplus -S /nolog <<ENDSQL
    connect / as sysdba
    startup
    exit
    ENDSQL
    emctl start dbconsole
    isqlplusctl start
    NOTE: emctl and isqlplus are optional
    2) /home/oracle/stop_oracle.sh
    #Script should be ran as Oracle user
    cd /tmp
    export ORACLE_SID=orcl
    export ORACLE_HOME=/oracle/ora9i
    isqlplusctl stop
    emctl stop dbconsole
    sqlplus -S /nolog <<ENDSQL
    connect / as sysdba
    shutdown immediate
    exit
    ENDSQL
    lsnrctl stop
    NOTE: emctl and isqlplus are optional
    Then what you need:
    1) K91oracle_stop (put it in the desired run level)
    #!/bin/bash
    # description: Stop Oracle before reboots
    su - oracle -c "/home/oracle/stop_oracle.sh" >> /home/oracle/stoporacle.log
    2) S91oracle_start (put it in the desired run level)
    #!/bin/bash
    # description: Start Oracle after reboots
    su - oracle -c "/home/oracle/start_oracle.sh" >> /home/oracle/startoracle.log
    Bye.

  • How to run the oracle form in linux system

    Hello all,
    My config is :-
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    I can easily run my on Windows and Linux platform untill i am not use java bean in my form. After using the getMacaddress JAVA BEAN. I am not able to run my form on linux platform. If i remove the java bean from my form than form will run on linux.
    I am not familiar with linux so i am not able to trace the problem basicaly i don't  know which version of jre is used by linux system and i don't know how to find it.
    Please guide me.

    Now i install the jdk 1.6.0_20 and add into the jdeveloper 10.1.3.
    and i change my code for get mac id is -
    package demo;
    import java.net.InetAddress;
    import java.net.NetworkInterface;
    import java.net.SocketException;
    import java.net.UnknownHostException;
    public class App{
       public static void main(String[] args){
    InetAddress ip;
    try {
    ip = InetAddress.getLocalHost();
    System.out.println("Current IP address : " + ip.getHostAddress());
    NetworkInterface network = NetworkInterface.getByInetAddress(ip);
    byte[] mac = network.getHardwareAddress();
    System.out.print("Current MAC address : ");
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < mac.length; i++) {
    sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""));
    System.out.println(sb.toString());
    } catch (UnknownHostException e) {
    e.printStackTrace();
    } catch (SocketException e){
    e.printStackTrace();
    in form i create one jave bean area and add the implement class is
    demo.get_info.
    and on B1 (button) when-button-pressed
    :T1 :=GET_CUSTOM_PROPERTY('BEAN_MAC',1,'get_info');
    No error comes and no out put comes. So please guide me how to use the getHardwareAddress to get mac id.

  • How to move functions and procedures from packages into a schema?

    Hello,
    I have below requirements for a homework and my question is if someone can point me in the right direction to find documentation which can help me solve the below. Any information will be very much appreciated. Thank you.
    Write procedures and functions (included or not in packages)under the form scripts  .txt or .sql . Once they have been launched in SQL developer they should more the functions and the procedures from the packages in the current schema. If the current schema contains only 2 packages, pac1( with procedures p11,p12 and the functions f11,f12,f13) and pac2( contains the following procedures p21,p22,p23 and the functions f21 and f21( overloading cases), the execution of the scripts will generate the following effects:
    The procedures p11,p12,p21,p22 ,p23 and the functions f11,f12 and f13 will be created in the current schema.
    pac2 will contain 2 instances of the overloading function- f21; they will be kept in the package, without being created in the current schema; so all the procedures/functions overloaded will be kept in the original packages
    If pac1 contains variables, cursors and public types, we will keep only the package specifics( and delete the body);generally if the packages do not contain procedures or functions overloaded the body will be deleted and if no variables, cursors, public types then we will delete the header.
    If in the triggers, procedures, functions  we will call procedures/functions from the packages(the procedures and the functions moved in the current schema) they reference will need to be updated ( via amending the body or recompile) for example if pa1.p12 will need to be replaced with p12.
    The scripts will have to have numbers in the following series( 01....n) and characters that explain the content.

    My only advice would be to remember that these are public forums and if YOU can find them, so can your instructors.
    Also, those are horrible procedure and function names
    This assignment seems to be around overloading pl/sql objects and order of precedence...do a search on the Oracle Docs around overloading and inheritence
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28371/adobjplsql.htm#i21148

  • Error while running the Oracle Text optimize index procedure (even as a dba user too)

    Hi Experts,
    I am on Oracle on 11.2.0.2  on Linux. I have implemented Oracle Text. My Oracle Text indexes are fragmented but I am getting an error while running the optimize_index error. Following is the error:
    begin
      ctx_ddl.optimize_index(idx_name=>'ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now I tried then to run this as DBA user too and it failed the same way!
    begin
      ctx_ddl.optimize_index(idx_name=>'BVSCH1.ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now CTXAPP role is granted to my schema and still I am getting this error. I will be thankful for the suggestions.
    Also one other important observation: We have this issue ONLY in one database and in the other two databases, I don't see any problem at all.
    I am unable to figure out what the issue is with this one database!
    Thanks,
    OrauserN

    How about check the following?
    Bug 10626728 - CTX_DDL.optimize_index "full" fails with an empty ORA-20000 since 11.2.0.2 upgrade (DOCID 10626728.8)

  • How to get the document type, name and revision from the search page cv04n

    Hello,
    After performing cv04n and getting a list of documents satisfying the search criteria, how can I then get the document type, name and revision of the selected document using ABAP?
    Thanks

    HI,
    IN table DRAW... u have Document type, Version and document number.
    In Table DRAT also u get Document Type, Version, Number and Description of Doucment.
    Regards
    SAB

  • How to find the mails triggered by which user from SOST or other transac.

    Hi Experts,
    How to find out mails triggered from SAP system by which user from SOST or some other means of mail triggering from SAP.
    Regards,
    IFF

    Hi Buddy,
    Make the question clear. You can check in SCOT transaction.
    Cheers,
    Sanil

Maybe you are looking for

  • Reminder  for open Orders of Costumer who made a  New order

    Hello Experts When adding a new Order to costumer, I want a Reminder or a Pop-up Block/notice That will tell me if this Costumer already have open orders in the system. And this for the reason of merging or combining a few orders together into one pa

  • Moving a SWF containing relative Links no longer work

    Hi I've come to the experts. I created a Flash Catalyst Project that contains external URL links. I actual want them to be internal relative links. I've followed the process of using to Flash Builder to edit the Main.mxml file to change to a relative

  • Unable to update CC Desktop ...

    -SMB environment -Computer account is  a member of a Windows domain  -Microsoft Windows 8.1 Enterprise (64-bit) 1) User receives notification of available update for CC 2) User attempts to install updates 3) User doesn't have admin privileges so they

  • OER 11.1.1.7 - Asset Navigator doesn't open with an Error - Missing Required permissions attribute in main jar

    Hi, I have installed OER-11g version 11.1.1.7 and am successfuly able to open Asset Editor , ImpExp utility and also could harvest SOA and OSB components. Issue 1: However while trying to open the Navigator of the harvested components in OER console,

  • Need faster data loading (using sql-loader)

    i am trying to load approx. 230 million records (around 60-bytes per record) from a flat file into a single table. i have tried sql-loader (conventional load) and i'm seeing performance degrade as the file is being processed. i am avoiding direct pat