How to change a procedure

I created a procedure, now I want to change. First of all, I find the procedure
SQL > select text from all_source where owner = 'SCOTT' and type = 'PROCÉDURE' and name = "NIJ";

TEXT
------
NIJ (p_date as) procedure
as
l_rec all_users % rowtype;
c sys_refcursor;
l_query long;
Start
l_query: =' select * from all_users where created = "' | p_date | " ' ;
dbms_output.put_line (l_query);
Open c for l_query;
because me in 1... 5
loop
extract the c in l_rec;
When the output c % notfound;
dbms_output.put_line (l_rec. UserName | '.....');
end loop;
close c;
end;

Now, I want to change line 8, and I execute following command:
SQL > l8
SP2-0226: invalid line number

What command should I use?
Thank you

Hello

As others have told you, you ACREATED GOLD REPLACE PROCEDURE. There is no ALTER PROCEDURE statement.

EdwardKing wrote:
SQL > select text from all_source where owner = 'SCOTT' and type = 'PROCÉDURE' and name = "NIJ";

Remember, the only way to ensure that the output lines will be in order is to use an ORDER BY clause, add "ORDER ONLINE" at the end.
It is not a good idea to create your own objects in a schema provided by Oracle, as SCOTT. Why not create your own schema?
Any scheme you use, if you log in as this user (and you'll probably want to, if you re - create the procedure), you can use instead of ALL_SOURCE USER_SOURCE. USER_SOURCE contains only objects that you own (the current user), so it is not an "OWNER" column Otherwise, it's like ALL_SOURCE.
So the source of another way to get the existing ode is:

SELECT    text
FROM      user_source
WHERE     type    = 'PROCEDURE'
AND       name    = 'INJ'
ORDER BY  line
;

You can also use dbms_metadata for getting the soure code.

Tags: Database

Similar Questions

  • How to change a procedure using sqlplus...

    command to change a procedure using sqlplus

    Hello

    Laughing says:
    command to change a procedure using sqlplus

    You cannot change a procedure in the way that you can, say, ALTER TABLE; all you can do is CREATE OR REPLACE PROCEDURE..., with the definition of the whole procedure.

    Do the actual editing in a text editor. Any editor will do. You can even use a word processor, if you think to save it as text only.

    If you don't have a copy of the procedure as it is, and then use dbms_metadata, or query a view of data as all_source dictionary to get a.

    In SQL * Plus, run the file that you have edited by saying:

    SQL>  @pathname\filename
    
  • How to change the automatic generated wsdl for the procedure

    I configured xdb and as far as I know, for each procedure that I expose as a web service, oracle automatically creates a wsdl.

    I would like to change this wsdl, but I don't know where I do.

    For example:
    It is a part of the wsdl file I want to edit:

    From:

    < types >

    "< xsd: Schema targetNamespace=""" elementFormDefault= "qualified">
    "< xsd: Element name="TESTE_AUXInput">"
    < xsd: complexType >
    < xsd: SEQUENCE >
    "< xsd: Element name="P_VAR-VARCHAR2-IN"" type= "xsd: String"/ >

    TO:

    < types >

    "< xsd: Schema targetNamespace=""" elementFormDefault= "qualified">
    "< xsd: Element name="TESTE_AUXInput">"
    < xsd: complexType >
    < xsd: SEQUENCE >
    "" < xsd: Element name= "P_VAR-VARCHAR2-IN" " minOccurs="0" maxOccurs="1"oraxdb:propNumber = '4608' oraxdb: global ="false"oraxdb:SQLName ="VAR VARCHAR2 IN"oraxdb:SQLType ="VARCHAR2"oraxdb:memType ="1"oraxdb:MemInline ="true"oraxdb:SQLInline ="true"oraxdb:JavaInline ="true"' type="xsd: String"/ >




    I tried to create a "TESTE_AUXInput" type, but it changed nothing.

    I heard it has to do with the XML schemas, but I tried to create an xml schema that contains:

    "" < xsd: Element name= "P_VAR-VARCHAR2-IN" " minOccurs="0" maxOccurs="1"oraxdb:propNumber = '4608' oraxdb: global ="false"oraxdb:SQLName ="VAR VARCHAR2 IN"oraxdb:SQLType ="VARCHAR2"oraxdb:memType ="1"oraxdb:MemInline ="true"oraxdb:SQLInline ="true"oraxdb:JavaInline ="true"' type="xsd: String"/ >

    < xsd:simpleType >

    < xsd:restriction base = "XSD: String" >

    < xsd:minLength value = "1" / >

    < xsd:maxLength value = "100" / >

    < / xsd:restriction >

    < / xsd:simpleType >

    < / xsd: element >


    But I don't know how to do the procedure to use wsdl.
    How can I do?

    INFO:
    Oracle 11.2.0.4 standard edition
    Oracle linux 5

    If you need any other information, let me know.

    Thanks in advance.

    And the answer is always no, the wsdl file cannot be changed.

  • Satellite U400 - 15G - overheating-how to change the cooling module?

    Hello

    My Satellite U400 15 G is overheating (CPU up to 70 ° c). NEITER in Google nor in the manual, I can find a statement, how to open and change the cooling module. (I'm only trying to change mine, because garranty is already gone)

    Does anyone know how to open the laptop/notebook and how to change the cooling module?

    Thanks in advance

    Post edited by: bla42

    Before you continue just a matter of discussion:
    Let's say I help you with this and damage you something or broke a plastic part, what you will do in this case?
    I mean you probably know that you can get a few small important parts as separate components.

    By the way: this description may be provided in the manual. Disassembly of the laptop is authorized personal only. When you buy a new car it is no description how to disassemble the entire engine, right?

    By the way: Jeanine's right. See this page. There are many useful tips on laptop disassembly procedure.

  • How to change the installation of K: drive C:?

    When I load software on my computer he always asks the K: drive. Could you please inform me where I can go in to C:.  My K: is my external hard drive.  Thank you Dee

    Here is the procedure to change the default path for the installation of software on Vista:http://www.mydigitallife.info/2009/03/23/how-to-change-default-windows-installation-path-to-your-desired-path/.  In this case, you would choose a location on the C: drive (maybe C:\Program Files if it is still there - or create this folder if it is not).  Make a new folder in the directory root - don't bury it in another folder or even deeper.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • My windows7 32-bit stsrter service Pack 1 dvd is damage. How does this download procedure?

    My windows7 starter 32-bit service Pack 1 DVD is damage. How does this download procedure?

    Use the following guide to convert a standard Windows 7 disc to include a menu of the version to install.

    How choose desired Windows 7 Edition / Version during the installation?
    http://www.askvg.com/how-to-choose-desired-Windows-7-Edition-version-during-Setup/

    UPDATE: you can also use a utility free "ei.cfg" removal tool to remove "ei.cfg" file so that you can choose the version you want at installation time. The utility of deleting ei.cfg is a simple tool that will remove the ei.cfg from any Windows 7 ISO disc image, so to convert the image into a "universal" disk that will prompt the user to select an edition during installation.

    OR you can use another free "Windows 7 ISO Image edition Switcher" tool to change the "ei.cfg" file so that you can convert a Windows 7 installation ISO specific file (for example Windows 7 Ultimate) edition to another (for example Windows 7 Professional).

    This tool works by activating / deactivating the deletion bit in the table of UDF file, eliminating the need unpacking and rebuilding the ISO, which means that it is extremely fast (to patch the ISO to remove ei.cfg takes only a fraction of a second), and the process is easily reversible (by running the utility on a patched by this utility disk image will restore the disk image to its original state).

    Now the question is, how do I remove or change the "ei.cfg" file in the Windows 7 Installer?

    There are 2 ways! You can extract the contents of the Windows 7 installation ISO file using 7 - Zip and then delete or modify the "ei.cfg" file according to your needs. Its useful if you want to upgrade because you can run the file setup.exe directly from the extracted folder and install Windows 7.

    If you want to do a clean install, you can open the ISO file using the "UltraISO" software, "Power" or "MagicISO" and then delete or modify the "ei.cfg" file and save the ISO. Now, you can burn the ISO to a DVD file and install your desired edition of Windows 7.

    =========================================================

    Windows 7 Professional 32 bit: http://msft.digitalrivercontent.net/win/X17-59183.iso
    Windows 7 Professional 64-bit: http://msft.digitalrivercontent.net/win/X17-59186.iso

    J W Stuart: http://www.pagestart.com

  • How to change db_unique_name standby

    Oracle version: 11.2.0.2 RAC, host OS: RHEL 5.6

    I need to change my database db_unique_name physics standy.

    (1) how to change, what is the procedure for that?
    (2) with the change of db_unique_name, are data files, log files names are also changed? For example my name curent datafile is:
    +Data/EBSTST_STY/datafile/users.382.789323897

    If I change db_unique_name to EBSTST_SBY, my data also changes file name to
    +Data/EBSTST_SBY/datafile/users.382.789323897

    (3) do I need backup fresn ant to my database after changing my physical standy database db_unique_name, if we take backups of standby instead of primary.

    I need to change my database db_unique_name physics standy.

    (1) how to change, what is the procedure for that?

    DB_UNIQUE_NAME is a static setting, once you change in SPFILE. You have to bounce the database.

    (2) with the change of db_unique_name, are data files, log files names are also changed? For example my name curent datafile is:
    +Data/EBSTST_STY/datafile/users.382.789323897

    If I change db_unique_name to EBSTST_SBY, my data also changes file name to
    +Data/EBSTST_SBY/datafile/users.382.789323897

    No change for the current files, of course in the future if add you it data files will be created under the new DB_UNIQUE_NAME, assuming you are using Oracle managed files.
    You can rename data files after completing the copy of the image.

    (3) do I need backup fresn ant to my database after changing my physical standy database db_unique_name, if we take backups of standby instead of primary.

    Make number of switches in the Journal, once that its completely synchronized then he feel that standby does not work, then take backup.

  • How to change a label of Type user in OIM 11 g

    How to change a label of Type user in OIM 11 g. If we need to change the first name label or name family, then we can change to User.xml and others in the file properties of resources, but what is the procedure to change the Type of user.

    Have you tried with change in the resource group property file as JAR file?

  • How to create a procedure for REF CURSOR output with any WHERE clause?

    I have a requirement like this: I have a huge question that need to reuse in my code over 10 times. This SQL has about 50 lines. Here for these 10 odd times sometimes changes in WHERE clause (columns are the same). So I can't create a view as SQL is not static.

    I thought to write a procedure with a para of WHERE_CLAUSE entry. I pulled out a refcursor sys by adding where clause. But I can't do it because you cannot add a clause like this where clause.

    i.e.
    PROCEDURE dynamyic_query (p_where_clause IN VARCHAR2, p_out_query OUT SYS_REFCURSOR ) IS
    BEGIN
    
      OPEN p_out_query FOR SELECT ......... FROM table WHERE || ' ' || p_where_clause;
    
    END;
    The foregoing gives an error.

    How to handle such a situation? Any help would be greatly appreciated.

    Hello

    Channa wrote:
    ... However, when I change the procedure like this:

    PROCEDURE FORMS_TEXT_DYN_SQL_TEST(p_where_cluase IN VARCHAR2, p_out_cursor OUT SYS_REFCURSOR) IS
    v_stmt VARCHAR2(1000);
    BEGIN
    v_stmt := 'SELECT tname FROM tab_test WHERE tname LIKE ''%ABS_V4%'' AND :y';
    
    OPEN p_out_cursor FOR v_stmt using p_where_cluase;
    
    END;
    

    And run this block of code:

    declare
    v_tname varchar2(200);
    out_cursor sys_refcursor;
    begin
    forms_text_dyn_sql_test(' 1 = 1 ', out_cursor );
    LOOP
    fetch out_cursor INTO v_tname;
    exit when out_cursor%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(v_tname);
    END LOOP;
    end;
    /
    

    I get the error:

    [1]: (Error): ORA-00920: invalid relational operator ORA-06512: at "ABS.FORMS_TEXT_DYN_SQL_TEST", line 6 ORA-06512: at line 5
    

    Looks like you can only set column_name =: z, column_name =: values of type y. You can not it seems to replace it with no WHERE CLAUSE?

    A bind variable, such as: it, represents a single value.
    If: is the VARCHAR2 '1 = 1', then

    SELECT tname FROM tab_test WHERE tname LIKE '%ABS_V4%' AND :y
    

    takes the value

    SELECT tname FROM tab_test WHERE tname LIKE '%ABS_V4%' AND '1 = 1'
    

    I think you want something like this:

    CREATE OR REPLACE PROCEDURE FORMS_TEXT_DYN_SQL_TEST
    (     p_where_clause      IN      VARCHAR2
    ,      p_out_cursor      OUT      SYS_REFCURSOR
    ) IS
      v_stmt VARCHAR2(1000);
    BEGIN
      v_stmt := 'SELECT ename FROM scott.emp WHERE ename LIKE ''%A%'' AND '
              || p_where_clause;
    
      OPEN p_out_cursor FOR v_stmt;
    
    END;
    /
    show errors
    
    SET  SERVEROUTPUT  ON
    
    declare
      v_tname varchar2(200);
      out_cursor sys_refcursor;
    begin
      forms_text_dyn_sql_test(' 1 = 1 ', out_cursor );
      LOOP
        fetch out_cursor INTO v_tname;
        exit when out_cursor%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE(v_tname);
      END LOOP;
    end;
    / 
    

    Output:

    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    ADAMS
    JAMES
    
  • How to change the SGA and PGA in 10g r2 RAC

    Hello

    How to change the SGA and PGA in 10g r2 RAC, its Linux.

    Hello

    Here's the way I followed to change the SGA and PGA in CARS.
    --------------------------------------------------------------------------------
    Action plan to change the parameter memory in the environment(5/21/2010) of production

    Note:
    =====
    Practice must be done in the DEV/TST environment before going to Production.
    Although the procedure can be applied in the testing environment the evolution of values
    used in the test environment should be amended since number of RAM are not the
    even between the production and test servers.

    1 changes to these two parameters in one of
    the prod instance, e.g. PROD1
    ====================================================
    Connect as sysdba on sqlplus
    --------------------------

    Change:

    ALTER system set sga_target = 28G scope = spfile sid ='* ';

    Change:

    ALTER system set pga_aggregate_target = 4G scope = spfile sid ='* ';

    SQL > alter system set pga_aggregate_target = 4G scope = both;
    SQL > show parameter pga_aggregate_target;
    -should see the number altered on both instances

    Change:

    SQL > alter system set sga_max_size = 28G scope = spfile sid ='* ';

    SQL > alter system set sga_max_size = 28G scope = spfile;

    SQL > alter system set sga_target = 28G scope = spfile;

    3 stop PROD database (two instances must stop)

    $> srvctl stop database d PROD
    $>. / $ ORA_CRS_HOME/bin/crs_stat - to check the status of the database

    4. establish the PROD database (two Forum should be high)

    $> srvctl START database-d PROD
    $>. / $ ORA_CRS_HOME/bin/crs_stat - to check the status of the database

    connection in both cases as sysdba to check
    --------------------------------------------

    SQL > show parameter pga_aggregate_target
              
    SQL > show parameter sga_max_size
    -should see the number of change always there in both cases
    -According to step 1

    -After confirmation above two parameters are changed on both instances.
    -then make the syntax below in a case

    (5) check that everything is ok

  • How to write a procedure to call and run the custom package backend

    Hi all

    Oracle 10g
    Oracle Apps R12

    I work with here oracle order management, we have a package called (Pick Release) to customize. Due to a problem, we have this concurrent program execution manually giving Route_id as parameter. The route_id comes from the road to the Table. By using this query

    Select distinct route@DB_LINK_APPS_TO_ROADSHOW route_id
    When trunc (route_date) = trunc (sysdate + 2).

    on a daily basis, we have almost 42 routes and we run this simultaneous program manually close times.

    so now how to write a procedure for this

    Step 1 make the route to the routing table. (By cursor we can get the route_id accordingly)

    Step 2 How to trigger custom backend package and run accordingly to this output of the cursor (route_id)

    If 40 routes of cursor get is - that the simultaneous program runs 40 times according to this route_id.


    can some could provide the steps to do this


    Thanks and greetings

    Srikkanth.M

    To submit a competing request from the back - end:

    FND_REQUEST. SUBMIT_REQUEST (Client or server)

    Summary

    function FND_REQUEST. SUBMIT_REQUEST

    (application IN varchar2 default NULL,

    program IN varchar2 NULL by default,

    Description IN varchar2 default NULL,

    start_time IN varchar2 default NULL,

    sub_request IN default boolean FALSE

    Argument1,

    argument2,..., argument99.

    Return to argument100 number);

    Description

    Submits a competing treatment by a simultaneous Manager. If the query is successful, this function returns the ID of the concurrent request; Otherwise, it returns 0.

    ATTENTION: FND_REQUEST needs to know information about the user and accountability whose application is submitted. Therefore, this feature works of concurrent programs or forms within the Oracle Applications.

    The FND_REQUEST. SUBMIT_REQUEST function returns the ID of the concurrent application after successfully. It is up to the caller to issue a commit to complete the application.

    Your code should retrieve and handle the error message generated if there is a problem of presentation (the ID of the concurrent request returned is 0). Use FND_MESSAGE. RETRIEVE and FND_MESSAGE. ERROR to retrieve and display the error (if the application is made on the client side).

    Related essays: overview of the Message dictionary (see page)

    You must call FND_REQUEST. SET_MODE before calling FND_REQUEST. SUBMIT_REQUEST of a database trigger.

    If FND_REQUEST. SUBMIT_REQUEST fails to go anywhere but a database trigger, database changes are cancelled until the time of the function call.

    After a call to the FND_REQUEST. SUBMIT_REQUEST function, installation of all parameters are reset to their default values.

    Arguments (input)

    short name of the application associated with the concurrent request for enforcement.
    short simultaneous program (not the executable) name of the program for which the application must be made.
    Description Description of the application that appears in the form of concurrent requests (optional).
    start_time time during which demand is expected to start running in the (optional) HH24 or HH24:MI:SS format.
    sub_request set to TRUE if the request is made by another application and should be treated as a subquery.
    From version 11, this parameter can be used if you submit requests for in a concurrent program of PL/SQL stored procedure.
    argument1... 100 arguments for the concurrent request; up to 100 arguments are allowed. If the Oracle Forms submitted, you must specify all arguments of 100.

  • How to change the xml link?

    First a few words about my background:

    I got a page on a version of InDesign CS3 layout. Now, I'm creating a procedure to automate the production of several pdf based on this provision. Manually process would be to open the page layout; change the xml with each xml source link and create a file pdf corresponding...

    First question:

    In CS4 when I want to manually edit the xml link, the open dialog box prevents me (xml files are grey) to select xml files, it is a well known problem? How can I avoid it?

    Second question:

    How to change the script xml link?

    Last question - applescript question -:

    How to skip application dialog boxes? As "this document is missing a few links, would continue you?

    If you want to be able to help me, thanks in advance!

    There is a piece of code found on the net:

    tell document 1 of application "Adobe InDesign CS3"relink thisItemLink to someFileReferenceupdate thisItemLinkend
    
  • How to change the Port pool

    If we want to change the port pool after cloning of layers of DB and Apps, what is the best way to do... A single method, I know, i.e run the preclone on the target system and run config clone again once on the same target on both system layer of database and Application layer and change the pool of port...

    is there another method?

    How to change the host name of a component of Applications using AutoConfig Doc ID: 341322.1

    (a) to register the application of topology of net service model node
    (b) updated the context file Autoconfig
    (c) shutdown apps services
    (d) to run the automatic configuration service
    (e) change the name of the host at the OS level
    (f) restart the machine.
    (g) to start the application sercies

    In step 2, the context of the updated file, we will create the new context with the new hostname file... Here I have doubt, how come new context file will be created with the new host name, since it has not changed hostname at the level of the bone at this stage or before this step? AutoConfig will be CNET, because the Hostname of the Machine is different, because we change the hostname in the last step before

    Please clarify my doubt, if my understanding is wrong?

    In step 2, you run "perl adclonectx.pl" command. This script is used to clone your context file (i.e. generate a new), and it will ask you to enter the new host name. Once completed, you will have two files of context in the directory $APPL_TOP/admin:

    (1) _ .xml
    (2) _ .xml

    When you run the AutoConfig (step 4), you must provide the context new file generated (i.e. _.xml), and the model topology net services (which is clean, because we have already served there) will be filled with the new host name.

    why we cannot do the procedure below...

    (a) to enter the net service topology model applications pane
    (b) change the hostname at the os level
    (c) restart the machine.
    (d) update the context file with the new host name or create the new context file
    e run the automatic configuration
    (f) to start the services

    Please correct me if I'm wrong...

    I have not tried your procedure before, but I think it would work also.

    I hope it is clear now.

  • How to change the iPhone camera shutter sound 7

    How to change the iPhone camera shutter sound 7?

    Hello

    To adjust the volume of the sound of the camera shutter:

    • Use the settings ringer and alerts:
      • On iPhone 7 and iPhone 7 more, go to: settings > sounds and haptic.
      • (Other models, go to settings > sounds).
    • Or turn mute off / on using the switch on the side of your iPhone's ring/silent.
      • (The mute function is disabled in some countries).
  • How to change the number of minutes for the exercise of the activity of the application

    How to change the number of minutes for the exercise of the activity of the application

    Hello

    It is not currently possible to change the goal of daily exercise.

    If you want to suggest that Apple consider adding this option, you can submit a request here:

    https://www.Apple.com/feedback/watch.html

Maybe you are looking for