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-->

Similar Messages

  • How execute this stored procedure from SQL PLUS???

    Hello folks....
    Help me please...
    I have this procedure....
    CREATE OR REPLACE PROCEDURE TEST(COD OUT VARCHAR2, NUM OUT
    VARCHAR2, ID OUT VARCHAR2)
    AS
    BEGIN
    END;
    SO, I4D LIKE TO EXECUTE IT FROM SQL PLUS::
    BUT, I DONT KNOW HOW TO DO..PLEASE SEND ME A SAMPLE..
    THANK U

    Thank u man!!!
    look, my error before was :
    SQL> set serveroutput on
    SQL> declare
    SQL> cod varchar2(100);
    SQL> num varchar2(100);
    SQL> id varchar2(100);
    SQL> begin
    SQL> TEST( cod, num, id );
    SQL> EXEC DBMS_OUTPUT.put_line( cod || ' ' || num || ' ' ||
    id );
    SQL> end;
    SQL> /
    i put the EXEC....
    thank u!!!

  • How to call a stored procedure from WorkShop

    Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
    me .. Today I'm simply trying to find out how to call a stored procedure from
    within workshop, using any of the DB Controls .. I see workshop provides a way
    create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
    to be entered in place of the inline query .. Perhaps I've over looked it. Any
    advise on the best way to tackle this task will be appreciated.
    Atahualpa

    Atahualpa--
    Maybe this will help:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Eddie
    Atahualpa wrote:
    Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
    me .. Today I'm simply trying to find out how to call a stored procedure from
    within workshop, using any of the DB Controls .. I see workshop provides a way
    create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
    to be entered in place of the inline query .. Perhaps I've over looked it. Any
    advise on the best way to tackle this task will be appreciated.
    Atahualpa

  • How to execute the parametered stored procedure in sql *plus ?

    how to execute the parametered stored procedure in sql *plus ?
    my storedprocedure format
    CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE
    (empDOB out date, empEmpName out varchar2)
    thanks & regards
    mk_mur

    Oh, sorry... making many reading-too-fast mistakes today...
    You can't declare date variables in SQL*Plus (seel help var), but you can cast to varchar2:
    TEST> CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE (empDOB out date, empEmpName out varchar2) IS
      2  d date := sysdate;
      3  e varchar2(10) := 'bob';
      4  begin
      5  empdob := d;
      6  empempname := e;
      7  end;
      8  /
    Procedure created.
    TEST> var d varchar2(30)
    TEST> var n varchar2(30)
    TEST> call  SMS_SELECTMPLOYEE(:d,:n);
    Call completed.
    TEST> print d n
    D
    11/07/06
    N
    bobYoann.

  • How to call a stored procedure from EJB3/toplink essentials..?

    Hi,
    I want to call a stored procedure residing in the oracle 10 g Database from my application's data access layer, which is designed using EJB3/toplink essentials.
    I think this feature is not available right now in the EJB3 spec...any workaround with code if possible will be very help full...
    Thanks & Regards,
    Sarvesh

    This should help you....
    how to execute a stored procedure from ejb3.0 bean using entity manager

  • How to create java stored procedure from oracle(Dastageer)

    how to create java stored procedure from oracle-please help me to create the procedure.

    Hi,
    This forum is exclusively for discussions related to Sun Java Studio Creator. Please post your question in the appropriate forum.
    Thanks,
    RK.

  • How to compile a procedure from Sql*Plus?

    Dear friends,
    I couldnt find the way how to compile my invalid procedure through sql*Plus.
    I know this is very awkward,but I m in need of that command only.
    Thanks
    Ritesh Sharma

    Pls check it --
    SQL>
    SQL>
    SQL> @C:\RND\Oracle\Function\a.sql;
    11  /
    Function created.
    SQL>
    SQL>
    SQL> start C:\RND\Oracle\Function\a.sql;
    11  /
    Function created.
    SQL> Regards.
    Satyaki De.

  • How to run a stored procedure from sqlplus

    scehma name: aa
    package name: bb
    procedure name : cc
    I run the procedure from sql plus like this...
    execute aa.bb.cc
    I got error " not defined procedure" any one knows why? thanks!

    Based on the information you provided:
    1. You are not connected as Schema aa
    2. Schema aa has not granted permission to you to execute package bb.
    To resolve this issue:
    Connect as schema aa
    execute following statement:
    Grant execute on bb to Your_userName;connect as Your_userName
    On SQL*Plus prompt now you can execute this procedure using:
    execute aa.bb.cc;Assuming there is no parameter for procedure cc.
    You can create synoyms also to avoid specifying "aa".
    Thanks,
    Dharmesh Patel

  • Testing stored procedure using sql plus

    I'm attempt to create and test a stored procedure in sql plus.
    I enter:
    create procedure sp_getconfiguration(mygroup in char, myparameter in char, myvalue in out char) as begin select configvalue into myvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter; end;/
    I get a procedure created. response by when I type:
    variable myval char
    call sp_getconfiguration('Language','Enabled', myval);
    I get the following error:
    error at line 1:
    ora-06576: not a valid function or procedure name
    I can go into DBA studio and see the procedure listed and can compile it and it says "valid". I have tried granting execute permission to public and trying it again under sql plus and nothing seems to help.
    I'm also attempting to run this same procedure from VB and get an invalid column name error from there.
    Thanks for any help in advance.
    Lee

    Thanks for all your help. What I actually called product support and they helped me solve it. But what I found out is that if using oracle 8.1.# you have to invoke the stored procedure without the "call " in front of the procedure name. For instance.
    sp_getconfiguation()
    In version 9.# it appears that you use the call in front of the procedure. Dah! So if anyone else is having this problem. That is the solution. Thanks anyway.

  • How to call multiple stored procedure from same DB Adapter

    Hi,
    I want to invoke 3 stored procedures from my message flow in BUS . I created a DB adapter and invoked 1 successfully . Now I don't to configure 2 other DB adapters for calling other 2 stored procedures . I want some how to be able to call the other 2 from the first DB adapter only . Somehow I need the flexibility to have procedure names as the operation names in 1 wsdl and be able to configure this in JDeveloper for this at time of DB adapter configuration . I am using 11G . Is it possible ?

    You can probably create a DB adapter with operation type selected as Execute Pure SQL and write SQL code to invoke the stored procedures depending on the procedure name (which you can get as one of the parameters of DB Adapter).
    However, Even if you were able to do it, the DB Adapter schemas are generated based on stored procedure parameter list and types. If you use Execute Pure SQL type of DB Adapter the schema will be generated based on the parameters which you are using in your custom SQL code within DB Adapter. Which means that if you want to add a new stored procedure as target which has a different name and different parameters then you will need to regenerate the DB adapter and update your custom SQL code. This also means that you will need to do regression testing interfaces to all stored procedures whenever there is any change in this DBAdapter.
    Now, my question is why do you want to invoke multiple stored procedures from same DB adapter?
    This is not a good way to design integration solutions and makes your services resistance to change as it will take more time to change and test.
    If all that you want is to have a web service which can have different operations for different stored procedures then you should create three business services and create a wrapper proxy service which has one operation for each stored procedure, within the proxy transform and call the correct backend service (you can use operational branch). This way you have a modular code where each module (read interface to one stored procedure) can be independently modified and tested.

  • 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

  • How to start/stop process flow from sql*plus?

    Hi,
    i know how to start a process flow via sqlplus_exec_template.sql, but i cannot find any information on how to stop (and rollback) a working flow from sql*plus. Any help would be appreciated.
    Greetings
    Christoph
    Message was edited by:
    ctrierweiler

    Hi,
    I've had a go.
    How should I interpret the results of list_requests:
    owner_owr@ORKDEV01> @list_requests
    ====================
    DEPLOYMENTS
    ====================
    Audit ID Status Name Date Owner
    2706 READY Deployment Fri Nov 11-NOV-05 10:49:59 OWNER_OWR
    11 10:46:37 CET 2
    005
    ====================
    DEPLOYMENT UNITS
    ====================
    Audit ID Status Name Date Owner
    2707 READY Unit0 11-NOV-05 10:49:59 OWNER_OWR
    ====================
    EXECUTIONS
    ====================
    Er zijn geen rijen geselecteerd.
    owner_owr@ORKDEV01>
    Whilst a process flow is executing the last query will list executions, all of which have status BUSY:
    owner_owr@ORKDEV01> @list_requests
    ====================
    DEPLOYMENTS
    ====================
    Audit ID Status Name Date Owner
    2706 READY Deployment Fri Nov 11-NOV-05 10:49:59 OWNER_OWR
    11 10:46:37 CET 2
    005
    ====================
    DEPLOYMENT UNITS
    ====================
    Audit ID Status Name Date Owner
    2707 READY Unit0 11-NOV-05 10:49:59 OWNER_OWR
    ====================
    EXECUTIONS
    ====================
    Audit ID Status Name Date Owner
    394512 BUSY PF_ONB01 04-MEI-06 09:11:12 OWNER_OWX
    395328 BUSY ONB:FULL_PREPARE 04-MEI-06 09:11:55 OWNER_OWR
    395324 BUSY PF_ONB01:ONB 04-MEI-06 09:11:55 OWNER_OWR
    owner_owr@ORKDEV01>
    As an aside, I will attempt to get rid of the READY deployment and deployment unit using deactive_deployment.sql
    Now, if I attempt to use deactivate_execution.sql on any of the executions with status BUSY I get:
    owner_owr@ORKDEV01> @deactivate_execution
    Voer waarde voor 1 in: 396136
    declare
    FOUT in regel 1:
    .ORA-20003: The object is not in a valid state for the requested operation
    ORA-06512: at "OWNER_OWR.WB_RTI_EXCEPTIONS", line 94
    ORA-06512: at "OWNER_OWR.WB_RTI_EXECUTION", line 774
    ORA-06512: at "OWNER_OWR.WB_RT_EXECUTION", line 90
    ORA-06512: at line 4
    owner_owr@ORKDEV01>
    So all the seems to remain is to use abort_exec_request.sql
    This does the job, but the script itself hangs.
    I think it has to do with the l_stream_id not being checked again after the initial IF. I think it should probably be part of the loop condition as it is again reset in the do_acks inside the loop.
    Cheers & thanks,
    Colin

  • How to run O/S command from SQL * Plus.

    Hi,
    Can i run O/S commands, say copy or move, from SQL * Plus prompt? If yes, what is the command.
    Thanks.

    hi,
    or you can try the following
    slq > !
    and then your command
    rgds
    Alan

  • How to insert data which contains '&' from SQL*Plus without asking prompt

    Hi,
    I want to insert data in table from SQL*Plus but data value contains '&' as given in below example(insert script).
    There are 10000 rows. When I load from SQL*Plus it is asking for 'value for :P'.
    I dont want to replace '&' with 'and' also there should not be prompt for asking value for :P.
    Example
    Insert into CS_Tracker (TrackId,FeedBack) values ('ARARGE034678','S&P');
    Insert into CS_Tracker (TrackId,FeedBack) values ('ARARGE034676','S&F');
    Insert into CS_Tracker (TrackId,FeedBack) values ('ARARGE034677','A&P');
    Can anyone help me in above issue.
    Thanking in Advance
    Sanjeev

    use
    set define offbeforehand

  • How to call a Stored procedure from xsodata service?

    Hi Everyone,
    I have created an stored procedure and I'm trying to consume this store procedure from xsodata service.
    But unable to activate the service because of an error.
    Invalid procedure or parameter list in procedure "package.WebContent.src.hana.procedures::PROCEDURE
    I have activated both store procedure as well as attribute view.
    Here is my stored procedure.
    PROCEDURE "SCHEMA"."package.WebContent.src.hana.procedures::PROCEDURE" (
    IN row "SCHEMA"."package.tables::object" )
      LANGUAGE SQLSCRIPT
      SQL SECURITY INVOKER AS
      --DEFAULT SCHEMA <default_schema_name>
      --READS SQL DATA AS
    BEGIN
      Write your procedure logic
    declare shortdesc string;
    SELECT SHORT_DESCRIPTION INTO shortdesc FROM :row;
    END;
    Service:
    service namespace "package.WebContent.src.hana.service"{
    "package/OBJECT.attributeview" as "OBJECTS"
    key ("OBJECT_ID")
        create using "package.WebContent.src.hana.procedures::PROCEDURE";
    Is there anything wrong in the way i'm calling the procedure??

    Hi Arjun,
    You can expose the procedure as an Odata Service if you wrap it in a Scripted Calculation View..
    Firstly You will have to create a Scripted Calculation View from the Modeller perspective.
    Below is an example I just tried.
    Add Columns & Input Parameters
    Consume this Calc View in your Odata service :
    service namespace "services.test"
    "pda.Models::CV_TEST" as "Customer"
    keys generate local "ID"
    parameters via entity;
    Check your service by Passing the Input Parameters
    http://<host>:<port>/<>/services/test.xsodata/CustomerParameters(2)/Results?$format=json
    Hope this was Helpful
    Regards,
    Avinash Raju

Maybe you are looking for

  • Control_file_record_keep_time vs retention policy

    Its not thread nor question just read from documents and tried to imply the fact of documents and i think its written correct what i tried to do proof it practically ,neither i am trying to be smart just share with you guys is my observation correct

  • Install of JAVA CI failed

    Hi, I'm trying to install JAVA add-on alongside ABAP stack in the same machine (Dual-Stack). The SCS instance and DB instance installation of JAVA add-on went fine. However, now I'm stuck at step 4 of 18 - 'Create Java users'. It is basically complai

  • Tomcat 5 & JSP page buffer

    Hi all, I'm new to JSP and am having a problem with the page buffer. I have a page which uses a for loop to print out the contents of a row from a SQL table. The JSP stops outputting html at different points in the page, depending on the data and the

  • Rebuilding photos on HD

    Hi there, I have had much drama with my photo library and iphoto, and am trying to rebuild my library on my hard drive so I can re-import it into iphoto. I deleted all of my other libraries because I had duplicates, empty folders, etc., so I just sta

  • Basics of Oracle Quality Management

    Hello Everybody, Please provide the basics of Oracle Quality Management ( related to Process manufacturing). Thanks.