PLSQL procedure error...
Hi guys,.I have the following functions within a packet...
I tried to create directories in the runtime dynamically beside a plsql...
FUNCTION Get_Site_Dir_Name (
site_ IN VARCHAR2,
dir_type_ IN VARCHAR2 ) RETURN VARCHAR2
IS
BEGIN
RETURN (REPLACE(site_, ' ', NULL) || UPPER(dir_type_));
END Get_Site_Dir_Name;
PROCEDURE Set_Dir_Path (
dir_path_ IN VARCHAR2,
site_ IN VARCHAR2,
dir_type_ IN VARCHAR2 )
IS
BEGIN
CREATE OR REPLACE DIRECTORY Get_Site_Dir_Name(site_, dir_type_) AS dir_path_;
END Set_Dir_Path;
But it gives me an error during deployment...WARNING: The body of a Package created with compilation errors.
PACKAGE BODY SITE_API errors:
LINE/COL ERROR
-------- -----------------------------------------------------------------
1354/4 PLS-00103: encountered the symbol "CREATE" when expecting one of
What follows:
begin case declare exit for goto if loop mod null pragma
raise return select update while < ID >
< between double quote delimited identifiers of > < a variable binding > < <
Close current delete fetch locking insert open rollback
SAVEPOINT SQLExecute set pipe fusion commit forall
Can someone help me with this?
Thank you very much...
It should be
stmt_ := 'CREATE OR REPLACE DIRECTORY :dir_name AS :dir_path';
EXECUTE IMMEDIATE stmt_
USING IN dir_name_,
IN dir_path_;
See you soon!
Bobin
Tags: Database
Similar Questions
-
PLSQL procedure error "component must be reported.
Hello
Greetings
I need to write a PLSQL procedure to compare the data between two different requests (through the collection), but in the face of an error
VERSION - Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
EXAMPLE OF CODE-
CREATE or REPLACE procedure V_test
type v_record is (record
CUSTOMER_TYPE varchar2 (10),
PRODUCT_CATEGORY varchar2 (10),
PRODUCT_DESC varchar2 (40));
type v_tst1 is table of v_record INDEX OF pls_INTEGER;
V_TEST1 v_tst1;
type v_tst2 is table of v_record INDEX OF pls_INTEGER;
V_TEST2 v_tst2;
Start
Select CUSTOMER_TYPE, b.PRODUCT_CATEGORY, c.PRODUCT_DESC
BULK COLLECT INTO V_TEST1
of a, b, c
where a.PRODUCT_CATEGORYD = b.PRODUCT_CATEGORY and a.PRODUCT = c.PRODUC
CUSTOMER_TYPE, PRODUCT_CATEGORY, PRODUCT_DESC group;
Select CUSTOMER_TYPE, PRODUCT_CATEGORY, PRODUCT_DESC
BULK COLLECT INTO VAS_TEST2
d
Group of CUSTOMER_TYPE, b.PRODUCT_CATEGORY, c.PRODUCT_DESC;
BECAUSE me in V_TEST1. FIRST... V_TEST1. LAST
LOOP
FOR j IN V_TEST2. FIRST... V_TEST2. LAST
loop
If VAS_TEST1. CUSTOMER_TYPE (i) = VAS_TEST2. CUSTOMER_TYPE (j) then
If VAS_TEST1. PRODUCT_CATEGORY (i) = VAS_TEST2. PRODUCT_CATEGORY (j) then
insert into v_tab values (sysdate, V_TEST1. CUSTOMER_TYPE (i), V_TEST1. PRODUCT_CATEGORY (i), V_TEST1. PRODUCT_DESC (i));
commit;
end if;
end if;
END LOOP;
END LOOP;
END;
/
ERROR - "PLS-00302: component 'CUSTOMER_TYPE' must be declared '.
Thank you in advance to suggest corrections or alternatives
-
Business event does not trigger the PLSQL procedure... What should do?
We need to call a plsql procedure when the workflow approval GL ended with approval. I thought I could do it by customizing the relevant business event.
We are on EBS 12.1.3 with RDBMS: 11.2.0.3.0.
I see the event oracle.apps.gl.Journals.journal.approve company has been disabled currently. I've enabled and created a subscription for her. Subscription was a PLSQL procedure. Currently, for objective test only thing it does is to insert a row in a table.
Parameters of the subscription to corporate events:
System: ORDEBS. SYSTEM.COM
Triggering event
Source type: Local
Event filter: oracle.apps.gl.Journals.journal.approve
Execution condition
Phase: 100
Status: enabled
Rule data: Message
Action type: custom
Error on: stop blocking and cancellation
Action
Rule of PL/SQL function: XX_GL_APPROVE_BE_PKG. Get_Attributes
Priority: normal
Documentation (not sure what value to give the latter. I went with the values below).
Owner: Name of the company
Tag owner: custom Schema
Using query I can see the event company is called when occurs below approval (an added line each time approval that has happened). But I don't see all the lines in the table where to insert a line. What could go wrong? How can I make sure that the procedure was called?
Select * from WF_DEFERRED where corrid'art = 'APPS:oracle.apps.gl.Journals.journal.approve. '
Procedure:
CREATE OR REPLACE PACKAGE BODY APPS. XX_GL_APPROVE_BE_PKG
AS
PROCEDURE Get_Attributes
IS
BEGIN
INSERT INTO xx.xx_test_table VALUES (' to BE');
COMMIT;
END Get_Attributes;
END XX_GL_APPROVE_BE_PKG;Hello
This OWNER_TAG represents an actual application under license, as "DNF" without the quotes. The business event system will send subscriptions for licensed products.
Also, in order to detect any other possible errors please add a subscription of type error. In this way the BES will catch the error and will notify SYSADMIN of this failure, it's not silent. You can use this link to see how: https://blogs.oracle.com/oracleworkflow/entry/defining_business_events_with_synchronous
Kind regards
Alejandro
-
PLSQL procedure with the ORA-01858: a non-digit character was found where
Hi friends,
I'm pretty much back to the plsql programming. I am creating the plsql procedure that basically accepts the values of variables and controls difference of two columns if she's even if different it inserts values into the temporary table GTT_S_DOC_QUOTE, and then inserts data into another table in s_doc_quote please help me or correct my procedure.
Since I'm getting below error ORA-01858: a non-digit character was found here where waiting a digital .my procedure is as below.
CREATE OR REPLACE PROCEDURE QUOTE_STS)
ROW_ID_IN GGATE_CT. GTT_S_DOC_QUOTE. ROW_ID % TYPE,
STAT_CD_IN GGATE_CT. GTT_S_DOC_QUOTE. STAT_CD % TYPE,
PREV_STS_CD_IN GGATE_CT. GTT_S_DOC_QUOTE. PREV_STS_CD % TYPE,
BU_ID_IN GGATE_CT. GTT_S_DOC_QUOTE. BU_ID % TYPE,
CREATED_IN GGATE_CT. GTT_S_DOC_QUOTE. CREATED % TYPE,
X_CRRNT_TOT_AGRD_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_AGRD_RMS % TYPE,
X_CRRNT_TOT_BLCKD_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_BLCKD_RMS % TYPE,
X_CRRNT_TOT_PCKDUP_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_PCKDUP_RMS % TYPE,
X_CRRNT_TOT_PCKDUP_AVGRT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_PCKDUP_AVGRT % TYPE,
X_CRRNT_TOT_BLCKD_AVGRT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_BLCKD_AVGRT % TYPE,
X_CRRNT_CNTRCT_SR_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_SR_REVN % TYPE,
X_CRRNT_CNTRCT_FD_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_FD_REVN % TYPE,
X_CRRNT_CNTRCT_BEV_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_BEV_REVN % TYPE,
X_CRRNT_CNTRCT_RM_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_RM_REVN % TYPE,
X_CRRNT_USD_EXCHNG_RT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_USD_EXCHNG_RT % TYPE,
X_CRRNT_CNTRCT_OTHR_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_OTHR_REVN % TYPE,
X_CRRNT_CNTRCT_RSRC_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_RSRC_REVN % TYPE,
LAST_UPD_IN GGATE_CT. GTT_S_DOC_QUOTE. LAST_UPD % TYPE)
BEGIN
IF (PREV_STS_CD == STAT_CD) then
END if;
INSERT INTO GTT_S_DOC_QUOTE)
ROW_ID,
STAT_CD,
PREV_STS_CD,
BU_ID,
CREATED,
X_CRRNT_TOT_AGRD_RMS,
X_CRRNT_TOT_BLCKD_RMS,
X_CRRNT_TOT_PCKDUP_RMS,
X_CRRNT_TOT_PCKDUP_AVGRT,
X_CRRNT_TOT_BLCKD_AVGRT,
X_CRRNT_CNTRCT_SR_REVN,
X_CRRNT_CNTRCT_FD_REVN,
X_CRRNT_CNTRCT_BEV_REVN,
X_CRRNT_CNTRCT_RM_REVN,
X_CRRNT_USD_EXCHNG_RT,
X_CRRNT_CNTRCT_OTHR_REVN,
X_CRRNT_CNTRCT_RSRC_REVN,
LAST_UPD
)
VALUES ('ROW_ID_IN',
"STAT_CD_IN,"
"PREV_STS_CD_IN,"
"BU_ID_IN,"
"CREATED_IN,"
"X_CRRNT_TOT_AGRD_RMS_IN,"
"X_CRRNT_TOT_BLCKD_RMS_IN,"
"X_CRRNT_TOT_PCKDUP_RMS_IN,"
"X_CRRNT_TOT_PCKDUP_AVGRT_IN,"
"X_CRRNT_TOT_BLCKD_AVGRT_IN,"
"X_CRRNT_CNTRCT_SR_REVN_IN,"
"X_CRRNT_CNTRCT_FD_REVN_IN,"
"X_CRRNT_CNTRCT_BEV_REVN_IN,"
"X_CRRNT_CNTRCT_RM_REVN_IN,"
"X_CRRNT_USD_EXCHNG_RT_IN,"
"X_CRRNT_CNTRCT_OTHR_REVN_IN,"
"X_CRRNT_CNTRCT_RSRC_REVN_IN,"
'LAST_UPD '.
);
INSERT INTO S_DOC_QUOTE_CT
(ROW_ID_OUT, STAT_CD_OUT, PREV_STS_CD_OUT, BU_ID_OUT, CREATED_OUT, X_CRRNT_TOT_AGRD_RMS_OUT, X_CRRNT_TOT_BLCKD_RMS_OUT, X_CRRNT_TOT_PCKDUP_RMS_OUT, X_CRRNT_TOT_PCKDUP_AVGRT_OUT,
X_CRRNT_TOT_BLCKD_AVGRT_OUT, X_CRRNT_CNTRCT_SR_REVN_OUT, X_CRRNT_CNTRCT_FD_REVN_OUT, X_CRRNT_CNTRCT_BEV_REVN_OUT, X_CRRNT_CNTRCT_RM_REVN_OUT, X_CRRNT_USD_EXCHNG_RT_OUT, X_CRRNT_CNTRCT_OTHR_REVN_OUT,
SELECT X_CRRNT_CNTRCT_RSRC_REVN_OUT ROW_ID), STAT_CD, PREV_STS_CD, BU_ID, CREATED, X_CRRNT_TOT_AGRD_RMS, X_CRRNT_TOT_BLCKD_RMS, X_CRRNT_TOT_PCKDUP_RMS, X_CRRNT_TOT_PCKDUP_AVGRT,.
X_CRRNT_TOT_BLCKD_AVGRT, X_CRRNT_CNTRCT_SR_REVN, X_CRRNT_CNTRCT_FD_REVN, X_CRRNT_CNTRCT_BEV_REVN, X_CRRNT_CNTRCT_RM_REVN, X_CRRNT_USD_EXCHNG_RT, X_CRRNT_CNTRCT_OTHR_REVN,
GGATE_CT X_CRRNT_CNTRCT_RSRC_REVN. GTT_S_DOC_QUOTE;
COMMIT;
end if;
end QUOTE_STS;I was wondering why I get this error even if I stated the PREV_STS_CD
What line do you think that you said PREV_STS_ID on? As far as I can see that the IF statement is the first mention of it in your code. My guess is that you mean PREV_STATS_ID_IN (goes the same for STAT_CD / STAT_CD_IN).
If you write
IF prev_sts_cd_in = stat_cd_in THEN NULL; END IF; do_something_here;
then "do_something_here" will be processed regardless of the IF condition. I think what you probably wanted was something like
IF prev_sts_cd_in = stat_cd_in THEN NULL; ELSE do_something_here; END IF;
Is it possible for the prev_sts_cd and the stat_cd null? The test above would not handle this.
Also, as others have mentioned, the first INSERT statement attempts to insert the strings like "ROW_ID_IN" you probably want to use the value of the ROW_ID_IN parameter, which is the reason why you get the error ORA-01858. I'm guessing here of course, but I took out the quotes.
That would make your code something like this:
CREATE OR REPLACE PROCEDURE quote_sts ( row_id_in ggate_ct.gtt_s_doc_quote.row_id%TYPE , stat_cd_in ggate_ct.gtt_s_doc_quote.stat_cd%TYPE , prev_sts_cd_in ggate_ct.gtt_s_doc_quote.prev_sts_cd%TYPE , bu_id_in ggate_ct.gtt_s_doc_quote.bu_id%TYPE , created_in ggate_ct.gtt_s_doc_quote.created%TYPE , x_crrnt_tot_agrd_rms_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_agrd_rms%TYPE , x_crrnt_tot_blckd_rms_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_blckd_rms%TYPE , x_crrnt_tot_pckdup_rms_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_pckdup_rms%TYPE , x_crrnt_tot_pckdup_avgrt_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_pckdup_avgrt%TYPE , x_crrnt_tot_blckd_avgrt_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_blckd_avgrt%TYPE , x_crrnt_cntrct_sr_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_sr_revn%TYPE , x_crrnt_cntrct_fd_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_fd_revn%TYPE , x_crrnt_cntrct_bev_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_bev_revn%TYPE , x_crrnt_cntrct_rm_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_rm_revn%TYPE , x_crrnt_usd_exchng_rt_in ggate_ct.gtt_s_doc_quote.x_crrnt_usd_exchng_rt%TYPE , x_crrnt_cntrct_othr_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_othr_revn%TYPE , x_crrnt_cntrct_rsrc_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_rsrc_revn%TYPE , last_upd_in ggate_ct.gtt_s_doc_quote.last_upd%TYPE ) IS BEGIN IF prev_sts_cd_in = stat_cd_in THEN NULL; ELSE INSERT INTO gtt_s_doc_quote ( row_id , stat_cd , prev_sts_cd , bu_id , created , x_crrnt_tot_agrd_rms , x_crrnt_tot_blckd_rms , x_crrnt_tot_pckdup_rms , x_crrnt_tot_pckdup_avgrt , x_crrnt_tot_blckd_avgrt , x_crrnt_cntrct_sr_revn , x_crrnt_cntrct_fd_revn , x_crrnt_cntrct_bev_revn , x_crrnt_cntrct_rm_revn , x_crrnt_usd_exchng_rt , x_crrnt_cntrct_othr_revn , x_crrnt_cntrct_rsrc_revn , last_upd ) VALUES ( row_id_in , stat_cd_in , prev_sts_cd_in , bu_id_in , created_in , x_crrnt_tot_agrd_rms_in , x_crrnt_tot_blckd_rms_in , x_crrnt_tot_pckdup_rms_in , x_crrnt_tot_pckdup_avgrt_in , x_crrnt_tot_blckd_avgrt_in , x_crrnt_cntrct_sr_revn_in , x_crrnt_cntrct_fd_revn_in , x_crrnt_cntrct_bev_revn_in , x_crrnt_cntrct_rm_revn_in , x_crrnt_usd_exchng_rt_in , x_crrnt_cntrct_othr_revn_in , x_crrnt_cntrct_rsrc_revn_in , last_upd ); INSERT INTO s_doc_quote_ct ( row_id , stat_cd , prev_sts_cd , bu_id , created , x_crrnt_tot_agrd_rms , x_crrnt_tot_blckd_rms , x_crrnt_tot_pckdup_rms , x_crrnt_tot_pckdup_avgrt , x_crrnt_tot_blckd_avgrt , x_crrnt_cntrct_sr_revn , x_crrnt_cntrct_fd_revn , x_crrnt_cntrct_bev_revn , x_crrnt_cntrct_rm_revn , x_crrnt_usd_exchng_rt , x_crrnt_cntrct_othr_revn , x_crrnt_cntrct_rsrc_revn , last_upd) SELECT row_id , stat_cd , prev_sts_cd , bu_id , created , x_crrnt_tot_agrd_rms , x_crrnt_tot_blckd_rms , x_crrnt_tot_pckdup_rms , x_crrnt_tot_pckdup_avgrt , x_crrnt_tot_blckd_avgrt , x_crrnt_cntrct_sr_revn , x_crrnt_cntrct_fd_revn , x_crrnt_cntrct_bev_revn , x_crrnt_cntrct_rm_revn , x_crrnt_usd_exchng_rt , x_crrnt_cntrct_othr_revn , x_crrnt_cntrct_rsrc_revn , last_upd FROM ggate_ct.gtt_s_doc_quote; END IF; END quote_sts;
-
I have an external PLSQL procedure that dynamically creates a report out of the HTML tags that I then called an anonymous block APEX PLSQL. I'm making bad images with the following code:
in the external procedure. How do you get around that? (NOTE: the procedure is too big to store directly in the APEX)....
' < style td = "width: auto;" "padding: 0px 5px 0px ' > '. spc_rec. SPC_VIABILITY_STATUS. "< table > ' |
"< style td =" width: auto; " text-align: left; "padding: 0px 5px 0px" > ' | spc_rec. SPC_VIABILITY_REASON. "< table > ' | TD > < img src = "" #IMAGE_PREFIX #check2.gif "alt =" "/ > < table > '"
....
Thanks in advance
PaulP
Hi Paul,.
You can use the global variable of the APEX package below to get the image prefix in pl/sql. Of course, your procedure should be in APEX, schema analysis application.
APEX_APPLICATION. G_IMAGE_PREFIX
Kind regards
Hari
-
Describe the Table inside the PLSQL procedure
Dear all,
I write a procedure which takes tablename as input and displays these columns in the table as output. How to describe a table within a plsql procedure. Also how to display columns, because each table will have a different number of columns. Please suggest.
Thank you and best regards,
MaheshHello
You can have a procedure like thisCREATE OR REPLACE PROCEDURE retrieve_tab_cols_prc(l_table_name VARCHAR2,l_owner_name varchar2) AS CURSOR TAB_COL_CURSOR IS select * from all_tab_cols where table_name = l_table_name and owner = l_owner_name ORDER BY column_id; BEGIN FOR CUR_REC IN TAB_COL_CURSOR LOOP dbms_output.put_line(CUR_REC.COLUMN_ID||' : '||CUR_REC.COLUMN_NAME); END LOOP; END retrieve_tab_cols_prc; Procedure created. SQL> begin 2 RETRIEVE_TAB_COLS_PRC('EMP','SCOTT'); 3 end; 4 / 1 : EMPNO 2 : ENAME 3 : JOB 4 : MGR 5 : HIREDATE 6 : SAL 7 : COMM 8 : DEPTNO
-
Call the function browser plsql (403 error)
Hello
I m pl/sql developer and I m new in APEX. In fact, I have little trouble with Express application, authorization and call browser plsql. I found the pl/sql procedure to see the image (actually I don't like in pl/sql, I'll be happy if I calll Hello World of browser).
My Info: Oracle 12.1 c, Windows 7, default APEX 4.2
I found it is appeal possible function of the url in this way: http://localhost:8080/apex/APEX_040200.just_print and he return 403 for me, where:
Just_print is defined as
create or replace PROCEDURE JUST_PRINT AS BEGIN htp.p('HAF'); END;
Just_print, it's in the APEX_040200 scheme
According to web articles that I give perform this function ANONYMOUS or APEX_PUBLIC_USER or PUBLIC. I don't like the safety (my local host, learning...) so I have him granted for all:
grant execute on just_print to anonymous,apex_public_user,public;
It must stop return 404 (not found) and start to return a 403 (forbidden) - it works (for anonymous scholarship, but I hold decided run grant for all accounts - just for sure)
Now, according to web I must change the function wwv_flow_epg_include_mod_local (in the APEX_040200 schema) and add the name of function. I tried but doesn't work. Yes, there is first line of the procedure returns alwas FAKE and I remove it, I also added the procedure IN the list. And also modified function that simply returns TRUE. Nothing works, real version is:
create or replace function wwv_flow_epg_include_mod_local( procedure_name in varchar2) return boolean is begin if upper(procedure_name) like '%PRINT%' or upper(procedure_name) like '%IMAGE%' then return TRUE; else return FALSE; end if; end wwv_flow_epg_include_mod_local;
(u just removed comments to be the shortest). Here it's like printing (the function) and image (feature first tried) and superior, also when I try this:
begin if apex_040200.wwv_flow_epg_include_mod_local('just_print') then dbms_output.put_line('OK'); else dbms_output.put_line('FAIL'); end if; end;
It will print OK (and also for ctrl + c/ctrl + v in web broswer) and also for any changes - APEX_040200.JUST_PRINT etc so it should not be a typo error.
When I call just_print or PL/SQL region show_image (create page - add plsql - region and add the code begin just_print; end ;) it works.)
Also, I've run the instalation guide ACL policy (all).
I not found any other step to must be done - so I don't have anything else.
--
Any suggestion what I am doing wrong? (except the whole life, but this is another story...) )
THANK YOU VERY MUCH
Hello
I don't think it's your problem, but it's bad idea create procedures to the diagrams of the system as APEX_040200.
Create procedure to the own schema and then create public synonym for it.
Grant execute privilege to public for the procedure, just to test.
And change 040200.wwv_flow_epg_include_mod_local function always returns true, just to test
create or replace function wwv_flow_epg_include_mod_local( procedure_name in varchar2 ) return boolean is begin return FALSE; end wwv_flow_epg_include_mod_local;
Then try the URL http://localhost: 8080/apex/just_print
Kind regards
Jari
-
PLSQL simultaneous error: wrong number or types of arguments in the call
Hello
I defined a PLSQL simultaneous with 2 parameters:
(10) DELIVERABLE_ID using valueset 10/number (A 10-digit positive numeric field whose validation)
(20) STATUS using valueset 10 characters (10 text free characters without validation)
My request has encountered error, with parameter values DELIVERABLE_ID = 105367, STATUS = New
Cause: FDPSTP failed due to the ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in the call to 'EBOARD_WF_START '.
ORA-06550: line 1, column 7:
But I ran the the same Toad PLSQL
ADB_PA_BC_WF. EBOARD_WF_START (105367, 'Nine');
I have no error, it completed successfully.
No idea what went wrong?You define the package / procedure argument RETCODE and ERRBUF calling as simultaneous program.
procedure my_cp
(errbuf out varchar2)
RETCODE out varchar2,.
p_arg1 in varchar2,
p_arg2 in varchar2
);Kind regards
Gareth -
IPS recovery procedure - error
Hello guys...
I forgot the password for module AIP-SSM-10 and try to recover break it. It works 5.x and so I have to make a recovery. on the recovery procedure, the image copy to tftp server system and throws the below error message...
Slot-1 772 > Bad magic number (0 x-47cd60cf)
Slot-1 773 > restart Autoboot error...
Slot-1 774 > reboot...
any suggestion on wht could be the reason and how to on this subject?
Thank you
AJ
the file being attempted to install isn't what they expected the ROMMON of the MSS.
The Image file of the system was damaged during the download.
OR the attempt of the procedure of the System Image with one file other than a System Image.
There are several types of files for IPS and their use is often confused.
For example:
For version 2.0000 E3, there were 3 different files for the AIP-SSM-10:
The system image:
IPS-SSM_10-K9-sys-1.1-a-6.1-2-E3.img
-For installation through ROMMON or more technically the "module hw-module 1 recover...» "order of the SAA. Install a complete Image of the system on the MSS and erases all previous data from the SSM.
NOTE: This is the type of file to be used in the method you follow.
Update:
IPS - K9 - 6.1 - 2 - E3.pkg
-To upgrade from an earlier version of the sensor to this new version. It converts the previous configuration to work with the new version.
Recovery partition:
IPS-K9-r-1.1-a-6.1-2-E3.pkg
-For the upgrade JUST the SSM recovery partition. The recovery partition can be used for recovery with the "application-recovery partition" command in the sensor CLI.
There may be some confusion here, because this file is the 'Recovery' image, BUT is NOT used with the command "recover the hw-module module 1" of the SAA.
Instead, the Image of the 'system' is what is used with the command "recover the hw-module module 1.
If you find that you do not use the correct file type (unkowingly used a upgrade or recovery file), then download the System Image file and try again.
If you use the System Image file, then check the size and md5 checksum of the file and compare it to what is on cisco.com. It was damaged during the download from cisco.com and you may need a new download of the file.
If the checksum md5 and size of the file is the file on cisco.com, check your TFTP server. Using a 3rd attempt of machine for the file from the tftp server tftp. Once the tftp would check the size and md5 checksum to verify that your TFTP server is able to serve the entire file. You want to make sure your TFTP server is not truncate your file for download.
-
Manage the SQLCODE in Plsql procedure
Hello
can you tell me how I can manage the sqlcode for each sql statement and continue the treatment?
For example, I read a table and write the data in another table.
If I get an error of key double pears (IE already entered folders) I would write a log table and read the next record.
The Exception Management stop the process and does not continue reading.
Thank you
-When you transform data between table1 and table2, duplicates will be captured in error_log table with the key that splits to, message error oracle error number, try to run the statements below and understand the process and let me know for any information.
@@@@@@@
create table table1 (tabl1_column number); -primary table
create table table2 (tabl2_column unique number); -Secondary table
create table error_log (duplicate_key number, error_code varchar2 (100), error_message varchar2 (100)); -error log table
Insert into table1 values (1);
Insert into table1 values (1);
Insert into table1 values (2);
Insert into table1 values (3);
script:
====
create or replace procedure sp_sample
as
v_error_msg varchar2 (100): = null;
v_error_code varchar2 (100): = null;
Start
for rec loop (select tabl1_column from table1)
Start
insert into table2 (tabl2_column) values (rec.tabl1_column);
exception when others then
v_error_msg: = sqlerrm;
v_error_code: = sqlcode;
Insert in error_log (duplicate_key, error_code, error_message) values(rec.tabl1_column,v_error_code,v_error_msg);
commit;
end;
end loop;
end;
/
Execute the statement:
===============
Set serveroutput on;
exec sp_sample;
/
Check the result:
==============
Select * from table1;
Select * from table2;
Select * from error_log;
-
Procedural error the call for VARRAY String as parameter
Hello
I get the error during the call to the procedure:
Here are the steps:
CREATE or REPLACE TYPE PART_TYPE IS an OBJECT (part_number VARCHAR2 (120));
CREATE OR REPLACE TYPE PART_REC_TBL IS VARRAY (1000) of PART_TYPE ;
I have a stored procedure in the package:
create or replace package TEST_PART_SEARCH_PKG AUTHID CURRENT_USER AS
PROCEDURE ADD_TO_PART)
p_part_number_list IN PART_REC_TBL ,
p_ord_number IN Varchar2,
x_error_flag OUT Varchar2,
x_error_msg OUT Varchar2
);
end TEST_PART_SEARCH_PKG;
When I call the Package:
DECLARE
v_flag varchar2 (100);
v_err_msg varchar2 (100);
BEGIN
TEST_PART_SEARCH_PKG. ADD_TO_PART ('09031518,0897701 ',' 003146M 56', v_flag, v_err_msg);
END;
error report-
ORA-06550: line 5, column 6:
PLS-00306: wrong number or types of arguments in the call to 'ADD_TO_PART '.
ORA-06550: line 5, column 6:
PL/SQL: Statement ignored
It would be helpful if someone can help me on this
Obviously. There are no part_number, so turn in your package and get rid of it:
FOR indx1 IN 1.p_lot_number_list. COUNTY
LOOP
BEGIN
SELECT
inventory_item_id
IN
var_item_id
Of
test_part_number_v
WHERE
PART_NUMBER = p_part_number_list (indx1);
EXCEPTION
WHILE OTHERS THEN
var_item_id: = NULL;
END;
SY.
-
My procedure is put in error during execution. This procedure uses several functions and database objects. In what approach I continue during debugging.
You can use the following table to get all dependent objects...
And then as a result wise module check the data stream.
Select * from dba_dependencies where name =' ';
Thank you
-
Compilation of procedure error
I'm trying to compile a procedure which is supposed to fill the tables with data, but I get errors ignored multiple statements. I'm running out of ideas what could be wrong, because the syntax seems very well. I downloaded the full code here: http://pastebin.com/gTnpj0Jm . Could someone please take a look?
0566fdce-4035-4cdd-b2da-37d1e2b97e42 wrote:
I'm sorry, but I searched in my code for a good 10 minutes and I can't find any case to appoint a pl/sql variable same as column name.
You are right. Question is different.
DECLARE
DATE OF BORN_DATE_VALUE;
BEGIN
BORN_DATE_VALUE: = Trunc)
TO_DATE ('2000 ', 'yyyy')
+
DBMS_RANDOM. VALUE)
0,
TO_DATE ('2015 ","yyyy")
-
TO_DATE ('2000 ', 'yyyy')
));
END;INSERT INTO STUDENT (ID_STUDENT, F_NAME, L_NAME, BORN_DATE)
VALUES (S_STUD. NEXTVAL, F_NAME_VALUE, L_NAME_VALUE, BORN_DATE_VALUE);BORN_DATE_VALUE range block, in which it is declared. If being outside the block INSERT statement in that born_date_value is declared, INSERT does not know what BORN_DATE_VALUE and assume it is the column name.
SY.
-
Hello
I'm trying to insert the results of a query in a table. When I run it as a sql it works perfectly fine. I am writing this in a procedure that I need to run this often, but I get an error indicating that the table was not found. any suggestions on this.
SQL query
insert into db_usage
SELECT hg. Nom_tablespace 'space ',.
TOTALUSEDSPACE "use."
(hg. TOTALSPACE - FG TOTALUSEDSPACE) "MB free.
Hg.TotalSpace "Total."
round (100 * ((hg.totalspace-fg.totalusedspace) / hg.totalspace))
"using."
SYSDATE
Of
(select nom_tablespace,
Round (Sum (bytes) / 1048576) TotalSpace
from dba_data_files
Group by tablespace_name) hg.
(select round (sum (bytes) /(1024*1024)) totalusedspace, nom_tablespace)
from dba_segments
GROUP BY nom_tablespace) fg
where hg. Nom_tablespace = FG TABLESPACE_NAME
ORDER BY hg. NOM_TABLESPACE;
END;
***************
PL/SQL
CREATE OR REPLACE PROCEDURE TEST AS
Begin
DBMS_OUTPUT. ENABLE;
insert into db_usage
SELECT hg. Nom_tablespace 'space ',.
TOTALUSEDSPACE "use."
(hg. TOTALSPACE - FG TOTALUSEDSPACE) "MB free.
Hg.TotalSpace "Total."
round (100 * ((hg.totalspace-fg.totalusedspace) / hg.totalspace))
"using."
SYSDATE,
TO_CHAR (sysdate, 'HH24')
Of
(select nom_tablespace,
Round (Sum (bytes) / 1048576) TotalSpace
from dba_data_files
Group by tablespace_name) hg.
(select round (sum (bytes) /(1024*1024)) totalusedspace, nom_tablespace)
from dba_segments
GROUP BY nom_tablespace) fg
where hg. Nom_tablespace = FG TABLESPACE_NAME
ORDER BY hg. NOM_TABLESPACE;
END;
Thank you
balls
Most likely, you must do the following:
Connect / as sysdba
Grant select on sys.dba_data_files to proc_owner;
Grant select on sys.dba_segments to proc_owner;
A few other comments...
> DBMS_OUTPUT. ENABLE;
It is not necessary in a stored procedure. This process has even not any DBMS_OUTPUT. PUT (_LINE) call so the above is unnecessary.
> ORDER BY hg. NOM_TABLESPACE;
Consider dropping it. Are you concerned that the data are inserted into the table in the order? What concerns you is that data comes from the table in the order sorted which cases you'd ORDER BY queries using this table.
See you soon,.
Brian -
Dynamic insertion within the procedure error
Hi allI use under oracle database on HP - UX.
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE Production 10.2.0.5.0
AMT for HP - UX: 10.2.0.5.0 - Production Version
NLSRTL Version 10.2.0.5.0 - ProductionI'm not able to run the procedure below and it returns the error. The insert in the procedure returns error. If I execute manually only the insert statement, it works well.
Can someone help me with this issue?Procedure
===========
create or replace procedure test_proc
as
v_sql varchar2 (2000);
Start
v_sql: =' insert into TABLE1 (select owner, object_type, object_name, "S", "Y" of dba_objects@LINK1 )
where owner = "ABC" and object_type = "TABLE" less
Select the owner, object_type, object_name, "S", "Y" from dba_objects where owner = "ABC" and object_type = "TABLE") ';immediately run v_sql;
commit;
end;
/exec test_proc;
Error:
===========ERROR on line 1:
ORA-00942: table or view does not exist
ORA-06512: at "SYSTEM. TEST_PROC", line 8
ORA-06512: at line 1user running this procedure doesn't have permission to read data from DBA_OBJECTS. Grant select permission on that to the user running this procedure and it should work.
Onkar
Maybe you are looking for
-
I have an Emachines netbook (250) and my netbook (shows emachines logo) lights up and asks if I would go on safe mode, last known good configuration, start normally, ect. Anyway, I tried all the and always just, it loads the windows xp logo and displ
-
WRT120N not broadcasting Wireless N
I was wondering if anyone had any input on this situation. I have a WRT120N router, 1 computer connected to it, a laptop that connects to wirelessy and another computer that connects wireless. Both the laptop and the 3rd computer have Wireless N ne
-
error code 525 appeared during the installation of windows update
error code 525 appeared during the installation of windows update. I m using windows vista 32 bit
-
When searching for files in Windows Explorer (WIN 7), can the railways under folder reading "c:\help\me\please" instead of "Please (c:\help\me)? Thank you!
-
program called notifier absolute?
whenever I connect my mobile personal installed anti-virus (McAfee) appears a warning box indicating the program absolute notifier in (location: C:\program files (x 86) \absolute software\absolute notifier\absolutenotifier.exe). Trying to gain intern