How to recompile a procedure by SqlPlus
If I don't want to use a tool (developer Sql, Toad,...) for the compilation of a stored procedure, can someone tell me how I can do this directly by SqlPlus? I mean who are the tables Oracle where I guess there is a flag saying if a results of procedure not compiled and how can I automatically write a little batch in SQL to recompile everything that is not compiled at one point?Thank you!
Published by: Mark1970 on February 8, 2010 0.52
SQL> select OBJECT_NAME, status
2 from user_objects
3 where OBJECT_TYPE='PROCEDURE';
OBJECT_NAME STATUS
-------------------- -------
MYPROC VALID
SQL> alter procedure MYPROC compile;
Procedure altered.
Status is not VALID during the procedure is recompiled.
Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]
Tags: Database
Similar Questions
-
How to change a procedure using sqlplus...
command to change a procedure using sqlplusHello
Laughing says:
command to change a procedure using sqlplusYou 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 perform the procedure in the SQL worksheet?
Hi, anyone knows, how I can execute procedure here?
I try to EXEC sec_roles, EXEC security_admin.sec_roles, EXECUTE - there's a SQL statement error. When I use the CALL - there is no such procedure (I have execute privileges).
Although in SQLPlus EXEC works, but there are problems with the standard SQL commands (each of them '2' returns any content is).
Any ideas?
Concerning
KrzysztofEXEC procedure (parameters) is a plu sql (and some others) shortcut for
BEGIN procedure(parameters); END;
So try that and then pressing / on anything in the sql worksheet that makes a statement in execution.
Note that if your procedure has defined parameters as OUT or IN OUT, you need to provide a variable to accept the returned values.
John
-
How to test a procedure that takes a PARAMETER array?
Oracle 9i
I created a procedure that takes an ARRAY PARAMETER (essentially a list of the IDS of employees and this procedure is called from the Java side), and the procedure is to remove the employees based on employee ID list.
I stated that the type employee_id_array is TABLE of NUMBER.
I want to test this procedure in sqlplus, but how to move this list of 'id table used' to this procedure, so I know it works?
Thank you.Sure.
satyaki> satyaki>select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod PL/SQL Release 10.2.0.3.0 - Production CORE 10.2.0.3.0 Production TNS for 32-bit Windows: Version 10.2.0.3.0 - Production NLSRTL Version 10.2.0.3.0 - Production Elapsed: 00:00:00.01 satyaki> satyaki> satyaki>create or replace type number_array as table of number; 2 / Type created. Elapsed: 00:00:00.02 satyaki> satyaki> satyaki>CREATE OR REPLACE procedure delete_employee( 2 p_employee_id_array in number_array 3 ) 4 as 5 begin 6 for i in 1 .. p_employee_id_array.count 7 loop 8 --dbms_output.put_line ('this employee idis is: ' || p_query_id_array(i)); 9 delete from emp 10 where empno in (to_number(p_employee_id_array(i))); 11 end loop; 12 end delete_employee; 13 / Procedure created. Elapsed: 00:00:00.13 satyaki> satyaki> satyaki>select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7777 SOURAV SLS 14-SEP-08 45000 3400 10 7903 1000 10 7499 Travor SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 4450 10 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7839 KING PRESIDENT 17-NOV-81 7000 10 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 7902 FORD ANALYST 7566 03-DEC-81 3000 20 14 rows selected. Elapsed: 00:00:00.16 satyaki> satyaki> satyaki> satyaki> satyaki>declare 2 vv number_array := number_array(7903,7499); 3 begin 4 delete_employee(vv); 5 end; 6 / PL/SQL procedure successfully completed. Elapsed: 00:00:00.15 satyaki> satyaki>select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7777 SOURAV SLS 14-SEP-08 45000 3400 10 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 4450 10 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7839 KING PRESIDENT 17-NOV-81 7000 10 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7902 FORD ANALYST 7566 03-DEC-81 3000 20 12 rows selected. Elapsed: 00:00:00.16 satyaki>
Kind regards.
LOULOU.
-
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.isoJ W Stuart: http://www.pagestart.com
-
Hi friends I want to know how to call a procedure that has values arrary as parameter?
I have a procedure as shown below, and I am using oracle 11g.
create or replace procedure procedureName (v_hospital_id in NUMBER,
v_process_id VARR_VARRY,
v_cnt OUT NUMBER);
Now, how to call this procedure from PLSQL. If v_process_id values ('abc123', 'xyz234', 'sfs234')
Please present the definition of VARR_VARRY
If it's a simple table of varchar2.
declare
v_cnt NUMBER;
Start
procedureName (1, VARR_VARRY('abc123','xyz234','sfs234'), v_cnt);
end;
-
How to call the procedure type table
Hi I have the below requirement
Created in the sub table type
CREATE or REPLACE the TYPE char_type IS the TABLE OF VARCHAR2 (4000);
create or replace procedure test_proc_type (p_type char_type) is
Start
I'm looping 1.p_type.count
dbms_output.put_line (p_type (i));
end loop;
end;
How to call the procedure with parameter as a type!
SQL> create or replace type char_type as table of varchar2(4000) 2 / Type created. SQL> create or replace procedure test_proc_type (p_type char_type) 2 is 3 begin 4 for i in 1..p_type.count loop 5 dbms_output.put_line (p_type(i) ) ; 6 end loop; 7 end; 8 / Procedure created. SQL> set serveroutput on SQL> SQL> exec test_proc_type(char_type('A','B','C','D','E')) A B C D E PL/SQL procedure successfully completed. SQL>
-
running a procedure in sqlplus
If I am running a procedure in SQLPLUS that takes 5-6 hours to run and I close the SQLPLUS after 1 hour, is the procedure stops running.
Unless you kill the session, the process will continue to run. Only the closing SQL * more will not cause the procedure to stop the execution.
-
How to run a procedure with refcursor to more
an entry is User_id = CMSH_USER; p_Ot-num =-9999; p_ppst_flag = 'P' and I want to take the trace by running this procedure, and any1 help me, how to run this procedure below and how to use these 5 on refcursor...
procedure Pr_get_mny(p_ot_Num IN NUMBER, p_User_Id IN VARCHAR2, p_Ppst_Flag IN VARCHAR2, Ref_Cur OUT Ref_Cursor, CUR_OPT OUT Ref_Cursor, CUR_TAXRATE OUT Ref_Cursor, CUR_TAXHOLD OUT Ref_Cursor, CUR_PENDGAACNT OUT Ref_Cursor ) IS
If the goal is to Test, the best tool is SQL
var ref_cur refcursor var cur_opt refcursor var cur_taxrate refcursor var cur_taxhold refcursor var cur_pendgaacnt refcursor exec pr_get_mny(-9999,'CMSH_USER','P',:ref_cur,:cur_opt,:cur_taxrate,:cur_taxhold,:cur_pendgaacnt) print ref_cur print cur_opt print cur_taxrate print cur_taxhold print cur_pendgaacnt
-
How to run a procedure with parameters in pl/sql collections?
I created a procedure with parameter from the collection. Can somone help me how to run a procedure in passing the parameters in the collection.
Package and how to create is successful. But I get the error message when executing the procedure.
ORA-06550: line 3, column 19:
PLS-00222: no function with name 'T_TAB' does exist in this scope
I gave the example of code here. Can someone please help me solve this problem.
-Spec package
create or replace package pkg_dist is
TABLE index IS THE NUMBER of t_tab_num TYPE of PLS_INTEGER;
procedure prc_test (a t_tab_num IN,
b IN t_tab_num,
c IN OUT t_tab_num);
end pkg_dist;
-Package body
create or replace package body is pkg_dist
procedure prc_test (a t_tab_num IN,
b IN t_tab_num,
c IN OUT t_tab_num) is
Start
IF (a (16) = 0) then
(16) c: = 0;
c (17): = 0;
c (18): = 0;
end if;
c (15): = (14)-(15)-a (16);
(16) c: = b (16) /b (17);
c (17): = 50;
(18) c: = a (16) * 2;
end prc_test;
end pkg_dist;
-executeing procedure
declare
TABLE index IS THE NUMBER of t_tab TYPE of PLS_INTEGER;
x t_tab: = t_tab (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
y t_tab: = t_tab (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500);
z t_tab;
BEGIN
pkg_dist.prc_test (x, y, z);
dbms_output.put_line (z (18));
END;
Error:
--------------------------------------------------------------------------------
ORA-06550: line 3, column 19:
PLS-00222: no function with name 'T_TAB' does exist in this scopeMy suggestion would be:
CREATE OR REPLACE PACKAGE pkg_dist IS PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist); END pkg_dist; CREATE OR REPLACE PACKAGE BODY pkg_dist IS PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist) IS BEGIN IF (a (16) = 0) THEN c (16) := 0; c (17) := 0; c (18) := 0; END IF; c (15) := a (14) + a (15) + a (16); c (16) := b (16) / b (17); c (17) := 50; c (18) := a (16) * 2; END prc_test; END pkg_dist; / DECLARE x SYS.odcinumberlist; y SYS.odcinumberlist; z SYS.odcinumberlist; BEGIN x := sys.odcinumberlist (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); y := sys.odcinumberlist (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500); z := sys.odcinumberlist (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); pkg_dist.prc_test (x, y, z); DBMS_OUTPUT.put_line (z (18)); END; /
See you soon,.
Manik. -
How to recompile the COBOL files?
Hi all
Can anyone provide some documentation to see how to recompile the COBOL files using Net Express 5.1 in the command prompt?
Thanks in advance.
Thank you and best regards,
Siva Prasad B1. set up two environment variables, PS_HOME and COBROOT, on the computer where you are going to compile COBOL. (This should be your file server or a machine that has access to your file server.) You can do this from a DOS command prompt window.
Set PS_HOME = C:\hr840
Set COBROOT = c:\netexpress\base2. open a DOS commands prompt window, if you have not already, orders and access
\Setup. 3. run CBLBLD. BAT as follows
cblbld
whereis the drive where the compilation takes place, is the temp
Directory where the compilation is doneThe CBLBLD. BAT file will create the directory to compile for you, if it does not already exist.
Novel make sure to include a space between the
and parameters; they are treated as two different settings within the CBLBLD. Bat batch program. Also to ensure that you have permission write to and that the compilation process will take place there. For example, the following command will have the COBOL source of
\src\cbl and the compilation process under c:\temp\compile:
cblbld c: \temp\compile
Take note of the information that appears on the screen during the process is running. It provides the location of important files that you need to consider. -
How to perform the procedure of the schema A b schema?
Hello...
I have a doubt... Please specify it.
There are 2 tables and procedure on the tables in A schema.
How to perform this procedure in the diagram B?
I have to give privileges?
Thank you
SAIHello
You must grant execute on the package in plan a plan b. You then Norman to either create a synonym in plan B or the fully qualified name of the call, for example
exec schemea.my_package;
-
How to recompile all invalid objects apps?
Hi all:
How to recompile all invalid objects apps? my environment is ORACLE 9.2.0.5 32bits.
Concerning
TerryYes,
Compile the drawing APPS
-
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.MTo 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 call the procedure in the process
Hello
I have create procedure abc.
How can I call procedure abc in the process in the processing of the Page.
I want to call this procedure when I press the "submit" button.
Thank youHello
Yes, that is correct
Kind regards
Jari
Maybe you are looking for
-
How I with what appears to be a false security Mac WARNING?
When I load Safari I have what appears to be a security warning false telling me to connect to iskbusinesstechnology.com.433 and call 1-888-442-8745 for immediate assistance. Is this a scam or what?
-
One of our MacBook has been connected to the internet through our router base station Airport Express wireless and wifi worked very well. All of a sudden, the other MacBook could not connect. After a few days of no connection on one while the other w
-
Series Officejet 6310/bt450: Connectivity Bluetooth dongle for HP printer
My printer works via bluetooth using a dongle bluetooth for the printer and another computer bluetooth dongle. It was very well under windows vista. Upgrade Windows 10, HP says no windows 10 for dongles which are product HP BT450 driver. However the
-
New Subscriber to another Publisher version
Hello I have improved my editor CUC at 10.5.2.11900 - 3 using the operating system administrator, now I need to add subscribers to cluster. But I do not have the file ISO Bootable image 10.5.2.11900 - 3 :( I have a 10.5.2.10000 Bootable image - 5 and
-
I have an asa5520 I would use to terminate the remote access and VPN l2l for our users and suppliers. It seems that the best 2 methods is to have either in parallel with our firewall or in an area demilitarized (recommended Cisco I guess) So, I prefe