Import/export only the stored procedure from DMP

Hi all,
pls tell how to import/export only the stored procedure from a DMP file.
Best Regards,
Subir

pls tell how to import/export only the stored
procedure from a DMP file.If you on 10g or above use expdp / impdp for import/export only the SP.
Overview of Oracle Data Pump
- Virag Sharma
http://virag.sharma.googlepages.com
http://viragsharma.blogspot.com/

Similar Messages

  • How to pass the parameter values to the stored procedure from java code?

    I have a stored procedure written in sqlplus as below:
    create procedure spInsertCategory (propertyid number, category varchar2, create_user varchar2, create_date date) AS BEGIN Insert into property (propertyid, category,create_user,create_date) values (propertyid , category, create_user, create_date); END spInsertCategory;
    I am trying to insert a new row into the database using the stored procedure.
    I have called the above procedure in my java code as below:
    CallableStatement sp = null;
    sp = conn.prepareCall("{call spInsertCategory(?, ?, ?, ?)}");
    How should I pass the values [propertyid, category, create_user, create_date) from java to the stored procedure?[i.e., parameters]
    Kindly guide me as I am new to java..

    Java-Queries wrote:
    I have a stored procedure written in sqlplus as below:FYI. sqlplus is a tool from Oracle that provides a user interface to the database. Although it has its own syntax what you posted is actually PL/SQL.

  • How to access the stored procedures from Java

    Hi,
    There is stored procedure in oracle sql and that have two input parameters and recordset as an output parameter.
    eg.
    CREATE OR REPLACE PROCEDURE Test(
    p_Age JUNK.Age%Type,
    p_SURNAME JUNK.SURNAME%TYPE,
    RC1 IN OUT P_GETALLTOPICDATAPkg.RCT1)
    Now i want to execute this by using Java JDBC.I have wrote the following code,
    but how to convert "String data to Clob data".
    Code is :
    String strSPName = "{ call Test(?,?,?) }"; oracle.jdbc.driver.OracleCallableStatement cstmt = (oracle.jdbc.driver.OracleCallableStatement)MyConn.prepareCall(strSPName);
    cstmt.setInt(1, 001);
    String ClobData ="AMMA AAI MA";
    cstmt.setClob(2, (java.sql.Clob)ClobData); above gives error*/
    cstmt.execute();
    Can any body help.
    null

    Try using setCharacterStream (this should work in 816 I am not sure of prior Oracle/JDBC releases)
    String ClobData ="AMMA AAI MA";
    java.io.StringReader sr = java.io.StringReader(ClobData);
    cstmt.setCharacterStream(2,sr,ClobData.length());
    cstmt.execute();
    Good luck

  • Only Restarting the Weblogic Server will invoke the Stored Procedure???

    Hi,
    I have written a stored procedure which is called using hibernate
    which is working fine when ever i restart the server(Weblogic). That is for each time, when i need to invoke the stored procedure i need to restart the server to invoke it then only the stored procedure gets invoked. Which is very expensive indeed. How to overcome this, is there any way to set in the weblogic server properties, so that i can dont have to restart the server every time when i need to invoke the Stored
    procedure. Any way please do look up the code as well in which i have called the stored procedure in Hibernate.
    public int callPopulateCertDataSP(String barCode,String containerType,String conditionValue) throws SystemException {
         log.debug("Inside the callStoredProcedure Method!!!");
         int checkValue=0;
         Session hibSession = HibernateUtils.getSession();
         Connection con=hibSession.connection();
         CallableStatement cstatement=null;
         if(con!=null){
    try {
         log.debug("Inside con object not null!!!");
              cstatement=con.prepareCall("{call p_populate_cert_data(?,?,?,?)}");
              cstatement.setString(1,barCode);
              cstatement.setString(2,containerType);
              cstatement.setString(3,conditionValue);
              cstatement.registerOutParameter(4,Types.INTEGER);
              cstatement.execute();
              checkValue=cstatement.getInt(4);
              cstatement.close();
              con.commit();
              con.close();
         }catch(SQLException e){
              log.debug("The error Message is what????"+e.getMessage());
         HibernateUtils.closeSession();
         return checkValue;          
    Expecting ur replies....
    Thanks,
    JavaCrazyLover

    No Replies as Yet!!!

  • Deleting a stored procedure from an EF 6.1 Database First C# solution

    I added a stored procedure to a EF 6.1.x Database First solution. Then I changed the stored procedure on SQL Server. Hoped that the changes would be updated in EF when I used Update Model from Database from the Designer. But they weren't. Tables update correctly
    when I change the table's schema within SQL Server. Function Imports and classes generated from a stored procedure don't seem to update if I update the stored procedure however.
    So I figured that I would delete the stored procedure from the model and then re-add it. But wait! I couldn't find a way to delete the stored procedure from the model! There's no object to delete from the design surface when the object is a stored procedure!.
    First I tried deleting the class from the Solution Explorer. Bad idea. An update from the design surface duplicated the class!.
    The only way I found that you could completely remove a stored procedure from a Database First EF solution is to open the model browser and delete any class reference from the model's ComplexTypes , FunctionImports and from model.Store's StoredProcedures.
    Seems like a lot of work.
    Isn't there an easier way? Is it this hard in Code First?
    Michael

    Hello,
    >>Isn't there an easier way? Is it this hard in Code First?
    Curently, it seems that there is not a easy enough to delete a store produce in database first approach.You could post a feedback about this issue to:
    http://data.uservoice.com/forums/72025-entity-framework-feature-suggestions
    When using stote produce with code first approach, it is easy since we do not need to import these SPs to the model, for details, you could check this link:
    https://entityframework.codeplex.com/wikipage?title=Code%20First%20Insert/Update/Delete%20Stored%20Procedure%20Mapping
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting exception whil calling an oracle stored procedure from java program

    Dear All,
    I encounter this error in my application when I call only the stored procedure but the view is executing fine from the application and my environment is as follow:
    Java 1.4
    oracle 10g
    oracle jdbc driver:9.2.0.8.0
    websphere portal 6.0.0.1
    this error is occur from time to time randomly, when it happens, the only workaround is to restart the server..Does anyone have any idea about this error?
    Unable to execute stored Procedure in Method
    java.lang.NullPointerException
    at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java(Compiled Code))
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1140)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3606)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5267)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:632)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:427)
    And sometime I am getting this exception
    Unable to execute stored Procedure in Method
    java.lang.ArrayIndexOutOfBoundsException: 27787320
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java(Compiled Code))
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1134)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3606)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5267)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:632)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:427)
    Thanks
    Jay

    spacetorrent escribió:
    for (int x=0; x <result.size(); x++){
    System.out.println(result.get(x));
    I can't do this, because result object is a Map, and I need write the Key of the Value to obtain.
    So I can do:
    result.get("res");And I odtain a *$Proxy3* Object

  • Call Stored Procedure from Forms 6i -- Urgent Plz...

    Dear All,
    I am first writing a stored procedure as:-
    CREATE OR REPLACE FUNCTION
    good_hire
    (birthdate_in IN DATE,
    reqsal_in IN NUMBER)
    RETURN BOOLEAN
    IS
    too_young BOOLEAN :=
    ADD_MONTHS
    (SYSDATE, -216) >
    birthdate_in;
    too_expensive BOOLEAN :=
    reqsal_in > fin.dept_bal;
    BEGIN
    RETURN NOT (too_young
    OR too_expensive);
    END;
    Now in my forms also i have the same function,which i defined in in my program unit i.e., with the same name good_hire,but with different parameters.
    If I want to call this stored procedure(good_hire)in my form
    I am writing this code in the pre-Insert trigger.
    IF good_hire
    (:newemp.birthdate,
    :newemp.proposed_sal)
    THEN
    SELECT empseq.NEXTVAL
    INTO :newemp.empno
    FROM dual;
    ELSE
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    Notice that i am sending bind variables from my form to the
    stored procedure. Now my question :
    1) Can i pass bind variables to the stored procedures from
    forms or is there any other way i can access the
    stored roceures from forms(Expecting a detailed answer) and
    from which triggers can I access the stored procedures(like pre-
    Insert here)?
    2) If at all I have the same parameters in my program unit
    function and with the same name good_hire, I know that the code
    in the pre-Insert trigger will call only the function in my
    program unit and not the stored procedure, but if I like to
    call my stored procedure instead of the local function good_hire
    then what should I do?
    2)As I said before if i have different parameters, for the
    stored procedure good_hire and local function good_hire and If
    I call good_hire from my pre-insert trigger .. Is it that the
    Forms will decide and call the Local function or stored
    procedure depending on the parameter list?
    I hope all my points are very clear.
    I am expecting the best and detailed answer for my
    Queries, I also hope these Quests will clear the doubts of many
    members in our esteemed group.
    Thnx in Advance...
    Regards
    siree....

    Dear Siree,
    Oh!! how many Questions? Each how much big??
    Ok First of all the answer to your first question.
    You can use the Stored procedures in the same way as the Forms procedures. You can pass bind variables to the stored procedures as well. You can also use the stored procedures in any triggers, I think there are no restrictions for that. The only thing is you should be connected to database while compiling the trigger where you are calling the stored procedure.
    Answer to your second question.
    You cannot direct Forms (I don't know about version 10g), untill 9i, you cannot tell forms to take the stored procedure and leave the local procedure. It will always take the local procedure, once a procedure is called. If not found locally then only it will go for the Stored procedures.
    For your third question.
    As I told you b4 forms searches for the procedure being called locally first, if locally present, does not go to the stored procedure. If declared by different paramaters in the stored procedure and it is called, then it will throw error (as it first searches for the name locally and if found will take up the one present locally and since that procedure is with different parameter, will throw up error). It is after all a stupid machine and can't think like us.
    Regards,
    Senthil .A. Perumal

  • How to invoke DB stored procedures from EJB3.0

    In our project we are using EJB3.0.
    I got one situation, where i need to call a db stored procedure through my code. But i couldn't find any possibilities.
    Can any body help me in this regard
    Thanks in advance
    Kiran

    Hi,
    As per ejb3.0 spec is conserned it doesnt specify anything with regard to stored procedures as of now, it means ejb3.0 cannot handle stored procedures as of now, of course it still depends on vendor implemenation u can check out for any possibilities wether vendor provides support for it or not, as for as i am conserned they dont as of now.
    Possible Alternative:
    This can be achived only through BMT using 2 transactions.
    Open a seperate JDBC managed Transaction(by setting AutoCommit to false) execute the stored procedures from here, u can commit or roll back from there on.
    Thanks and Regards
    Srikanth S

  • Running stored procedure from unix shell

    Hi
    I have a stored procedure proc1 stored in a file, code1.txt in my home directory /home/user. How do i execute this file which contains the stored procedure from unix shell? I would really appreciate it if somebody gives me the complete shell script to accomplish the above task.
    Thanks.

    To put everything together into a single posting:
    The EXEC command is a SQL*Plus macro command. It is not a SQL or PL/SQL command.
    The only way to execute a stored proc from a client, is to wrap the call in an anonymous PL/SQL block. I.e you need a BEGIN and END PL/SQL wrapper around the call.
    E.g.BEGIN
      -- calling a stored proc to start leave processing
      scott.StartLeaveProcessing;
    END;The EXEC macro in SQL*Plus does this automatically for you. Thus less typing. But do not confuse this command with the PL/SQL language.
    Second issue. Use bind variables when making calls from clients. And not just for SQL statements, but also for PL/SQL. Unfortuantely this tends to be a hack in SQL*Plus due to the way SQL*Plus itself treats its bind variable assignments. But in principle, this is what you should do when calling an Oracle stored proc from a client:
    SQL> -- define a host variable
    SQL> var EMPID varchar2(100)
    SQL> var FROM_DEPT number
    SQL> var TO_DEDPT number;
    SQL>
    SQL> -- assign values to these (this is where SQL*Plus hacks it)
    SQL> exec :EMPID := 100;
    SQL> exec :FROM_DEPT := 1;
    SQL> exec :TO_DEPT := 2;
    SQL>
    SQL> -- now make the stored proc call for moving employee 100 from
    SQL> -- department 1 to department 2
    SQL> EXEC scott.EmployeeTransfer( :EMPID, :FROM_DEPT, :TO_DEPT );
    SQL>To do this from a Unix shell script:
    #!/bin/bash
    # environment variables
    # --> put environment such as ORACLE_HOME, ORACLE_SID, TWO_TASK
    # etc. here <--
    # redirect STDIN from TTY (keyboard typewriter device) to the input from
    # this file - which means SQL*Plus will not read from the keyboard but read
    # from this file its input until the EOF marker/text is encountered
    sqlplus -s /nolog << EOF
    connect scott/tiger
    var EMPID varchar2(100)
    var FROM_DEPT number
    var TO_DEDPT number;
    exec :EMPID := 100;
    exec :FROM_DEPT := 1;
    exec :TO_DEPT := 2;
    exec scott.EmployeeTransfer( :EMPID, :FROM_DEPT, :TO_DEPT );
    exit;
    EOF
    #eof

  • Call a pl/sql stored procedure from a report link

    Hello everyone:
    I have a report with a link in a column, which takes you to another page and passes values to that page, but also need the link, run a stored procedure before going to the other page.
    In the Forum I found cases similar to this, but none of the examples is clear to me how I do this. It seems that the target of the link should be URL, and also I have to call the stored procedure with a javascript function.
    My questions are:
    - Is this the best method to make what I need?
    - How should be the syntax of the link that takes me to another page and run the "stored procedure"
    - How and where I put the function "javascript" to run the "stored procedure"
    BDD: Oracle 11 g
    Apex version 4.1
    Best regards
    Gerard

    Hi,
    Change the link to call an apex.submit process. (javascript).
    Edit:
    I've set up a basic example.
    Region 1 (just so you can see the value getting set):
    select :P27_HIDDEN item_Value
    from dual
    Region 2:
    select rownum id, dbms_random.string('U', 12) sss
    from dual
    connect by level <= 20
    item attributes for ID:
    Target: URL
    URL: javascript:apex.submit({request:'NAVIGATE', set:{'P27_HIDDEN':#ID#}});
    (P27_HIDDEN is just a hidden item i created)
    http://apex.oracle.com/pls/apex/f?p=54920:27
    Edit2:
    In your case, then you can just have a page process based on conditions request = expression1, expression1: NAVIGATE..... then a page branch to go to the desired page, also with the same conditions
    Edit3:
    Im not sure what examples you are referring to , as you didn't supply any links; but you mention calling the stored procedure from javascript, so would likely involve some AJAX, but imo not necessary.

  • Calling stored procedure from Java raises ORA-1722 exception

    Hi,
    As the title says, when I call the stored procedure from java I got the exception ORA-1722 (invalid number) but I've checked and rechecked my procedure on SQL-Developer and It's alright it works nice and clean !
    What's happening? is there something I'm missing?
    The way I call the stored procedure is:
        public void execProcedure(String procedure) {
            CallableStatement cs;
            try {
                cs = conn.prepareCall(procedure);
                cs.execute();
            } catch (SQLException ex) {
                Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);
         where
        String procedure = "{call validateinfo}"I really need help on this, it's frustraiting me 'cause I need to finish a system but this little big problem is killing me ...
    Thanks any advice is very welcome :)

    Thanks for your help. Haven't tested the SP with a DB access client... which one do you recommend to use?
    The SP is the following:
    create or replace
    PROCEDURE validateInfo IS
      var number;
    BEGIN
      UPDATE temp_desarrollo
      SET status = '1';
      COMMIT;
      // Some string validations ...
      //This one just checks if the value of "monto" is a number
      //This update goes good
      UPDATE temp_desarrollo tmp
      SET cve_status = Decode(cve_status, NULL, '15', cve_status||',15')
      WHERE IsNumber(tmp.monto) = 'F';
      COMMIT;*/
      //This one just checks if the value of "monto" is greater than 0
      //if not, change de add to cve_status an errorValue
      UPDATE temp_desarrollo tmp
      SET cve_status = Decode(cve_status, NULL, '14', cve_status||',14')
      WHERE (cve_status NOT LIKE '%15%' OR cve_status IS NULL)
      AND to_number(tmp.monto) <= 0;
      COMMIT;
      //More string validations
      EXCEPTION
        WHEN OTHERS THEN
          var := SQLCODE;
          insert into excepciones values(to_char(var));
    END;I've deleted much code from the SP since I know there's nothing to do with the excepcion, just that UPDATE statement is the one giving me the exception.
    If those two UPDATES statements work with the same field (monto) why the first one is succeding and the second one not?
    Cheers,
    Federico
    P.S. the "isNumber" function is as follows, just in case.
    create or replace
    function IsNumber(val1 varchar2) return varchar2 is
      n number := null;
    begin
      n := to_number(val1,'9999999999999999.99');
        return 'T';
      exception
        when others then
          return 'F';
    end;

  • Exec stored procedure from another stored procedure - not working

    Hey, we've got a bunch of .sql files that we run, and some of them are stored procedures. Our programs call the stored procedures from within the .sql files and that works, but we've tried calling a stored procedure from another stored procedure and it won't compile. The syntax looks the same, and we can run that second stored procedure from the SQL*Plus command prompt just fine, so we know it's in there. It doesn't matter whether we type exec or execute in the first stored procedure--it still gives us a compilation error. Here's the relevant bit of the code:
            delete CMHISTORYINDEX;
            commit;
            exec SP_DAILY_TOTAL;
    END SP_DAILY_CLOSING;
    /Here's where we go into SQL*Plus and try to compile it:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    SQL> @sp_daily_closing.sql
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE SP_DAILY_CLOSING:
    LINE/COL ERROR
    34/7     PLS-00103: Encountered the symbol "SP_DAILY_TOTAL" when expecting
             one of the following:
             := . ( @ % ;
             The symbol ":=" was substituted for "SP_DAILY_TOTAL" to continue.
    SQL>We've also tried changing SP_DAILY_CLOSING to lowercase, but it doesn't seem to help. As I mentioned before, we can type that same sort of thing in .sql files that are not stored procedures and the exec is compiled fine and runs correctly. What are we doing wrong?

    In the stored procedure remove "exec" :
            delete CMHISTORYINDEX;
            commit;
            SP_DAILY_TOTAL;
    END SP_DAILY_CLOSING;

  • Execute stored procedure from DOS or Unix Shell

    Hi, need ur help again,
    How to execute the stored procedure from DOS or Unix Shell?
    Thanks!

    sqlplus -s /NOLOG @your_sql_script.sql
    -- your_sql_script.sql :
    connect user/password@connect_string
    execute package.procedure (param1, param2, ...) -- for packages
    execute procedure (param1,...) -- for procedures
    exit ;this way you won't advertise your user/password on unix systems

  • How to view  a stored procedure from sql plus

    Can anyone please tell what is the command for viewing the content of the stored procedure from sql plus ?
    Thanks

    Hi,
    I use this simple script to retrieve.......
    EDTRAD@T_E_S_9-->l
    1 select text from all_source where name = 'GET_MAN' -- proc name here
    2* order by line asc
    EDTRAD@T_E_S_9-->/
    TEXT
    FUNCTION get_man (in_man SSBOSS.CLNTWORK.manager%type)
    RETURN varchar2 IS
    CURSOR get_man(in_man SSBOSS.CLNTWORK.manager%type) IS
    SELECT name
    FROM ssboss.clntwork
    WHERE agency = 'TM'
    AND manager = in_man
    AND manager is not null
    AND manager != '**OB**';
    v_man SSBOSS.CLNTWORK.name%type := null;
    BEGIN
    OPEN get_man(in_man);
    FETCH get_man INTO v_man;
    IF get_man%notfound THEN
    v_man := 'Manager Not Found !';
    RETURN (v_man);
    CLOSE get_man;
    END IF;
    RETURN (v_man);
    CLOSE get_man;
    END;
    21 rows selected.
    EDTRAD@T_E_S_9-->

  • Calling invalid stored procedure from java

    Will the stored procedure which is invalid get re-compiled automatically when called from a java program?
    1.a stored procedure is invalid (oracle 9i)
    2.calling the stored procedure from a java program
    3.what will happen a.oracle recompiles the stored procedure
    b.returns an sql exception
    what happens,kindly help
    drop your mail to [email protected]
    Keep Smiling and Mailing,
    Vijay Anand Natesan.

    thank you ..Kindly let me know if any of your friends have tried this

Maybe you are looking for

  • How to include zoom option for images and video in adobe captivate5?

    I am developing an elearning software with captivate 5 which has images and video. I want to include an option to be able to zoom the images and video if clicked on the particular area. It should zoom any part of the image when clicked on it during r

  • Frequent DSL Dropouts at Night-West​wood, Los Angeles

    Hi, I'm hoping someone here can advise me.  I've had 7Mbt DSL in tthis apartment for several months now,  but for the last month and a half or so I've been getting booted off of the internet multiple times every night.  Sometimes it can happen every

  • Duplicating smart objects across documents

    Hello, what I'm trying to do is keep smart objects linked when duplicating them over to a different document. The thing is, I don't have a problem with the links breaking when I duplicate them from one doc to another on my laptop (a PC) and my friend

  • Table name where all CCMS values stored

    Hi, Can any one provide the table name where all CCMS values stored ( for all MTE classes) in the data base? Regards Soumitra

  • BAPI_UI_GETDETAIL - switching it on and off?

    Hi, a short question - since which R/3 release is BAPI_UI_GETDETAIL available? We had problems with a piece of software because apparently the BAPI is not available in (Kernel release) 4.6D and Partner release 4.6C. When I look into the transaction B