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.
Tags: Database
Similar Questions
-
try to run a procedure using perl
Hello
I'm trying to run a procedure using perl as under:
my @tabs = qw! ACTOR ADDRESS CITY COUNTRY CUSTOMER INVENTORY STAFF STORE LANGUAGE FILM CATEGORY.
for my {$ts (@tabs)
chomp $ts;
My $csr = $ora - > prepare (q {}
BEGIN
update_cascade.on_table(:TS)
END;
});
$csr-> bind_param (": ts", $ts ");
$csr-> run;
}
Which results in the following errors:
DBD::Oracle:St run failed: ORA-06550: line 4, column 12:
PLS-00103: encountered the symbol "END" when expected in the following way:
:= . ( % ;
The symbol ';' was replaced by 'END' continue. (DBD ERROR: error possibly near <>* indicator to the 71 char in ')
BEGIN
update_cascade.on_table(:TS)
<>* END;
') [for statement ""]
BEGIN
update_cascade.on_table(:TS)
END;
«with ParamValues: ts = 'ACTOR'] at sakila_update_cascade.pl line 18.»
DBD::Oracle:St run failed: ORA-06550: line 4, column 12:
PLS-00103: encountered the symbol "END" when expected in the following way:
:= . ( % ;
The symbol ';' was replaced by 'END' continue. (DBD ERROR: error possibly near <>* indicator to the 71 char in ')
BEGIN
update_cascade.on_table(:TS)
<>* END;
') [for statement ""]
BEGIN
update_cascade.on_table(:TS)
END;
«with ParamValues: ts = 'ACTOR'] at sakila_update_cascade.pl line 18.»
I can run it in SQLPlus under Deputy
exec update_cascade.on_table (:'ACTOR');
I tried with:
update_cascade.on_table('||:ts||')
This does not run and you get this error in perl:
Unable to bind placeholder unknown ': ts' (': ts') to the sakila_mig.pl of the line 659.
Package DBD::Oracle example provided in point sites:
my $test_num = 5 ;
my $is_odd ;
$csr = $db -> prepare (q{
BEGIN
PLSQL_EXAMPLE. PROC_IN_INOUT ( :test_num, :is_odd) ;
FIN;
});
$csr -> bind_param (":test_num", $test_num);
$csr -> bind_param_inout (":is_odd", \$is_odd, 1);
$csr ->execute
Thanks a lot for your help!
Tonya.
My = $ora $csr-> prepare (q {}
BEGIN
update_cascade.on_table(:TS)
END;
});
You missed a semicolon (;)
-
Run the procedure works without slash
It's weird.
I'm in a plsql connected to a database session.
I can run a procedure as follows:
run status_pkg.check_owner_vcard (1,1,2);
However, I would like eventually to use variables, but when I try to do something like this:
SQL > declare
2 start
3 run status_pkg.check_owner_vcard (1,1,2);
4 end;
7 m
run status_pkg.check_owner_vcard (1,1,2);
*
ERROR at line 3:
ORA-06550: line 3, column 9:
PLS-00103: encountered the symbol "STATUS_PKG" when awaits an of the
Next:
:= . (@ %; immediate)
The symbol ': = ' was replaced by 'STATUS_PKG' continue.
It is not a function - procedure which could wait for oracle?
Any help appreciated
Rgds
Petersqlplus command does not work inside a plsql block. Remove it and your block should run.
-
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
-
Cannot run the procedure several times
Hello
I use oracle 12 c
I just created a stored procedure that works very well
Problem is that the second time I run it, it does not what it should (data fusion)
When I run the second time I always get PL/SQL procedure successfully completed but the target table is still empty, here is the procedure:
1 create or replace procedure MERGE_TABLEA
2 as
3. start
4 MERGE TABLE_A has B (SELECT 'ID', 'NAME' OF TABLE_B) with the HELP of
ON (A.ID = B.ID)
WHEN MATCHED THEN
UPDATE SET B.SID = B.NAME
WHEN NOT MATCHED THEN
INSERT (A.' ID',' NAME')
VALUES (B.ID, B.NAME);
END;
/
PL/SQL procedure successfully completed.
I also tried to build a simple procedure that id just insert and name of the table to test ina and it works very well, no matter how many times I've run it
Is it maybe something with the merger or what?
Thank you!
OK guys, I think there are some misunderstandings here,
@ddf_dba_ifox , version of the db that I use is stated in the first line of my post, I can't publish data for security reasons
@rp0428 I forgot to mention that I'M to truncate the table, and then run the procedure again but the merger no longer works as the table is empty
In any case, I found out why
I'm merging the tables in the DB using the schema that is related to my installation of Oracle APEX
In the procedure if you notice there is no COMMIT
As apex has users within a schema, that I couldn't see the lines without committing before
Thank you all anyway!
-
How to run four procedures, in order, by using anonymous block
Hello
I am trying to run four procedures, in order, by using anonymous block. If one of the procedure fails remaining should get executed. How can I achieve this?
For example:
BEGIN
PROC1;
Proc2; -Suppose that Proc2 will fail, it should not affect the execution of Proc3 and proc 4
Proc3;
Proc 4;
END;Thank you!
Hello
Maybe this can help you:
BEGIN begin Proc1; exception when others then dbms_output.put_line('proc1 ' || sqlcode || ' ' || sqlerrm); end; begin Proc2; exception when others then dbms_output.put_line('proc2 ' || sqlcode || ' ' || sqlerrm); end; begin Proc3; exception when others then dbms_output.put_line('proc3 ' || sqlcode || ' ' || sqlerrm); end; begin Proc4; exception when others then dbms_output.put_line('proc4 ' || sqlcode || ' ' || sqlerrm); end; END;
In your case, it may be useful if your procedures have their own exception handlers, so they never fail. But then you need a sort of exception information that is displayed.
concerning
Kay -
Run the procedure after the application deployment
Hi all
I faced a small question.
When I deploy my application to another server - it must run a procedure (this means that the procedure must be run once immediately after successful deployment).
It takes to update some records in the system tables.
Apex supports characteristic or something like that?
APEX 4.1
Thank you
Published by: Rod 13.05.2013 confidence 0:56Cane Trust wrote:
I faced a small question.
When I deploy my application to another server - it must run a procedure (this means that the procedure must be run once immediately after successful deployment).
It takes to update some records in the system tables.Apex supports characteristic or something like that?
APEX 4.1
How do you deploy your application? The documentation contains all the details of creating a packaged application with all dependencies for database included as items of support. Your procedure must be performed in one of these objects support scripts.
-
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. -
Try to run a procedure that takes as parameter VARRAY
Hi gurus,
I am trying to run a procedure having a table entry.
However, I get an error during execution.
Can you please help me on how to run a procedure having a table input?
create or replace type type_a in the table to the number (10,0);
Script:
declare
txn_id type_a
Start
txn_id type_a()
txn_id (1): = 516963065;
procedure_1 (emp_id = > 1001, txn_id)
end;Besides above solutions, you must confirm that all variables have a corresponding input parameter, including the case even in the name of the variable, if your Oracle database is case-sensitive.
Can you check and let us know your findings?
Kind regards
Ashutosh -
ORA-00942 Table or view does not exist when you run a procedure
Hello
I have a procedure called FND_GLOBAL under a scheme called APPS and I have granted execute privilege on this procedure to another schema called CIVICA
However when I run the procedure of the CIVIC scheme I get
ORA-00942 Table or view does not exist
ORA-06512 at APPS. FND_CORE_LOG, line 25
ORA-06512 at APPS. FND_GLOBAL, line 104
ORA-06512 at APPS. FND_GLOBAL, line 1620
ORA-06512 at APPS. FND_GLOBAL, line 2171
ORA-06512 at APPS. FND_GLOBAL, line 2313
I'm guessing that some of the sub components must also be given to the CIVICA?
How does work to define rights? Subcomponents should not also be accessible via this procedure being owner / defined by Apps but executed by CIVICA?
JimHi, Jim,.
Jim Thompson wrote:
Sorry Frank - in order to clarifyI wanted to CIVICA to be able to execute procedures and functions in applications. Package FND_GLOBAL
However this package has been defined with the rights of the plaintiff - CIVICA must be explicitly object privilege to all objects used by the package (or packages of sub that he calls, that there are some - it is really a case to view the hierarchy of this package and ensure that each object is explicitly given to CIVICA)
What do you mean by "explicitly granted to CIVICA"? ". Do you mean granted directly to CIVICA, and not a role that CIVICA has?
Once more, the privileges granted to the roles are good enough for packages AUTHID CURRENT_USER (also known as the "rights of the applicant"). The only time where you have to say "GRANT."... CIVICA"is when granting a role to the CIVICA; all other privileges may be granted to this role, or some other roles that are granted to the role that CIVICA has.
Mnight want to create a role that has all the necessary privileges to use the package and grant this role to users like CIVICA.... So, it seems as if I have no choice but to get my pen and paper and trace through the nested packages and objects called by FND_GLOBAL and to ensure that they are explicitly granted to CIVICA! I hate days like these!
CIVIA want to have all the privileges that has APPS? You can query dba_tab_privs (and oither views in the data dictionary) to find (and write statements of "GRANT... ("for) all these privileges.
You can also create another packet (let's call it FND_GLOBAL_I) in applications with rights of the author. Specification of package would be identical to the specification of FND_GLOBAL package, except that it says FMD_GLOBAL_I instead of FND_GLOBAL. The FND_GLOBAL_I package body are very similar to the spec. The body of each procedure or function would simply be a call to the corresponding functuion in FND_GLOBAL. Since FND_GLOBAL has hundreds of procedures, it will be a lot of work, but perhaps less work than to find exactly what privileges are needed.
-
automatic release to run a procedure
I created a procedure that I would like to be run automatically after a few updates in another table. I know easier is for the automatic execution of a procedure by creating a job, even if I assume that by creating a trigger even should be possible, correct? Please advise? Thank you!!
CREATE OR REPLACE TRIGGER trigger_run_procedure
AFTER the update on zainet_dev_mig.zn_tec_infra_run
FOR each LINE
BEGIN
IF (: NEW.active = 'Y' and: NEW.) TS_end is not null) THEN
Call run_test_cases)
*;*
END IF;
END;
following error occurs:
13:29:37 ORA-24344: success with compilation error
13:29:37 4/9 PLS-00103: encountered the symbol "RUN_TEST_CASES" when expects it one of the following values:
13:29:37: =. ( @ % ;
13:29:37 the symbol ': = ' was replaced by 'RUN_TEST_CASES' continue.
13:29:37 7/8 PLS-00103: encountered the symbol "end-of-file" when it is waiting for one of the following values:
13:29:37 begin case declare exit end exception for goto if loop mod
13:29:37 lift pragma null return select update while with
13:29:37 < an ID > < a between double quote delimited identifiers of >
13:29:37 < a variable binding > < < close current delete fetch locking insert
13:29:37 point backup restore opened the sql value run commit forall fusion
13:29:37 pipe
Published by: 845498 on August 2, 2011 04:32Hello
You can run a procedure without APPEAL
CREATE OR REPLACE TRIGGER trigger_run_procedure AFTER UPDATE ON zainet_dev_mig.zn_tec_infra_run FOR each ROW BEGIN IF (:NEW.active = 'Y' and :NEW.TS_end is not null ) THEN run_test_cases; END IF; END;
-
Hello
I'm able to run this procedure.
I created the procedure successfully.
CREATE OR REPLACE PROCEDURE update_LOGIN_TABLE (NAMER OUT VARCHAR2)
IS
temp_num NUMBER;
BEGIN
temp_num: = 10;
DBMS_OUTPUT. Put_line (temp_num);
Setting a DAY to the USER SET NAME = 'Ranga' where NAME = NAMER;
COMMIT;
EXCEPTION
WHILE OTHERS THEN
ROLLBACK;
END update_LOGIN_TABLE;
*/*
It comes to my Table Structure:
SQL > select * from users;
PASS NAME
-------------------- --------------------
Sai Baba
SAI Natha
roux keyboard
roux keyboard
When I tried to run, I get this: execute update_LOGIN_TABLE ('good');
SQL > execute update_LOGIN_TABLE ('good');
BEGIN update_LOGIN_TABLE ('good'); END;
***
ERROR on line 1:
ORA-06550: line 1, column 26:
PLS-00363: 'delighted' expression cannot serve a purpose of assignment
ORA-06550: line 1, column 7:
PL/SQL: Statement ignoredupdate_LOGIN_TABLE (NAMER OUT VARCHAR2)
I think you probably wanted an IN argument in your procedure.
-
How to run a procedure created dynamically with out parameter
Hi guys,.
a friend I need to run a procedure whose name will change dynamically and this procedure is with 2 out parameter. I need to capture the value of these 2 output settings, here I m giving my code too...
declare
int v_emp_id: = 100013;
p_reg_off varchar (5): = "R";
int p_user_id: = 6;
v_status varchar (200);
v_message varchar (200);
v_Formula varchar (100);
int v_number: = 1;
Start
v_Formula: = 'call testsp_ | v_number | ' ('| v_emp_id |', "'| p_reg_off |") «, » || p_user_id | v_status, v_message)';
DBMS_OUTPUT. Put_line (v_Formula);
immediately run v_Formula;
end;
and my procedure structure is like this
CREATE OR REPLACE PROCEDURE testsp_1
(
p_emp_id INT,
p_reg_off TANK,
p_user_id INT,
p_status OUT NOCOPY INT,
p_message OUT NOCOPY VARCHAR2
)
AS
Start
end;
Please help me...Hello
You must use the "USING" clause to execute dynamic sql with parameter out.
Example: http://download-west.oracle.com/docs/cd/B28359_01/appdev.111/b28370/dynamic.htm
Arun-
-
How to run a procedure with the object as OUTPUT parameter
Hello
I have a procedure and it composed of 2 parameters, there is an input parameter and it's some ID (NUMBER datatype) and 2nd parameter is an output parameter and it an object type. I want to run this procedure, but not able to do the same thing. Can someone please suggest me how to run a procedure that got the object as output parameter.
Thank you very much in advance for your support.Example:
SQL> create or replace type t_obj as object (ename varchar2(10), deptno number); 2 / Type created. SQL> ed Wrote file afiedt.buf 1 create or replace procedure myproc (p_empno in number, obj out t_obj) is 2 begin 3 select t_obj(ename, deptno) 4 into obj 5 from emp 6 where empno = p_empno; 7* end; SQL> / Procedure created. SQL> set serverout on SQL> declare 2 v_obj t_obj; 3 begin 4 myproc(7788, v_obj); 5 dbms_output.put_line(v_obj.ename||','||v_obj.deptno); 6 end; 7 / SCOTT,20 PL/SQL procedure successfully completed.
Maybe you are looking for
-
Updates kills internet connection every time
Whenever I have install updates windows my internet connection is killed. My provider is Rogers. If I have to go back to a previous date. I'm currently 25 undates waiting, but whenever I install I have no Internet. When I trouble shoot it says I'm co
-
Lost metadata when transfer of Win Vista/WMP 11 for Win 7/WMP 12
Hello After I moved all my music library from Win Vista/WMP 11 for Win 7/WMP 12, I note that several metadata is lost. For example all the values in the PlayCounts and stamp fields have been updated with 0/white. Before the transfer I backed up all t
-
I copied a bunch of songs in a jumpdrive/mp3 from my laptop, then copied them all to my office from the jumpdrive. Now windows media player won't play all the songs. I get the window that says that the file cannot be found, renamed, or deleted. I loo
-
How to copy a document from USB to the computer?
I am trying to copy/move an excel document, of a drive from my computer, but when I remove the USB port, I'm unable to access the document.
-
Hi allI'm a bit new to RoboHelp and I need your help in the management of monospaced fonts and different types of fixed spaces in the code examples.To be more precise: I have several lines of code that display wonderful in FrameMaker 10 when set in a